fhpuqrgrpgvirzhpujbj Posted January 25, 2010 Share Posted January 25, 2010 (edited) I have groups of planes, defined as: Vector3 normal; float distance_from_origin; I need to use where these planes intersect to create sides, defined as: Vector3 vertex1; Vector3 vertex2; Vector3 vertex3; Those sides then make up an object (I can do that once I have the sides). Converting my group of planes into a group of sides is what I need help with. I tried to do it myself but... I just have no idea where to start... Link to comment Share on other sites More sharing options...
0 Andre S. Veteran Posted January 25, 2010 Veteran Share Posted January 25, 2010 Didn't try it myself, but here's what I would attempt, intuitively: Find intersections between planes. This gives you lines. Find intersections between lines. This gives you the vertices of the object. What is it you are trying to achieve ? Link to comment Share on other sites More sharing options...
0 fhpuqrgrpgvirzhpujbj Posted January 29, 2010 Author Share Posted January 29, 2010 Didn't try it myself, but here's what I would attempt, intuitively: Find intersections between planes. This gives you lines. Find intersections between lines. This gives you the vertices of the object. What is it you are trying to achieve ? The problem I'm having is I don't know how to check for if planes intersect or if lines intersect. Link to comment Share on other sites More sharing options...
0 Andre S. Veteran Posted January 31, 2010 Veteran Share Posted January 31, 2010 The problem I'm having is I don't know how to check for if planes intersect or if lines intersect. Two planes intersect unless they are parallel (coplanar), that is, unless their normal vectors are colinear. In this case the cross-product of those vectors will be 0, so it's very easy to detect.Two lines p1 + m1(d1), p2 + m2(d2) intersect if they are not colinear and there exists a point in common between them, that is, a point that satisfies both p = p1 + m1(d1) p = p2 + m2(d2) Hence you're looking for the couple m1, m2 that satisfies p1 + m1(d1) = p2 + m2(d2) Check out: http://www.netcomuk.co.uk/~jenolive/vect18d.html and http://mathforum.org/library/drmath/view/63719.html Link to comment Share on other sites More sharing options...
Question
fhpuqrgrpgvirzhpujbj
I have groups of planes, defined as:
I need to use where these planes intersect to create sides, defined as:
Those sides then make up an object (I can do that once I have the sides).
Converting my group of planes into a group of sides is what I need help with.
I tried to do it myself but... I just have no idea where to start...
Link to comment
Share on other sites
3 answers to this question
Recommended Posts