问题
Does anyone have any C# algorithm for finding the point of intersection of the three planes (each plane is defined by three points: (x1,y1,z1)
, (x2,y2,z2)
, (x3,y3,z3)
for each plane different).
The plane defined by the equation: ax + by + cz + d = 0
, where:
A = y1 (z2 - z3) + y2 (z3 - z1) + y3 (z1 - z2)
B = z1 (x2 - x3) + z2 (x3 - x1) + z3 (x1 - x2)
C = x1 (y2 - y3) + x2 (y3 - y1) + x3 (y1 - y2)
D = -(x1 (y2 z3 - y3 z2) + x2 (y3 z1 - y1 z3) + x3 (y1 z2 - y2 z1))
Thank you very much!
回答1:
It's quite fiddly because in many cases the planes can be parallel or in some configuration where they don't intersect at a single point.
However, when they do, the formula can be found here:
http://geomalgorithms.com/a05-_intersect-1.html
I rather think that won't be enough information for you; but maybe it will get you started.
来源:https://stackoverflow.com/questions/14981410/point-of-intersection-of-three-planes-3d-c-sharp