▼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:
aabb3
aabb3?
aabb3-minimum
aabb3-maximum
aabb3-empty
aabb3-empty?
aabb3-union
aabb3-from-points
aabb3-transform
aabb3-center
aabb3-size
aabb3-contains?
ray3
plane3
plane3?
plane3-point
plane3-normal
ray3-plane-hit
ray3-aabb-hit
ray3-triangle-hit
ray3-at
ray3-intersect-plane
ray3-intersect-aabb
ray3-intersect-triangle
9.3

85 3D: Bounds, rays, and planes🔗ℹ

3D reference map · First 3D picture

procedure

(aabb3 minimum maximum) → aabb3?

  minimum : (or/c #f vec3?)
  maximum : (or/c #f vec3?)
Constructs an inclusive axis-aligned box. Both corners must be vec3 values ordered coordinatewise, or both must be #f for the empty box.

procedure

(aabb3? value) → boolean?

  value : any/c
Recognizes a spatial AABB.

procedure

(aabb3-minimum bounds) → (or/c #f vec3?)

  bounds : aabb3?
Returns the lower corner or #f when empty.

procedure

(aabb3-maximum bounds) → (or/c #f vec3?)

  bounds : aabb3?
Returns the upper corner or #f when empty.
The empty AABB.

procedure

(aabb3-empty? bounds) → boolean?

  bounds : aabb3?
Reports whether bounds are empty.

procedure

(aabb3-union first second) → aabb3?

  first : aabb3?
  second : aabb3?
Returns their least enclosing AABB.

procedure

(aabb3-from-points points) → aabb3?

  points : (listof vec3?)
Returns enclosing bounds, or aabb3-empty for no points.

procedure

(aabb3-transform bounds map) → aabb3?

  bounds : aabb3?
  map : affine3?
Transforms all eight corners and encloses them.

procedure

(aabb3-center bounds) → vec3?

  bounds : aabb3?
Returns nonempty bounds’ centre; empty bounds raise an exception.

procedure

(aabb3-size bounds) → vec3?

  bounds : aabb3?
Returns nonempty bounds’ nonnegative size; empty bounds raise an exception.

procedure

(aabb3-contains? bounds point) → boolean?

  bounds : aabb3?
  point : vec3?
Tests inclusive containment.

struct

(struct ray3 (origin direction)
    #:transparent)
  origin : vec3?
  direction : vec3?
A ray (+ origin (* t direction)) for t at least zero. Its direction must be nonzero but is not normalized automatically.

procedure

(plane3 point normal) → plane3?

  point : vec3?
  normal : vec3?
Constructs a point-normal plane and normalizes its nonzero normal.

procedure

(plane3? value) → boolean?

  value : any/c
Recognizes a spatial plane.

procedure

(plane3-point plane) → vec3?

  plane : plane3?
Returns one point in the plane.

procedure

(plane3-normal plane) → vec3?

  plane : plane3?
Returns its normalized normal.

struct

(struct ray3-plane-hit (point distance)
    #:transparent)
  point : vec3?
  distance : nonnegative-real?
A forward ray-plane intersection.

struct

(struct ray3-aabb-hit (entry exit)
    #:transparent)
  entry : nonnegative-real?
  exit : nonnegative-real?
The inclusive ray-parameter interval inside an AABB.

struct

(struct ray3-triangle-hit (point distance barycentric normal)
    #:transparent)
  point : vec3?
  distance : nonnegative-real?
  barycentric : vec3?
  normal : vec3?
An exact, double-sided ray/triangle hit. barycentric holds the weights for the triangle’s first, second, and third vertices, and normal follows the triangle’s declared winding.

procedure

(ray3-at ray distance) → vec3?

  ray : ray3?
  distance : finite-real?
Returns the algebraic point at distance.

procedure

(ray3-intersect-plane ray plane) → (or/c #f ray3-plane-hit?)

  ray : ray3?
  plane : plane3?
Returns the nearest forward hit, or #f when parallel or behind the origin.

procedure

(ray3-intersect-aabb ray bounds) → (or/c #f ray3-aabb-hit?)

  ray : ray3?
  bounds : aabb3?
Returns forward entry/exit parameters, or #f for no hit.

procedure

(ray3-intersect-triangle ray    
  first    
  second    
  third) → (or/c #f ray3-triangle-hit?)
  ray : ray3?
  first : vec3?
  second : vec3?
  third : vec3?
Returns the nearest exact forward intersection with the finite triangle, or #f. Both windings are pickable; renderer back-face culling is a separate display decision.