pub struct CurveParams {
pub n: f32,
pub d: f32,
pub phase: f32,
pub radial_offset: f32,
pub samples: usize,
pub scale: f32,
pub rotation: f32,
pub draw_progress: f32,
pub color: [f32; 3],
pub width: f32,
pub levers: Levers,
}Expand description
Everything a family’s walk needs, by name.
This was eleven positional f32s behind #[allow(clippy::too_many_arguments)]
(Plan 0031 Phase 6). Four of them — phase, scale, radial_offset,
rotation — are adjacent, same-typed, and easy to transpose: the call would
still compile and would draw a different curve. Named fields make that a typo
you can see. Copy and all-scalar, so it is free at runtime.
n, d and phase carry a family-specific meaning; the field docs
give the rose’s, and each family’s sampler states its own.
Fields§
§n: f32Petal frequency: the n in sin(n * theta).
d: f32Angular step between successive sampled points, in degrees — the Maurer parameter that turns a smooth rose into its chord web.
phase: f32Phase (radians) inside the sine, so advancing it reshapes the petal
structure. Distinct from rotation, which spins the
finished figure in screen space. 0.0 is the plain rose.
radial_offset: f32Constant added to the radius, opening the rose off the origin into
spiral / annular / rosette forms. A nonzero value makes r exceed
[-1, 1] (intended — the renderer clips). 0.0 is the plain rose.
samples: usizeHow many points to walk; the chord count when fully drawn.
scale: f32Uniform scale applied after the rotation.
rotation: f32Screen-space rotation of the finished figure, in radians.
draw_progress: f32Reveal fraction in 0..=1 (line-draw-on); 1.0 draws the whole curve.
color: [f32; 3]One RGB colour for every segment.
width: f32Per-segment line width.
levers: LeversThe levers beyond n, d and phase that only some families read.
Trait Implementations§
Source§impl Clone for CurveParams
impl Clone for CurveParams
Source§fn clone(&self) -> CurveParams
fn clone(&self) -> CurveParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CurveParams
impl Debug for CurveParams
Source§impl PartialEq for CurveParams
impl PartialEq for CurveParams
Source§fn eq(&self, other: &CurveParams) -> bool
fn eq(&self, other: &CurveParams) -> bool
self and other values to be equal, and is used by ==.