9.3
114 3D: Seeds and streamline sets
procedure
(seed-set3d? value) → boolean?
value : any/c
Recognizes an immutable,
canonical ordered collection of streamline seed points. Its accessors begin
with seed-set3d-; points is an immutable vector and count is its
length. provenance, diagnostics, and cache-key contain immutable
numeric/source descriptions rather than random-generator state or procedures.
procedure
(explicit-seeds3d points) → seed-set3d?
points : (or/c list? vector?)
Retains
the declared finite vec3 point sequence exactly, including intentional
duplicate seeds.
procedure
(grid-seeds3d [ #:x-range x-range #:y-range y-range #:z-range z-range #:counts counts #:order order]) → seed-set3d? x-range : list? = (list -1 1) y-range : list? = (list -1 1) z-range : list? = (list -1 1) counts : list? = (list 3 3 3) order : symbol? = 'xyz
Makes an endpoint-inclusive
rectangular seed lattice. A singleton axis is centred in its supplied range.
The last axis changes fastest; the six 'xyz-style axis orders select
one visible canonical nesting order.
procedure
(plane-seeds3d plane [ #:u-range u-range #:v-range v-range #:counts counts]) → seed-set3d? plane : plane3? u-range : list? = (list -1 1) v-range : list? = (list -1 1) counts : list? = (list 3 3)
Samples
the deterministic local plane coordinates of plane.
procedure
(curve-seeds3d curve [ #:count count #:spacing spacing]) → seed-set3d? curve : curve3d? count : exact-positive-integer? = 8 spacing : (or/c 'parameter 'arc-length) = 'arc-length
Samples a retained curve. 'parameter means uniform
progress through the curve’s stored sample sequence—not an unavailable source
procedure parameter—while 'arc-length uses the retained polyline
arc-length query.
procedure
(surface-seeds3d surface [ #:u-count u-count #:v-count v-count #:inside-domain? inside-domain?]) → seed-set3d? surface : surface3d? u-count : exact-positive-integer? = 8 v-count : exact-positive-integer? = 8 inside-domain? : boolean? = #t
Samples a retained parametric surface in u-major order.
When inside-domain? is true, points rejected by a retained domain
predicate are omitted and the diagnostic reports that omission.
procedure
(sphere-seeds3d center radius [ #:count count] #:method method) → seed-set3d? center : vec3? radius : nonnegative-real? count : exact-positive-integer? = 64 method : 'fibonacci
Makes
deterministic Fibonacci points on a sphere.
procedure
(poisson-seeds3d bounds [ #:minimum-distance minimum-distance #:count-limit count-limit #:seed seed]) → seed-set3d? bounds : aabb3? minimum-distance : positive? = 1 count-limit : exact-nonnegative-integer? = 128 seed : exact-integer? = 0
Makes an
acceptance-ordered deterministic Bridson-style Poisson set. It uses a local
SplitMix64 generator, FIFO active points, thirty candidates per active point,
and inclusive box/minimum-distance checks; it neither reads nor mutates the
process-global pseudo-random generator.
procedure
(prepared-streamline-set3d? value) → boolean?
value : any/c
Recognizes an
immutable collection prepared from one seed-set3d?. Its accessors
begin with prepared-streamline-set3d-; streamlines is an immutable
vector of accepted prepared-streamline3d? values in seed declaration
order.
procedure
(prepare-streamlines3d field seeds [ #:direction direction #:parameterization parameterization #:solver solver #:termination termination #:sample-policy sample-policy #:separation separation #:parallel? parallel? #:cancellation-token cancellation-token]) → prepared-streamline-set3d? field : any/c seeds : seed-set3d? direction : (or/c 'forward 'backward 'both) = 'forward parameterization : (or/c 'time 'arc-length) = 'time solver : any/c = (adaptive-rk45-solver3d) termination : (or/c false/c trajectory-termination3d?) = #f
sample-policy : streamline-sample-policy3d? = (streamline-sample-policy3d) separation : (or/c false/c positive?) = #f parallel? : (or/c boolean? 'auto) = 'auto cancellation-token : any/c = #f
Prepares
one immutable streamline per accepted seed. When separation is false,
the result is independent and canonical in seed order. A positive separation
processes seeds in that order, rejects a seed already too near an accepted
line, and makes a later candidate stop at a terminal separation event. The
set diagnostic reports accepted/rejected seeds, terminal reasons, field work,
curve samples, the policy separation, discarded short lines, and whether the
set was prepared by bounded worker threads, serially, or in ordered separation
mode. 'auto uses workers only when its ode-field3d and every
termination event explicitly declare parallel-safe?. #t is
an explicit author override and #f is serial. Worker completion never
changes seed/child order. A cancellation token is checked at every seed
boundary and never leaves a partial set.
procedure
(adaptive-streamline-set3d prepared #:id id #:style style [ #:opacity opacity]) → group3d? prepared : prepared-streamline-set3d? id : symbol? style : any/c opacity : real? = 1
Lowers
all accepted prepared lines to ordinary named curve children.