Module sinusoid

Source
Expand description

The height wave a plane cuts across a cylinder, in the cylinder’s own parameters.

A cylinder is parameterised by angle u and height v. A plane z = c0 + c1 x + c2 y meets it where x and y are themselves r cos u and r sin u (or a cos u and b sin u on an elliptical cylinder), so the cut, read in (u, v), is

v(u) = mean + cosine * cos(u) + sine * sin(u)

That curve is what a trimmed cylinder face needs as the pcurve of its sloped rim. No other Curve2 variant holds it exactly: it is not a conic in (u, v), and a B-spline only approximates it, because u is an angle and the wave is transcendental in it.

Structs§

Sinusoid2
The graph v = mean + cosine cos(t) + sine sin(t), parameterised by t.