Académique Documents
Professionnel Documents
Culture Documents
Giorgio Demontis, Federico Demontis - Oristano, Sardinia, Italy, EU. BETA RELEASE Email giorgio@demontis.net
Check intersection between two 3D line segments
DATA INPUT – EDITABLE RESULT Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
Segment A Segment B READ ONLY line equation : y ( x)=m⋅x+ q
ID xA yA zA xB yB zB where
P01 0.00 0.00 0.00 1.00 0.00 1.00 SENTENCE 1 INT OK dy
P02 1.00 1.00 2.00 0.00 1.00 1.00 m= ( gradient or slope); q = y intercept when x = 0
dx
Method: search for intersections in the xy, xz, yz planes (3 planes)
1-determination of the equation of the 6 lines to which the segments in the 3 planes belong; 2- I search for the 3 intersection points in the three planes;
3- I check if the intersections belong to the segments; 4- I verify that the coordinates of intersection points are common in the [xy xz], [xz yz], [yz yx] planes
CALCULATION, IT IS OPEN, DON'T CHANGE-READ ONLY
Plane ID xA yA xB yB x Int y Int m fract Xxy Xxz chk coord
P01 0.00 0.00 1.00 0.00 0.5 0.5 1/2 xy 0.5 0.5 TRUE
P02 1.00 1.00 0.00 1.00 Inside xy A TRUE
xy Inside xy B TRUE
mAxy qAxy mBxy qBxy Intersection 1 INT
1 0 -1 1 NO PARALLEL
Page 1
3D_INT_2S
1.00 XY
1.00
Y
0.00
0.00
0.00 X 1.00
XZ
2.00
1.00
Z
0.00
X
0.00 1.00
2.00
YZ
1.00
Z
0.00
0.00 Y 1.00
Page 2