Intersections
We do support all sorts of intersections between curves and surfaces.
Curve-Curve Intersections
Curve Curve intersections result in one of three cases:
- Intersection is a curve. This can only happen with two equal curves.
- Intersection is a finite set of discrete points
- Intersection is a infinite set of discrete points (this can happen between a helix and a line). This is just models as a
PointArray, a set of equidistant points. - No intersection
#![allow(unused)] fn main() { pub enum CurveCurveIntersection { None, FinitePoints(Vec<Point>), InfiniteDiscretePoints(PointArray), Curve(Curve), } }
One very imporant thing to understand is that curve-curve intersections cannot result in something like a short edge and a point. The intersection is EITHER the same curve, OR a set of points. This follows from one of the fundamental properties of curves. The proof looks something along the lines of:
- Let
C1andC2be two curves. - Let
Pbe an intersection point onC1andC2. - Now do the taylor expansion of
C1andC2aroundP. - Either the taylor expansions are equal, or they are not.
- If they are equal, then
C1andC2are the same curve. - If they are not equal, then there is an infinitly small neighborhood around
PwhereC1andC2are not equal, hencePis a discrete intersection point.
- If they are equal, then
Similar proofs can be made for surfaces etc. You can look it up under Bézout's theorem.
Curve-Surface Intersections
...