How to find intersection of four points in 3d ?
13 views (last 30 days)
Show older comments
hello all, I am assigned with a task to find the intersection of 4 coordinates which are located on the Earth Surface. I have converted them from Spherical to Cartesian coordinate system. From there I am not finding any way to proceed further in order to meet my requirement.
Thanks.
2 Comments
Answers (1)
Roger Stafford
on 16 May 2016
Assume the earth is a perfect sphere with radius R. Let P1=[x1,y1,z1] be the coordinates of one point, and P2, P3, P4 be similar coordinates of the other three points. Let P1, P2 be a pair that defines one great circle and P3 and P4 a second great circle. Do this:
v = cross(cross(P1,P2),cross(P3,P4));
The vector, v, points along the line of intersection of the two great circle planes. Then you have two solutions:
v = v/norm(v);
Q1 = R*v;
Q2 = -R*v;
Both are points of intersection of the two great circles on the earth’s surface.
2 Comments
Roger Stafford
on 17 May 2016
Edited: Roger Stafford
on 17 May 2016
The magnitude (absolute value) of the vector v after taking the cross products depends very much on the angles that existed between the point pairs, P1 with P2, and P3 with P4. It also depends on the angle between the two great circle planes obtained thereby. In general its magnitude would not be equal to the radius of the earth, far from it. Hence, it is necessary to then divide v by its norm to obtain a unit vector and then by the true radius of the earth. Assuming again that the earth is a true sphere (which it is not) the result would then lie on its surface. Don't forget that all the P's and Q's vectors are vectors based at the center of the earth and pointing outwards toward points at the surface.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!