grzkv
grzkv

Reputation: 2619

Polyhedron from the plane equations

I have a few planes (3-10 of them) in 3d defined by their equations (three coefficients and the offset). These planes are the edges of a convex polyhedron. I need to draw that polyhedron. How can I do that? What software/libraries/algorithms can I use? I work in Linux and I'm usually using C or C++.

Upvotes: 2

Views: 451

Answers (1)

schnaader
schnaader

Reputation: 49729

Every plane pair intersects in a line on both planes. Each plane then contains a set of lines that intersect in points, all of those are the edge points of your polyhedron you'll have to connect in a convex way.

With some math/geometry skills, you should be able to solve this, but using a library (f.e. CGAL) of course simplifies it and prevent you from reinventing the wheel.

Upvotes: 1

Related Questions