Given a set of planes that define a convex polyhedron. I would need to quickly find an arbitrary point inside the polyhedron. Not necessarily, but ideally the centroid. I want to do this without any plane intersections if possible.
Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
Posted 19 February 2013 - 10:39 PM
Given a set of planes that define a convex polyhedron. I would need to quickly find an arbitrary point inside the polyhedron. Not necessarily, but ideally the centroid. I want to do this without any plane intersections if possible.
Posted 21 February 2013 - 03:16 AM
You need to prove that your planes halfspaces define a non-empty convex polyhedron first; I don't think there are practical ways which don't involve intersecting planes and convex polyhedra and building explicit faces, edges and vertices (from which computing the centroid is easy).
Omae Wa Mou Shindeiru
Posted 21 February 2013 - 06:02 AM
Edited by max343, 21 February 2013 - 06:52 AM.
Posted 21 February 2013 - 08:10 AM
You just need to check if the point is behind (ie half-spaces) every plane defining your volume. If so, the point is inside your volume
EDIT Sorry if it's not the point of your question
Edited by Tournicoti, 21 February 2013 - 11:21 AM.
Posted 21 February 2013 - 10:25 AM
You just need to check if the point is behind (ie half-spaces) every plane defining your volume. If so, the point is inside your volume
Sure, but the question was how to find such a point that satisfies this criteria.
Thanks max343. I was thinking that this is a minimization problem, but I am bit rusty here. I will look into this!
Posted 21 February 2013 - 07:53 PM
Posted 21 February 2013 - 08:39 PM
Posted 22 February 2013 - 03:53 AM
I don't think that Simplex algorithm is the best choice here, since it searches for maximum on the boundary, while OP wanted some interior point.This sounds similar to finding a feasible solution to a linear-programming problem, so I am sure there is literature about it. This seems to be called "Phase I" in the simplex algorithm. I read the description in Wikipedia, but I am not sure I understand it.
Posted 22 February 2013 - 06:07 AM
Please, read my post carefully. The simplex algorithm has two phases: Phase I finds a feasible configuration, and phase II improves the configuration to find the optimum value of the objective function. Phase I of the simplex algorithm is exactly the same problem the OP has.
I don't think that Simplex algorithm is the best choice here, since it searches for maximum on the boundary, while OP wanted some interior point.This sounds similar to finding a feasible solution to a linear-programming problem, so I am sure there is literature about it. This seems to be called "Phase I" in the simplex algorithm. I read the description in Wikipedia, but I am not sure I understand it.
Posted 22 February 2013 - 01:28 PM
Posted 22 February 2013 - 01:39 PM
If you have a point at the boundary, finding one in the interior is pretty trivial. The wording of the first post says that he would be satisfied with that.
Maybe I missed it, but I don't think a better solution has been suggested so far... What you suggested returns the same answer if you flip one of the inequalities, so it can't possibly return something in the interior in both cases.
Posted 22 February 2013 - 03:15 PM
Posted 22 February 2013 - 03:32 PM
I don't have inequalities in my solution. What I suggested disregards direction because it already assumes that the feasible region of the half spaces defines a convex polyhedron. If we'd flip one of the inequalities, the feasible region would be empty.
No, that's not how it works. Imagine you have a bunch of half-spaces that already define a convex polyhedron. Now take a plane that cuts that convex polyhedron through the middle, and either add one half-space or the other to the list. In both situations the feasible region is not empty, and your proposed solution will return the same answer.
Edited by Álvaro, 22 February 2013 - 03:33 PM.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.