Module implicit

Source
Expand description

Curves given implicitly: where a field over a surface’s parameters is zero (ADR 0077).

Where two analytic surfaces meet, the section read in one surface’s parameters (u, v) is the zero set of the other surface’s implicit equation composed with the first one’s parameterisation. For planes, quadrics and tori that composition is a Field2: a finite sum of products of powers or harmonics of u and of v, known exactly from the two surfaces. Most such sections have no closed form – a torus against a cylinder is a quartic in space – but the field always has.

An ImplicitCurve2 is one connected stretch of such a zero set, carried as a chain of ImplicitCells. In each cell the field is strictly monotone along one parameter, so at every value of the other parameter the curve is the field’s unique zero in the cell’s bracket. A point on the curve is therefore defined, not approximated: the root is found to full precision by a safeguarded Newton iteration that cannot leave the bracket or pick a different branch, and derivatives follow from the implicit function theorem.

ImplicitSection3 carries the same curve in space, on its Carrier surface.

Structs§

Cell
A box in the parameter plane.
ImplicitCell
One stretch of an ImplicitCurve2: as the free parameter runs from from to to, the curve is the unique zero of the field for the other parameter in [low, high], where the field is strictly monotone in it.
ImplicitCurve2
A stretch of a field’s zero set, in the parameters of the surface the field lives on. The parameter t runs over [0, cells.len()]: cell i covers [i, i + 1], its free parameter moving linearly from from to to.
ImplicitSection3
An ImplicitCurve2 on its carrier, in space: the point at t is the carrier’s point at curve.point(t).
Jet2
A field’s value, gradient and Hessian at one point.
LiftedCurve2
A curve in space read in an analytic surface’s parameters: the pcurve at t is the carrier’s parameters of curve’s point at t, so it shares the edge’s parameter exactly. This is the pcurve, on the analytic face, of a section that only the other face’s surface can carry (a B-spline’s section, ADR 0077): the inverse is in closed form for planes, ruled surfaces, spheres and tori.
PatchField2
A piecewise polynomial field: on each cell of the grid of u_breaks by v_breaks, a tensor-product Bernstein polynomial of degree (u_degree, v_degree) in the cell’s local coordinates s, t in [0, 1]. Its coefficients bound it (the convex hull property), which is what makes a trace on it certified.
Range
A closed interval of reals.
SeriesField2
A field over the parameter plane: sum c[i][j] B_i(u) B_j(v), with the bases of Basis along each parameter. The form a plane’s, quadric’s or torus’s equation takes on an analytic surface.
SurfaceJet
A point’s partial derivatives on a Carrier, to second order.

Enums§

Axis
Which parameter a cell runs along; the other is solved for.
Basis
How a SeriesField2 varies along one parameter.
Carrier
The surface a traced curve lies on, as the curve needs it, in the same parameterisation as the matching axiolid_surface family.
Field2
A field over a surface’s parameters whose zero set is a section curve: another surface’s equation read in this surface’s parameters.

Functions§

bound
A bound certain to hold the field’s values over the box (up to the rounding margin included in it), given the field’s partials.
bound_simple
A bound of the field over the box without the mean-value tightening.
grow
Grow a coefficient table to hold index (i, j).
partial
The partial derivative of a field along u (along_u) or v.
size
The coefficient table’s extent in u and v.