有没有人有任何C#算法找到交集的三个平面(每个面由三个点定义的点:(X1,Y1,Z1)
,(X2,Y2,Z2)
,(X3,Y3,Z3)
每个平面的不同)。
斧+由+ CZ + D = 0
,其中:
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!
这是相当繁琐的,因为在许多情况下,飞机可以是平行的或在一些配置中,它们不相交于一点。
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.