▼V Reference
52 Find a task or a name
53 Modules to require
54 Scenes and sampling
55 Scene states
56 Animation requests
57 Native model details
58 Visuals
59 Geometry
60 Number Lines and Coordinate Decorations
61 Point Markers, Scatter Plots, and Filled Areas
62 Probability and Statistical Diagrams
63 Calculus lessons
64 Colors
65 Slides
66 Slide command-line tools
67 Source Programs and Authored Timelines
68 Interactive Preview and Inspection
69 Preview controls and diagnostics
70 Projects and Final Rendering
71 Project execution and cache details
72 Pict Renderer Protocol
73 3D reference map
74 3D:   Objects, groups, and paths
75 3D:   Cameras and projection
76 3D:   Views inside a Scene
77 3D:   Animating 3D objects
78 3D:   Animating the 3D camera
79 3D:   Cuts, caps, and section measurements
80 3D:   Supplementary surface, section, and annotation bindings
81 3D:   Cuts, sections, and numerical volume
82 3D:   Vectors
83 3D:   Linear maps and rotations
84 3D:   Affine transforms
85 3D:   Bounds, rays, and planes
86 3D:   Spatial maps and homotopies
87 3D:   Materials and lights
88 3D:   Lighting inspection
89 3D:   Shadow descriptors and stable bounds
90 3D:   Finite-light animation
91 3D:   Software finite-light evaluation
92 3D:   Colour space and final output
93 3D:   Relations and geometric annotations
94 3D:   Projected labels
95 3D:   Textured billboards
96 3D:   Spatial curves and vector diagrams
97 3D:   Spatial anchors and label layout
98 3D:   Anchors and projected labels
99 3D:   Parametric surfaces and calculus
100 3D:   Adaptive, trimmed, and implicit surfaces
101 3D:   Constructive solids
102 3D:   Surface constructors and queries
103 3D:   Meshes
104 3D:   Triangle topology
105 3D:   Polygonal faces
106 3D:   Deterministic convex hulls
107 3D:   Polyhedral duals
108 3D:   Schlegel diagrams and polyhedral nets
109 3D:   Conservative mesh correspondence
110 3D:   Topology-safe mesh matching
111 3D:   Checking and repairing mesh orientation
112 3D:   Clipping, sections, and transparency
113 3D:   Prepared spatial ODE trajectories and vector fields
114 3D:   Seeds and streamline sets
115 3D:   Poincare sections and return maps
116 3D:   Equilibria and local linearization
117 3D:   Flow maps and volume change
118 3D:   Drawing and inspecting trajectories
119 3D:   Reading prepared trajectories
120 3D:   Drawing vector fields and particles
121 3D:   Trajectory display
122 3D:   Spatial inspection and exact picking
123 3D:   Retained renderer backends
124 3D:   Compiled geometry and instances
125 3D:   Frame requests and results
126 3D:   Software rendering and statistics
127 3D:   Optional Racket/  Open  GL backend
128 Experimental Derived Visuals
129 Source Package Hygiene
On this page:
spatial-line-route3d
spatial-line-route3d?
spatial-arc-route3d
spatial-arc-route3d?
spatial-bezier-route3d
spatial-bezier-route3d?
spatial-route3d?
spatial-route3d-sample
mesh3d-correspondence-compatible?
mesh3d-matching-sample
mesh3d-cross-fade-sample
group3d-face-parts-matching-sample
transform-matching-mesh3d
transform-matching-mesh3d-request?
transform-matching-spatial
transform-matching-spatial-request?
mesh3d-normals
mesh3d-colors
mesh3d-material
mesh3d-wireframe-color
mesh3d-wireframe-width
mesh3d-local-bounds
9.3

110 3D: Topology-safe mesh matching🔗ℹ

3D reference map · First 3D picture

Creates the default straight reference-translation route.

procedure

(spatial-line-route3d? value) → boolean?

  value : any/c
Recognizes a straight spatial route.

procedure

(spatial-arc-route3d #:axis axis    
  #:angle angle) → spatial-arc-route3d?
  axis : vec3?
  angle : finite-real?
Creates a circular reference route. The nonzero axis must be perpendicular to the source/destination translation chord when the request is compiled, and angle must be strictly between -pi and pi, excluding zero.

procedure

(spatial-arc-route3d? value) → boolean?

  value : any/c
Recognizes a circular spatial route.

procedure

(spatial-bezier-route3d control-1    
  control-2) → spatial-bezier-route3d?
  control-1 : vec3?
  control-2 : vec3?
Creates an endpoint-exact cubic route whose controls are translations in the target parent’s local coordinates.

procedure

(spatial-bezier-route3d? value) → boolean?

  value : any/c
Recognizes a cubic spatial route.

procedure

(spatial-route3d? value) → boolean?

  value : any/c
Recognizes any supported spatial matching route.

procedure

(spatial-route3d-sample route    
  from    
  to    
  progress) → vec3?
  route : spatial-route3d?
  from : vec3?
  to : vec3?
  progress : (real-in 0 1)
Samples a route directly. It returns the original from and to values at zero and one.

procedure

(mesh3d-correspondence-compatible? source    
  destination    
  correspondence) → boolean?
  source : mesh3d?
  destination : mesh3d?
  correspondence : mesh-correspondence3d?
Reports whether the plan supplies a complete bijection of vertices and render triangles and every mapped source triangle uses the mapped vertices of its destination partner. This is the safety test required before interpolating indexed mesh geometry.

procedure

(mesh3d-matching-sample source    
  destination    
  correspondence    
  route    
  progress) → mesh3d?
  source : mesh3d?
  destination : mesh3d?
  correspondence : mesh-correspondence3d?
  route : spatial-route3d?
  progress : (real-in 0 1)
Samples a same-topology matching transition. Interior samples retain the source triangle and edge arrays, interpolate each mapped vertex, optional per-vertex normal and colour, material envelope, opacity, wireframe colour/width, and decomposed transform. Reference translation follows route. Progress zero and one return the exact source and destination mesh values.

procedure

(mesh3d-cross-fade-sample source    
  destination    
  route    
  progress) → spatial-visual?
  source : mesh3d?
  destination : mesh3d?
  route : spatial-route3d?
  progress : (real-in 0 1)
Samples a topology-changing transition as two independently valid temporary mesh layers under the stable source identity. It returns the exact endpoints; the temporary group appears only at interior progress.

procedure

(group3d-face-parts-matching-sample source    
  destination    
  matches    
  route    
  progress) → group3d?
  source : group3d?
  destination : group3d?
  matches : (or/c #f (listof spatial-correspondence3d?))
  route : spatial-route3d?
  progress : (real-in 0 1)
Samples stable direct mesh3d children as mathematical face parts. A supplied spatial-correspondence3d names source/destination child IDs and may override route; omitted matches pair equal child IDs. Each matched pair independently uses a complete compatible mesh plan or a local safe cross-fade. Unmatched source children fade out and unmatched destination children fade in beneath generated IDs that exist only at interior samples. The outer group endpoint values are exact.

procedure

(transform-matching-mesh3d target 
  destination 
  [#:correspondence correspondence 
  #:topology topology 
  #:route route]) 
 → any/c
  target : spatial-path?
  destination : mesh3d?
  correspondence : (or/c #f mesh-correspondence3d?) = #f
  topology : (or/c 'require-equal 'cross-fade) = 'require-equal
  route : spatial-route3d? = (spatial-line-route3d)
Creates a scene-play request for the mesh3d at target. destination must preserve the target mesh’s spatial identity. With 'require-equal, an omitted plan is prepared at clip admission, then must prove a complete compatible topology; otherwise admission raises an explanation with the unmatched-plan diagnostics. With 'cross-fade, source and destination index arrays remain separate and fade under a temporary group. The final sample installs the exact destination mesh and leaves no temporary identity.

The runnable example is "examples/3d/transform-matching-polyhedra.rkt".

procedure

(transform-matching-mesh3d-request? value) → boolean?

  value : any/c
Recognizes a request created by transform-matching-mesh3d.

procedure

(transform-matching-spatial target    
  destination    
  [#:matches matches    
  #:route route]) → any/c
  target : spatial-path?
  destination : group3d?
  matches : (or/c #f (listof spatial-correspondence3d?)) = #f
  route : spatial-route3d? = (spatial-line-route3d)
Creates a scene-play direct face-part request. The group currently at target and destination must share their outer spatial identity; direct mesh child pairs are given by matches or equal child IDs. Matching children interpolate only after their own compatible plan is proved; unmatched or topology-changing children cross-fade. The final sample installs the exact destination group, with no generated child identities.

procedure

(transform-matching-spatial-request? value) → boolean?

  value : any/c
Recognizes a request created by transform-matching-spatial.

Limitations. Face-part matching currently requires an explicitly authored group3d with direct mesh3d face children, such as polyhedron-net3d-group. It does not split arbitrary triangle meshes into polygonal groups on demand, retarget arbitrary nested spatial trees, infer a graph isomorphism, or attach labels/strokes to faces. A route changes a part’s reference translation; it does not bend internal mesh topology. Use 'cross-fade for any whole-mesh topology change, unmatched part, or ambiguity.

procedure

(mesh3d-normals mesh) → (or/c #f vector?)

  mesh : mesh3d?
Returns optional immutable normals.

procedure

(mesh3d-colors mesh) → (or/c #f vector?)

  mesh : mesh3d?
Returns optional immutable colours.

procedure

(mesh3d-material mesh) → material3d?

  mesh : mesh3d?
Returns the surface material.

procedure

(mesh3d-wireframe-color mesh) → any/c

  mesh : mesh3d?
Returns the current edge colour.

procedure

(mesh3d-wireframe-width mesh) → positive-real?

  mesh : mesh3d?
Returns the cosmetic edge width.

procedure

(mesh3d-local-bounds mesh) → aabb3?

  mesh : mesh3d?
Returns bounds enclosing local vertices.