Skip to main content

Motif

Enum Motif 

Source
pub enum Motif {
    Circle,
    Petal,
    Teardrop,
    Diamond,
    Arc,
    Trefoil,
    Chevron,
    Scallop,
}
Expand description

The closed, curated motif roster (ADR-0079): the shapes a [generator] rings entry may repeat around a ring.

Closed on purpose, and this is the boundary the decision draws. Each motif is a parametric outline sampled to segments — the same thing parametric_curve already does, placed rather than drawn once — so making the set authorable would be a drawing language rather than a parameter, with no natural stopping point (ADR-0079 Alternative C). A look outside the roster routes back through architect + dev.

Local convention, and every outline below obeys it: a motif is authored about its own centre, spanning roughly one unit, with outward (away from the frame centre) along +x. Placement is then one rotation for both the orientation and the position — see build_rings.

The roster closed at seven on 2026-08-06 (Plan 0065 Phase 3), picked from the rendered sample sheets rather than from names. Two of the nine provisional members were cut, and the property they were cut on is worth keeping because the next candidate meets it too: does it hold its identity across the whole 8-to-32 count range.

  • star is an ornament at x8 and dissolves into texture by x32.
  • triangle duplicates Chevron’s sawtooth role at roughly twelve times the segment cost — chevron is 2 segments, the cheapest member in the set.

Variants§

§

Circle

A closed circle — the plainest bead, and the ring that reads as a dotted orbit.

§

Petal

A pointed oval (a vesica), pointed at both ends along the radius.

§

Teardrop

Round at the outer end, cusped at the inner one — the classic paisley drop, and the one motif with an unambiguous “which way is out”.

§

Diamond

A four-vertex rhombus, long along the radius.

§

Arc

An open circular arc bulging outward, chord tangential. One bead among the others, and not the roster’s answer to a scalloped boundary.

A ring of these approximates one, and at Plan 0065 Phase 2 the user was shown that side by side with a genuine boundary curve primitive and picked the primitive (design-backlog 0071). That is Scallop, a single closed chain rather than a ring of copies faking continuity. Reach for that when you want a boundary, and for this when you want an open arc.

§

Trefoil

A three-lobed rose, r = |cos(3*theta/2)| — the densest member, and the one that reads as ornament rather than as a bead.

§

Chevron

An open two-segment chevron, apex outward. The cheapest motif in the roster at two segments a copy.

§

Scallop

The scalloped boundary — one closed chain of outward-bulging arcs meeting at cusps, and the only roster member that is a figure rather than a bead repeated around a ring.

This is the primitive the user chose over an approximation of it (Plan 0065 Phase 2, design-backlog 0071). Shown a ring of overlapping Arc motifs faking a continuous boundary side by side with the real thing, they picked the real thing — and building one needs the renderer’s arc instance (Plan 0087).

It reads the ring’s own fields, and each keeps its spirit — see build_rings. count is the lobe count rather than a copy count, because the lobes are one chain and there is nothing to repeat; radius is the base circle they bulge from, which is exactly the ring a boundary sits on; scale is the depth of the bulge, which is the only size a lobe has once count has fixed its width; and phase turns the whole boundary, as it turns every other ring.

Implementations§

Source§

impl Motif

Source

pub const ALL: &'static [Motif]

Every motif, in roster order — the closed set, and the list a load error names when a preset asks for something outside it.

Source

pub fn from_name(name: &str) -> Option<Motif>

The motif = "..." name a preset writes. None for anything outside the roster — the loader turns that into a surfaced error, never a fallback.

Source

pub fn name(self) -> &'static str

The roster name, for error messages and the sample index.

Source

pub fn segments(self) -> usize

Segments one copy of this motif contributes.

Zero for the two circular members: they are drawn as one ArcInstance each and contribute no segments at all, which is where ADR-0098’s order of magnitude of tier headroom comes from — sampling a circle costs SMOOTH_SAMPLES of this budget, one arc costs one of arcs. A fitted member contributes whatever straight runs its chain contains, which for all three of them is none.

Source

pub fn arcs(self) -> usize

Arcs one copy contributes — one for each circular member, its whole chain for each fitted one, zero for the rest.

Source

pub fn instances(self) -> usize

Instances of either kind one copy costs: the number the budget arithmetic multiplies by count against max_segments.

One budget over both kinds rather than two budgets, because the cap is a statement about how much geometry a tier will draw and an arc is a draw like any other. It also keeps the overflow message meaning one thing.

Trait Implementations§

Source§

impl Clone for Motif

Source§

fn clone(&self) -> Motif

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Motif

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Motif

Source§

fn eq(&self, other: &Motif) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Motif

Source§

impl Eq for Motif

Source§

impl StructuralPartialEq for Motif

Auto Trait Implementations§

§

impl Freeze for Motif

§

impl RefUnwindSafe for Motif

§

impl Send for Motif

§

impl Sync for Motif

§

impl Unpin for Motif

§

impl UnsafeUnpin for Motif

§

impl UnwindSafe for Motif

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,