NotASmurf
- 150
- 2
Hey all, I need to know when two triangles intersect in a 3D environment, given the 3 points. Any help apreciate have been stuck on this for a long time,
It is a tedious process.NotASmurf said:Hey all, I need to know when two triangles intersect in a 3D environment, given the 3 points. Any help apreciate have been stuck on this for a long time,
How does one do that? I know gettign the cross product of the normals will get the direction but How would one find a point on both? if there's an algorithmic way that woudl be great as this is for a program I am writing.mathman said:Step two. Compute the line of intersection of these planes.
Take the two equations for the planes. Arbitrarily set one coordinate to 0. Now you have 2 equations in 2 unknown coordinates. Solving will give you the other 2 coordinates for that point.NotASmurf said:How does one do that? I know gettign the cross product of the normals will get the direction but How would one find a point on both? if there's an algorithmic way that woudl be great as this is for a program I am writing.
If you intend to write a computer code, you must take care of special cases. The planes may be parallel. The line of intersection may be constant in one or two coordinates.NotASmurf said:How does one do that? I know gettign the cross product of the normals will get the direction but How would one find a point on both? if there's an algorithmic way that woudl be great as this is for a program I am writing.