Are there computational short cuts to calculating the distance from a large number of points to 3 different planes?

75 Views Asked by At

I have three planes, and i want to calculate distance of my point to each of them. However, there are 68000 points in the space, so it does not make sense( computationally) to calculate the distance for every one 3 times! I am allowed to use the conventional method(distance of a point to a plane) only once for all of the points.(consider two planes parallel to each other and one perpendicular to them)

Is it possible to use the relation between the planes to calculate 3 distances, only using distance formula once for the point and one of planes?

Thanks

1

There are 1 best solutions below

7
On BEST ANSWER

If you have two planes, A and B, and all you know is the distance from point C to plane A, then all you have is a third plane, C', which is parallel to plane A. C' contains all points that are equidistant to plane A, which is a plane also. You do not know which one of them is the point of interest.

Therefore, unless you have more information or plane B is parallel to plane A, then you cannot also know the distance from point C to plane B.

EDIT:

If you know the coordinates of the point, then you don't need to use the distance formula at all to determine the distance to either plane, unless they are parallel.

If the planes are parallel, then use the distance formula for either plane to determine the distance to the point, then determine the distance between the planes and add (using a negative distance if the second plane on the same side of the first plane as the point).

If the planes are not parallel, then you can find the line that is the intersection of the planes. You can then use the distance formula to determine the distance from the point to the intersecting line. With that information, you can use trigonometry to determine distance to either plane. To do this, you need to calculate the angle of the line that is perpendicular to the intersecting line to each plane (theta), the angle between one plane and the point (alpha) and using the distance of the point to the intersecting line:

Height from plane 1 = sin (alpha) * distance Height from plane 2 = sin (theta - alpha) * distance

You could actually do this with any line that goes through the point and the intersecting line, but the perpendicular is usually the easiest to calculate.

But now your question asks about computational load, and calculating distance from each plane on its own is possibly faster. That would depend on the system you are using to do the calculations. Determining the interesting line, the point distance and the angle probably requires more computations than point-distance formulas, unless the angles between planes are already known, for example.

Also, with a trig approach you will have to be cautious of points that line on (or very near to) a plane.

Additionally, if you are concerned with computational intensity - and you are actually trying to calculate the distances to many points from each plane, then you may want to consider how you could structure the data or the computations differently. For example, if the points are grouped in planes.

Also, if you are concerned about processing time you could calculate the "x" distances in parallel with "y" and "z" - then calculate the actual distance - all using separate threads on different cores.

(BTW - your question should probably ask, "What is the fastest approach to computing the distance from a known point to 3 different planes?" or "Are there computational short cuts to calculating the distance from a large number of points to 3 different planes?")

EDIT 2:

Please observe that the "distance formula" is actually the "minimal distance formula" from two sets of points. There are many distances from a point to a plane, but only 1 minima.

So, if you calculate the minimal distance to the intersection of the planes, then you can use trigonometry to determine the minimal distance to each plane. The minimal distance to the plane will be orthogonal to the plane, and therefore be a right angle, and in this case a right triangle, with the hypotenuse being the distance from the point to the intersection of the planes.

The distance to the plane can then be calculated using the angle and the hypotenuse.