Module quadric_section

Source
Expand description

Where a quadric cuts a cylinder or cone, read in the ruled surface’s own parameters (ADR 0076).

A cylinder, elliptical cylinder or cone is RULED: at a fixed angle u its points run along a straight line in v,

P(u, v) = O + (rx + s v) cos(u) X + (ry + s v) sin(u) Y + v Z,

so substituting it into any quadric’s equation gives, for each u, a quadratic in v:

a(u) v^2 + b(u) v + c(u) = 0,

with a, b, c trigonometric polynomials of degree at most two. The section curve is the graph of one root of that quadratic over the angles where its discriminant is not negative. QuadraticGraph2 holds that graph as a pcurve and RuledSection3 the same curve in space. Both are exact: nothing is sampled or fitted, and a plane’s cut (Sinusoid2’s case, a = 0) is the degenerate member of the family.

Structs§

QuadraticGraph2
The graph of one root of a(t) v^2 + b(t) v + c(t) = 0, parameterised by its first coordinate: the point at t is (t, v(t)).
RuledCarrier
A ruled carrier surface, as the curve needs it: a cylinder (rx = ry, slope = 0), an elliptical cylinder (slope = 0) or a cone (rx = ry, slope = tan(semi-angle)), in the same parameterisation as the matching axiolid_surface family.
RuledSection3
A quadric’s section of a ruled carrier, in space: the point at t is the carrier’s point at (t, graph.height(t)).
Trig2
constant + cos cos(t) + sin sin(t) + cos2 cos(2t) + sin2 sin(2t).

Enums§

Branch
Which root of the quadratic a graph follows.