▼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:
polyhedral-plane3d
polyhedral-source-face-id3d
polyhedral-face-declaration3d
polyhedral-face3d
polyhedral-complex3d
polyhedral-complex3d?
polyhedral-complex3d-source-mesh
polyhedral-complex3d-analysis-mesh
polyhedral-complex3d-source-transform
polyhedral-complex3d-mesh
polyhedral-complex3d-topology
polyhedral-complex3d-faces
polyhedral-complex3d-edge-to-faces
polyhedral-complex3d-vertex-to-faces
polyhedral-complex3d-diagnostics
9.3

105 3D: Polygonal faces🔗ℹ

3D reference map · First 3D picture

struct

(struct polyhedral-plane3d (normal offset)
    #:transparent)
  normal : vec3?
  offset : finite-real?
A transformed unit-normal plane with equation normal . point = offset.

struct

(struct polyhedral-source-face-id3d (triangle-index)
    #:transparent)
  triangle-index : exact-nonnegative-integer?
The transparent generated identity of an automatically grouped face. It names the least source triangle rather than hiding provenance in a hash string.

struct

(struct polyhedral-face-declaration3d (id triangle-indices)
    #:transparent)
  id : symbol?
  triangle-indices : (or/c vector? list?)
An explicit polygonal face declaration. All declarations together must partition the mesh’s source triangles exactly once.

struct

(struct polyhedral-face3d (id
    triangle-indices
    boundary-vertex-indices
    normal
    plane
    centroid
    area
    provenance)
    #:transparent)
  id : any/c
  triangle-indices : vector?
  boundary-vertex-indices : (or/c #f vector?)
  normal : (or/c #f vec3?)
  plane : (or/c #f polyhedral-plane3d?)
  centroid : (or/c #f vec3?)
  area : nonnegative-real?
  provenance : hash?
One mathematical polygonal face over one or more render triangles. A simple boundary is a cyclic immutable vertex-index vector. It is #f when the region has multiple loops, branches, or repeated boundary vertices; the enclosing complex retains the diagnostic rather than choosing a false polygon.

procedure

(polyhedral-complex3d mesh 
  [#:faces faces 
  #:coplanar-angle angle 
  #:plane-distance distance]) 
 → polyhedral-complex3d?
  mesh : mesh3d?
  faces : any/c = #f
  angle : nonnegative-real? = 1e-7
  distance : nonnegative-real? = 1e-7
Builds an immutable mathematical-face complex. With #:faces #f (the default) or 'coplanar, it merges only edge-connected, consistently oriented render triangles whose world-space planes agree within the stated angle (in radians) and distance tolerances. The source mesh is retained for provenance; all mathematical calculations use an immutable world-space analysis mesh with an identity transform.

Use 'triangles to retain every render triangle as a face. An explicit partition is a list/vector of polyhedral-face-declaration3d values or concise (face-id triangle-index ...) lists; explicit declarations always override automatic merging.

procedure

(polyhedral-complex3d? value) → boolean?

  value : any/c
Recognizes a polygonal-face complex.

procedure

(polyhedral-complex3d-source-mesh complex) → mesh3d?

  complex : polyhedral-complex3d?
Returns the unchanged authored mesh whose stable part identities are the source of the complex’s provenance.

procedure

(polyhedral-complex3d-analysis-mesh complex) → mesh3d?

  complex : polyhedral-complex3d?
Returns the immutable world-space mesh used for planes, topology, duals, Schlegel diagrams, and nets. Its local transform is identity-transform3. A reflected source transform is baked with reversed triangle winding so geometric normals remain consistent.
Returns the authored local-to-world transform recorded before analysis-space baking.

procedure

(polyhedral-complex3d-mesh complex) → mesh3d?

  complex : polyhedral-complex3d?
Returns the analysis mesh. New code should use polyhedral-complex3d-source-mesh or polyhedral-complex3d-analysis-mesh to state which coordinate space it needs.
Returns the triangle topology used to build the complex.

procedure

(polyhedral-complex3d-faces complex) → vector?

  complex : polyhedral-complex3d?
Returns faces in deterministic least-source-triangle order.

procedure

(polyhedral-complex3d-edge-to-faces complex) → vector?

  complex : polyhedral-complex3d?
Returns one immutable polygonal-face-index vector per topological edge. A render diagonal inside a grouped square has one incident polygonal face.

procedure

(polyhedral-complex3d-vertex-to-faces complex) → vector?

  complex : polyhedral-complex3d?
Returns one immutable polygonal-face-index vector per source vertex.

procedure

(polyhedral-complex3d-diagnostics complex) → hash?

  complex : polyhedral-complex3d?
Returns the construction mode, tolerances, inherited triangle-topology diagnostics, and per-face boundary reports. 'invalid-face-indices identifies regions that are not simple polygons.

Limitations. Polygonal-face construction groups only existing triangles; it neither repairs nonmanifold/self-intersecting input nor creates a polygonal approximation. A region with holes is retained and diagnosed, but does not yet expose a usable multi-loop polygon. This constructor does not triangulate holes, construct duals, Schlegel diagrams or nets, or create face-transform animations.