▼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:
view3d
view3d?
view3d-children
view3d-width
view3d-height
view3d-camera
view3d-lights
view3d-light-ref
view3d-light-replace
view3d-light-update
view3d-background
view3d-tone-map
view3d-render-mode
view3d-transparency-mode
view3d-spatial-ref
view3d-spatial-has?
view3d-spatial-replace
view3d-spatial-update
9.3

76 3D: Views inside a Scene🔗ℹ

3D reference map · First 3D picture

procedure

(view3d children    
  #:id id    
  [#:center center    
  #:width width    
  #:height height    
  #:rotation rotation    
  #:scale scale    
  #:opacity opacity    
  #:camera camera    
  #:lights lights    
  #:background background    
  #:tone-map tone-map    
  #:render-mode render-mode    
  #:transparency-mode transparency-mode]) → view3d?
  children : (listof spatial-visual?)
  id : symbol?
  center : vec2? = origin
  width : positive-real? = 12
  height : positive-real? = 27/4
  rotation : finite-real? = 0
  scale : (or/c positive-real? vec2?) = 1
  opacity : (and/c real? (between/c 0 1)) = 1
  camera : camera3d? = (perspective-camera3d)
  lights : (listof light3d?) = null
  background : any/c = "white"
  tone-map : tone-map3d? = default-tone-map3d
  render-mode : (or/c 'wireframe 'opaque) = 'wireframe
  transparency-mode : (or/c 'object-sorted 'triangle-sorted)
   = 'triangle-sorted
Creates the boundary between a normal two-dimensional Scene and a spatial tree. Its position, rotation, scale, opacity, and placement act as they do for other ordinary Visuals. 'wireframe retains the initial clipped-edge adapter. 'opaque uses a deterministic software triangle renderer: six-plane frustum clipping, CCW front-face culling (unless a material is double-sided), pixel-centre rasterization, and a z-buffer. An empty lights list uses a deterministic ambient-plus-directional default. Every explicit light ID must be distinct. Lights live in the view’s immutable frame state, not in its spatial tree. When material or effective spatial opacity is below one, transparent triangles are composited after the opaque depth-writing pass using the selected explicit sorting mode.

procedure

(view3d? value) → boolean?

  value : any/c
Recognizes a 2D viewport Visual containing a spatial tree.

procedure

(view3d-children view) → (listof spatial-visual?)

  view : view3d?
Returns direct spatial children.

procedure

(view3d-width view) → positive-real?

  view : view3d?
Returns local 2D viewport width.

procedure

(view3d-height view) → positive-real?

  view : view3d?
Returns local 2D viewport height.

procedure

(view3d-camera view) → camera3d?

  view : view3d?
Returns the spatial camera.

procedure

(view3d-lights view) → list?

  view : view3d?
Returns immutable light declarations.

procedure

(view3d-light-ref view id) → light3d?

  view : view3d?
  id : symbol?
Returns the unique authored light with id.

procedure

(view3d-light-replace view id replacement) → view3d?

  view : view3d?
  id : symbol?
  replacement : light3d?
Returns a view with one light replaced. replacement must retain id.

procedure

(view3d-light-update view id update) → view3d?

  view : view3d?
  id : symbol?
  update : procedure?
Applies an immutable same-ID update to one authored light.

procedure

(view3d-background view) → any/c

  view : view3d?
Returns the opaque viewport background.

procedure

(view3d-tone-map view) → tone-map3d?

  view : view3d?
Returns the immutable linear-light final output policy.

procedure

(view3d-render-mode view) → (or/c 'wireframe 'opaque)

  view : view3d?
Returns the renderer mode.

procedure

(view3d-transparency-mode view)

 → (or/c 'object-sorted 'triangle-sorted)
  view : view3d?
Returns its transparent-pass ordering policy.

procedure

(view3d-spatial-ref view path) → spatial-visual?

  view : view3d?
  path : spatial-path?
Resolves a path rooted with the outer view identity, such as '(world cube).

procedure

(view3d-spatial-has? view path) → boolean?

  view : view3d?
  path : any/c
Reports whether a rooted spatial path exists.

procedure

(view3d-spatial-replace view    
  path    
  replacement) → view3d?
  view : view3d?
  path : spatial-path?
  replacement : spatial-visual?
Returns a view with one same-identity descendant replaced.

procedure

(view3d-spatial-update view path update) → view3d?

  view : view3d?
  path : spatial-path?
  update : procedure?
Applies an immutable same-identity update to a descendant.