Expand description
Parameterization of the analytic primitives.
Evaluation, derivatives and parameter inversion for every shape in
crate::conic and crate::quadric. Each shape’s parameterization is
defined relative to its own Frame, which is what makes a
parameter value mean the same place across a save, a reload and a transform.
§Conventions
- Circle, ellipse: angle from the frame’s
xaxis towardsy. - Hyperbola:
(a cosh t, b sinh t), describing the+xbranch. - Parabola:
(t^2 / (4 f), t)with the apex att = 0. - Plane:
(u, v)are the coordinates alongxandy. - Cylinder:
(angle, height). - Cone:
(angle, height), with the radius varying along the height. - Sphere:
(longitude, latitude), latitude in[-pi/2, pi/2]. - Torus:
(angle about the axis, angle around the tube).
Every surface here follows the same (u, v) order, u going around and v
going along. Getting that consistent matters: a caller that has to remember
which surface reverses the convention will eventually forget.
Structs§
- Curve
Point - A point on a curve with its first two derivatives.
- Surface
Point - A point on a surface with its first derivatives.
Functions§
- circle_
at - Evaluate a circle at
angle. - circle_
parameter - The angle of the point on a circle nearest
p, in[0, 2*pi). - cone_at
- Evaluate a cone at
(angle, height). - cone_
parameters - The
(angle, height)of the point on a cone nearestp. - cylinder_
at - Evaluate a cylinder at
(angle, height). - cylinder_
parameters - The
(angle, height)of the point on a cylinder nearestp. - ellipse_
at - Evaluate an ellipse at
angle. - ellipse_
parameter - The eccentric angle of the point on an ellipse in the direction of
p. - hyperbola_
at - Evaluate a hyperbola at
t, on the+xbranch. - hyperbola_
parameter - The parameter of the point on a hyperbola in the direction of
p. - line_at
- Evaluate a line at
t, measured in length along its direction. - line_
parameter - The parameter of the projection of
ponto a line. - parabola_
at - Evaluate a parabola at
t. - parabola_
parameter - The parameter of the point on a parabola level with
p. - plane_
at - Evaluate a plane at
(u, v), the coordinates along itsxandyaxes. - plane_
parameters - The
(u, v)of the projection ofponto a plane. - sphere_
at - Evaluate a sphere at
(longitude, latitude). - sphere_
parameters - The
(longitude, latitude)of the point on a sphere nearestp. - torus_
at - Evaluate a torus at
(around the axis, around the tube). - torus_
parameters - The
(u, v)of the point on a torus nearestp. - wrap_
angle - Wrap
angleinto[0, 2*pi). - wrap_
signed_ angle - Wrap
angleinto(-pi, pi].