Module extrema

Source
Expand description

Extrema between points, curves and surfaces (#119, B7): the smallest distance between two pieces of geometry, certified.

A piece is a point, a curve over a span, or a surface over a box of its parameters. The search is branch and bound over the pieces’ parameter ranges. Each sub-range has a box certain to hold its image:

  • lines and patches of a plane map affinely;
  • circles, ellipses, cylinders, cones, spheres and tori have exact ranges of their harmonics;
  • B-splines are held by the control hull of the restricted Bezier pieces (rational weights by interval division);
  • traced section curves by their certified cells and their carrier’s image of them.

The distance between two boxes bounds the pair from below. The distance between two evaluated points bounds it from above, and those points witness it. The search stops when the bounds are within the accuracy asked for. Nothing is sampled on trust: a pair is discarded only when its lower bound exceeds the best distance found.

Structs§

Extremum
The smallest distance between two pieces, bracketed, with points on each at the upper bound.

Enums§

ExtremaRefusal
Why an extremum could not be found.
Piece
One piece of geometry.

Functions§

minimum_distance
The smallest distance between two pieces, to within accuracy.