0

Consider the case where the intersection is a quadrangle, and some of the points of intersection on the tetrahedron edges cannot be given exactly (given the numbers used to represent coordinates i.e. not real numbers, but a limited subset e.g. standard IEEE floating point numbers, or a larger subset of rational numbers).

Another way of thinking about this problem: If 3 planes intersect at a point, but the point cannot be specified exactly (using coordinates - given the numbers used for coordinates), then how does one compute the closest point in a particular region (e.g. on a given side of the three planes.)

A similar problem is when a ray intersects a plane at a point where the point cannot be specified exactly (using coordinates - given the numbers used for coordinates). How to get the closest points (exactly) on the ray both before and after the plane?

  • 1
    Before anything, you should question exactly why you would need to get those "exact" closest points, and what to do with them. –  Oct 18 '22 at 08:01

1 Answers1

1

I will comment on the 2D case (intersection of two line segments, defined by their endpoints), and assume that there is no change of floating-point exponents near the intersection. In this case, we can reason on a square lattice with unit side, by rescaling the input coordinates. [Notice that not all coordinates will have the same exponent; we may consider that the overall precision of the data is governed by the lowest precision, i.e. that of the coordinate with the highest exponent. We rescale so that one ULP of this coordinate becomes one and truncate all decimals.]

Now we solve the problem of the intersection of two line segments known by their endpoints. By the Cramer formulas (https://en.wikipedia.org/wiki/Line%E2%80%93line_intersection#Given_two_points_on_each_line), we see that the exact coordinates are rational numbers, with a numerator of the third order and the denominator of the second order. The searched closest representable closest points are the four combinations obtained from the floor and ceiling of these rationals, on X and Y. One can determine on which side of the segments these lie by plugging the coordinates in the line equations.

As you can imagine, this implies the use of triple precision accuracy in integer computations. The reasoning generalizes to 3D, with yet higher multi-precision requirements.