Logo

The Data Daily

The compound of five tetrahedra | R-bloggers

The compound of five tetrahedra | R-bloggers

The compound of five tetrahedra
Posted on September 9, 2022 by Stéphane Laurent in R bloggers | 0 Comments
[This article was first published on Saturn Elephant , and kindly contributed to R-bloggers ]. (You can report issue about the content on this page here )
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
The compound of five tetrahedra
Posted on September 10, 2022 by Stéphane Laurent
In this previous post I was wrong when I said I didn’t have a tool to compute the intersection of the compound of five tetrahedra:
This can be achieved with the help of the rcdd package in R.
This package is a wrapper of the C library cddlib. It implements the double description of convex polyhedra:
the V-description is the description by the vertices of the polyhedron;
the H-description is the description by a set of linear inequalities.
Once we get the H-description of two or more polyhedra, it is straightforward to get the H-description of their intersection: it suffices to join all the linear inequalities. Then, cddlib will give us the corresponding V-representation. That’s it.
The cddlib library is also usable in Python, with the pycddlib library. I’m going to show how to compute the intersection of the five tetrahedra forming the compound with R and with Python.
The R way
Here are the vertices of the five tetrahedra:
# the twenty vertices #### phi

Images Powered by Shutterstock