Solution
ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2008/iii/paper-77/1/i/solution
Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 77 1 i Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-14
Let the triangles have vertices and . Work initially with nonzero-area triangles. A triangle-triangle intersection algorithm begins with the unnormalized normal vector and the three signed plane evaluations . If all are strictly positive, or all strictly negative, the second triangle lies strictly on one side of the first one's plane, so the triangles are disjoint. Otherwise compute and and apply the symmetric rejection test. Strict inequalities are important: contact on a vertex or edge counts as intersection.
If the planes are not parallel, put . Each triangle meets the other one's plane in an empty set, a point or a line segment. Its endpoints are obtained from zero-valued vertices and the edges whose endpoint plane evaluations have opposite signs. For example, an edge contributesAll these points lie on the common line of the two planes. Choose a coordinate for which and form the coordinate intervals , of the two slices. This coordinate is one-to-one along the common line, so the exact final test isOnly that coordinate of each slice endpoint needs to be evaluated; no full three-dimensional line parameterization is necessary.
Parallel planes which have survived the strict plane tests are coplanar. Drop the coordinate corresponding to the largest component of and test the two projected planar triangles. For each edge of either projected triangle, project both vertex sets onto the perpendicular direction. A strictly disjoint pair of projection intervals certifies separation. If none of the six edge directions separates them, the planar convex sets overlap: a separating line for two disjoint convex polygons can be chosen parallel to an edge of one of them. This includes containment and boundary contact.
A zero normal vector signifies a degenerate triangle; reduce its convex hull to a point or its extreme line segment and use point containment or segment intersection instead. For floating-point input, reliable sign predicates and scale-aware error bounds are preferable to treating a tiny signed distance as an arbitrary exact zero. Plane rejection followed by interval overlap, with a planar test for coplanar input, determines all nondegenerate cases.
New to topics? Read the docs here!