▼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:
affine3
affine3?
affine3-linear
affine3-translation
identity-affine3
affine3-compose
affine3-invert
affine3-apply-point
affine3-apply-vector
affine3-normal-transform
affine3-lerp
transform3
make-transform3
identity-transform3
transform3->affine3
transform3-compose
transform3-apply-point
transform3-lerp
9.3

84 3D: Affine transforms🔗ℹ

3D reference map · First 3D picture

procedure

(affine3 linear translation) → affine3?

  linear : linear3?
  translation : vec3?
Constructs a full affine map. It can represent shear, reflection, and singular linear maps exactly.

procedure

(affine3? value) → boolean?

  value : any/c
Recognizes a full affine map.

procedure

(affine3-linear map) → linear3?

  map : affine3?
Returns the linear component.

procedure

(affine3-translation map) → vec3?

  map : affine3?
Returns the translation component.
The identity affine map.

procedure

(affine3-compose outer inner) → affine3?

  outer : affine3?
  inner : affine3?
Composes maps as outer ∘ inner.

procedure

(affine3-invert map) → affine3?

  map : affine3?
Returns the inverse; singular maps raise an exception.

procedure

(affine3-apply-point map point) → vec3?

  map : affine3?
  point : vec3?
Applies both linear component and translation.

procedure

(affine3-apply-vector map value) → vec3?

  map : affine3?
  value : vec3?
Applies only the linear component.

procedure

(affine3-normal-transform map) → linear3?

  map : affine3?
Returns the inverse-transpose normal map.

procedure

(affine3-lerp from to progress) → affine3?

  from : affine3?
  to : affine3?
  progress : (and/c finite-real? (>=/c 0) (<=/c 1))
Interpolates corresponding matrix entries and translation, with exact endpoints.

struct

(struct transform3 (translation rotation scale)
    #:transparent)
  translation : vec3?
  rotation : rotation3?
  scale : vec3?
An author-oriented transform with nonzero scale components. It applies local scale, then rotation, then translation. Negative scale is allowed, but an interpolation that would cross a zero scale is rejected.

procedure

(make-transform3 [#:translation translation    
  #:rotation rotation    
  #:scale scale]) → transform3?
  translation : vec3? = origin3
  rotation : rotation3? = identity-rotation3
  scale : vec3? = (vec3 1 1 1)
Constructs a validated decomposed transform.
The decomposed identity transform.

procedure

(transform3->affine3 transform) → affine3?

  transform : transform3?
Converts a decomposed transform to an exact affine map.

procedure

(transform3-compose outer inner) → affine3?

  outer : transform3?
  inner : transform3?
Composes transforms as an affine3, retaining shear that arbitrary nonuniform-scale composition can induce.

procedure

(transform3-apply-point transform point) → vec3?

  transform : transform3?
  point : vec3?
Applies scale, rotation, then translation.

procedure

(transform3-lerp from to progress) → transform3?

  from : transform3?
  to : transform3?
  progress : (and/c finite-real? (>=/c 0) (<=/c 1))
Interpolates translation, scale, and shortest-arc rotation with exact endpoints.