9.3
120 3D: Drawing vector fields and particles
procedure
(vector-field3d field #:id id [ #:x-range x-range #:y-range y-range #:z-range z-range #:x-count x-count #:y-count y-count #:z-count z-count #:normalize? normalize? #:length-range length-range #:color-by-magnitude? color-by-magnitude? #:seed-order seed-order]) → group3d?
field :
(or/c (procedure-arity-includes/c 3) (procedure-arity-includes/c 4)) id : symbol? x-range : list? = (list -2 2) y-range : list? = (list -2 2) z-range : list? = (list -2 2) x-count : exact-positive-integer? = 5 y-count : exact-positive-integer? = 5 z-count : exact-positive-integer? = 5 normalize? : boolean? = #f length-range : (or/c false/c list? pair?) = #f color-by-magnitude? : boolean? = #f seed-order : symbol? = 'xyz
Samples an
explicit finite rectangular grid once. Zero derivatives are omitted.
#:seed-order is one of 'xyz, 'xzy, 'yxz,
'yzx, 'zxy, or 'zyx, giving stable child order.
When requested, magnitude controls the displayed arrow length and colour.
procedure
(streamline3d field seed #:id id) → curve3d?
field : procedure? seed : vec3? id : symbol?
Creates one finite static RK4 streamline.
procedure
(streamlines3d field seeds #:id id) → group3d?
field : procedure? seeds : (listof vec3?) id : symbol?
Creates deterministic
static streamline children.
procedure
(flow-particle3d trajectory phase #:id id [ #:tangent-length tangent-length]) → spatial-relation? trajectory : ode-trajectory3d? phase : scene-parameter? id : symbol? tangent-length : (or/c false/c positive?) = #f
Creates a prepared position marker, optionally with a visible nonzero tangent.
At an equilibrium, the tangent child remains structurally present but invisible
rather than claiming an arbitrary direction.
procedure
(flow-cloud3d trajectories phase #:id id) → group3d?
trajectories : (listof ode-trajectory3d?) phase : scene-parameter? id : symbol?
Creates one prepared particle per trajectory using the shared time parameter.
The canonical acceptance scenes are "examples/3d/prepared-lorenz-flow.rkt" and "examples/3d/lorenz-events.rkt"; the latter distinguishes retained nonterminal rise/fall roots through the same Lorenz surface. Explicit policies are shown in "examples/3d/event-aware-trajectory.rkt" and "examples/3d/trajectory-termination.rkt", while "examples/3d/adaptive-streamlines.rkt" demonstrates world-space resampling, "examples/3d/deterministic-seed-sets.rkt" demonstrates Poisson seed provenance, and "examples/3d/poincare-section.rkt" demonstrates dense plane crossings.