# 3D engine This is the canonical description of the current 3D renderer and its remaining architectural work. The goal is production-grade mathematical plotting with Desmos-class fidelity and interaction, at a configurable tradeoff between quality, time, and memory. Comparative superiority requires measured results; it is not established by the current implementation or the review below. [Shared architecture](architecture.md) covers the mathematical/document model. [Performance measurement](performance-measurement.md) owns browser procedures, telemetry interpretation, and regression-reference maintenance. ## Current architecture `Calculator3dShell` sends immutable graph documents through a dedicated scene worker to the Rust engine via Wasm. The worker packs geometry into transferable typed arrays. `Scene3dPresentationController` admits and merges results; `GraphCanvas3d` and `CanvasRenderer3d` retain Three.js/WebGL2 resources and present camera changes independently of worker completion. ### Mathematical forms and representations | Input | Representation and current scope | | --- | --- | | `z=f(x,y)` or a bare scalar expression | GPU-evaluated height surface when admitted; otherwise retained CPU height patches | | Equality `F(x,y,z)=0`, including `y=f(x,z)` | Implicit surface meshes in stable dyadic world cells | | One `<`, `<=`, `>`, or `>=` comparison | Signed-field boundary in distinct `solid_mesh` resources | | Three-coordinate parametric expression | Curve with 1,025 uniform samples, or surface with a 65×65 grid when exactly two finite parameter domains are supplied | | Constant three-coordinate point | Retained point geometry | | `vector(v)` or `vector(tail, displacement)` | Finite length-3 sequences or N×3 matrix rows; anchored tip is `tail + displacement` | | Anchored vector with one to three finite domains | Fixed nine-per-axis field, at most 729 samples; undefined samples skipped | Vector collections support one-row broadcasting and zero displacement as a point marker. These semantics are part of existing documents: any future start/end vector convention needs an explicit operation or versioned migration. Curves use line-box clipping and asymptote-gap protection; they are not yet generally adaptive. Parametric surfaces use finite-sample filtering and mesh normals. Bounds clipping of meshes is performed by renderer clipping planes. ### Complex mode contract The 3D graph settings include an opt-in `complex_mode` contract. When enabled, `i` is the imaginary unit and scalar arithmetic, user functions, and supported analytic functions can carry complex intermediates. `real`, `imag`, `conj`, `arg`, and `abs` provide explicit projections. A 3D coordinate or comparison still has to end in a finite real value; a complex final `x`, `y`, or `z` is undefined rather than silently projected. Vector coordinates, restrictions, sliders, sequences, matrices, and `nthroot` remain real-only at their graph boundary. Complex logarithms, powers, square roots, and inverse trigonometric functions use principal branches. Branch cuts and singularities are therefore visible discontinuities and can cause samples or local geometry to be omitted. The complex setting is part of mathematical identity and invalidates retained geometry when toggled. Complex-capable expressions use CPU sampling; scalar GLSL shaders do not evaluate complex values and are not used as a complex acceleration path. Expressions that are provably real can retain the ordinary GPU preview policy, while turning the mode off preserves the existing real fast path. Single-comparison solids are opaque, double-sided, depth-tested boundary shells. Strict and non-strict comparisons have the same geometric boundary. Separate rows remain separate solids. Compound intersections, restriction-contributed faces, box caps, and interior-aware volume rendering are not implemented. ### Identity, caching, and publication - Model revisions identify mathematical changes: source, dependencies, and slider values. Coverage revisions independently identify changed plot bounds. Request revisions prevent stale asynchronous publication. - Implicit cache identity uses expression field plus an origin-anchored dyadic world cell. Bounds changes reuse overlaps, preserve geometry IDs, and restamp coverage revisions. Prepared evaluators and gradients survive bounds edits. The implicit LRU is bounded by both 64 MiB and 4,096 entries, including empty results. Field changes prune obsolete cells. - Explicit patch and other whole-scene cache signatures include bounds coverage. Explicit roots subdivide the current scene bounds; they are not the same origin-anchored spatial partition as implicit cells. Topology/routing policy versions participate in explicit sampling identity. - Empty refinement results explicitly remove their coarse predecessors. Mixed levels and representations require defined replacement ownership; complete atomic groups prevent overlap, gaps during publication, and partial upgrades. - Normal requests publish a preview, then frame-batched q1 results. Implicit q2 replacements are buffered for atomic publication; optional q3 follows without keeping the settled UI busy. Compatible bounds-only transitions stage their preview and q1/q2 work privately while the previous scene stays visible, then publish at q2. A staged preview with no targets can publish immediately. - Supersessions are typed cancellations. Queued cancellations are acknowledged so pending requests cannot leave the shell busy. The worker yields between synchronous patch/cell builds, not within a Wasm build. Optional failed or stale upgrades retain the compatible predecessor; initial-build errors are reported normally. ### Explicit surfaces The semantic analyzer distinguishes smooth surfaces, continuous features, domain boundaries, discontinuities, and unknown semantics. It records critical sets and meshable zero carriers separately from viewport candidate detection. Its domain analysis uses sign and interval information, but is not a general certified local meshing oracle. GPU resources carry symbolic value GLSL, optional derivatives, and scalar uniforms. The renderer shares a 257×257 preview lattice and a 513×513 settled lattice. After 200 ms without a mathematical change, renderer-local LOD can switch geometry without worker resampling or shader reconstruction. Camera and color changes retain LOD; a failed settled allocation retains the preview for that mathematical signature. New GPU resources use either `exact` or `interpolated` depth. Exact admission requires suitable semantic/domain analysis and a bounded 17×17 coverage probe with interstitial checks. Continuous creases and finite interpolation/normal risks use ordinary interpolated raster depth. Non-finite or inconclusive admission routes to CPU geometry. `guarded` remains a compatibility mode for old resources. Exact fragment-depth correction discards corrections displaced by more than 0.75 drawing-buffer pixels; it cannot create missing coverage. Optimistic uniform updates temporarily disable exact correction until the authoritative scene confirms admission. The analyzer treats `sqrt(abs(g))` and positive finite non-integer powers `abs(g)^p` as continuous crease carriers when the signed carrier `g` is supported. Their interaction preview therefore remains GPU-backed with interpolated depth; these expressions are never granted exact fragment-depth correction. After the 200 ms quiet period, the existing settled transaction builds the complete sixteen-patch feature group and may replace it atomically with the side-aware CPU mesh (including the bounded all-64 q2 child group). Coarse or rounded cusp valleys during dragging are an intentional limitation of the preview. A singular, domain-restricted, unknown, non-finite, or invalid parameter form keeps its conservative CPU route instead of being promoted by the cusp recognizer. Rounded GPU cusp previews are enabled by default, with no user setting or saved configuration. The measurement harness can toggle them for A/B checks without changing the document. Their optional versioned shader payload supports `sqrt(abs(g))` and constant `abs(g)^p`, `0 < p < 1`, with one distinct smooth signed carrier (at most four cusp occurrences and an 8 KiB payload). Other features, unknown versions, and legacy resources retain their existing preview. It does not broaden GPU admission. The approximation replaces the cusp bottom within a local half-cell carrier width with a quadratic joined in value and slope to the original power. Width comes from four corner probes and follows the active GPU lattice. Invalid approximation samples fall back to the original height. Interpolated vertex normals use centered differences of that same approximation; original singular analytic normals are bypassed. Depth stays interpolated, and the rounded GPU resource remains eligible for the existing atomic sharp CPU replacement. The probes are a bounded approximation, not a guarantee for sub-grid features. Software-WebGL captures show reduced valley spikes, and manual hardware testing confirmed that dragging remains fast. This is not a cross-device performance guarantee; the measurement guide describes further timing checks. The current sharp settled meshes are unchanged. CPU height surfaces use a 4×4 root partition with shared 33-point outer edges. Ordinary preview leaves are coarse; q1 applies bounded, balanced quadtree refinement using height interpolation error and normal variation. Feature patches visit the fine lattice, bisect carrier roots, construct side polygons, and split normals at creases. Domain-boundary cells use a bounded 5×5 local probe so a valid sliver between retained lattice rows is not discarded; the probe evaluates its midpoints rather than aliasing them to neighboring cells. Unsupported contour configurations and singular break cells can still be omitted. A specialized radial square-root sampler handles recognized origin-centered disks. Supported GPU-backed continuous creases have an additional settled path. It requires only supported crease carriers, no deferred semantics, and a visible carrier candidate. The worker privately builds all sixteen canonical roots. Initial settlement admits a complete expression only with all sixty-four q2 children; otherwise its GPU preview remains. Publication replaces the entire expression atomically. Coarse-to-fine edge and corner polygons are preflighted and triangulated counter-clockwise in the x/y parameter plane; an invalid transition or exhausted mesh budget rejects the adaptive child instead of publishing partial coverage. Override-only edits restore cached GPU uniforms before new settlement; color-only edits reuse geometry. Later camera upgrades can select retained roots, and a bounded q3 pass can replace eligible q2 parents. The optional settled path remains GPU-only without a Worker. | Refinement path | Current admission and lattice budget | | --- | --- | | Ordinary CPU explicit q2 | At most four roots above the projected-error gate, each replaced by four 33×33 children; 17,424 lattice points | | Settled continuous-crease roots | Complete sixteen-root group; 17,424 lattice points | | Initial settled crease q2 | All sixteen roots' four children; up to 69,696 additional lattice points within the global admission budget | | Settled crease q3 | At most four eligible q2 parents, four 33×33 grandchildren each; 17,424 additional lattice points | Ordinary CPU adaptive admission accepts ordinary, crease, and domain-boundary feature kinds when the remaining error gate warrants a target. Break and mixed roots remain at q1 until their topology has a dedicated representation. Explicit child transitions share canonical parent samples with 2:1 boundary spacing; deeper admission excludes parents requiring unsupported transitions. Feature patches cap output at 8,192 vertices and 4,096 triangles. These are work/size limits, not accuracy guarantees. Lattice counts exclude extra carrier, midpoint, and gradient work. Optional explicit-mesh derivative/carrier shaders provide fragment-local analytic lighting normals away from features. Mesh geometry remains authoritative for position, depth, coverage, and split normals at carriers. ### Implicit surfaces The longest bounds span selects a dyadic level targeting four world cells; there are at most five intersecting cells per axis. Each cell samples a scalar field and polygonizes it with a tetrahedral decomposition. | Quality | Samples per cell | Role | | --- | --- | --- | | q0 | 9³ | Immediate preview | | q1 | 17³ | Settled base refinement | | q2 | 33³ | Selective same-level or adaptive child refinement | | q3 | 65³ | Optional adaptive child refinement | The worker seeds q2 from nonempty geometry and admits bounded adaptive groups from q1 interpolation/sign-change estimates, at most eight parent splits per expression. Each split replaces a parent with eight children. A refined child owns its coarse/fine transition slab; face-local tetrahedral stencils join a bilinearly reconstructed coarse face to fine interior samples. Halving the cell extent while increasing lattice density creates a 4:1 sampling ratio. Before polygonization, each sign-changing lattice voxel is checked against the local domain/interval contract. A restricted or non-finite voxel is omitted, while other voxels in the same dyadic cell remain eligible. Transition macrocells receive the same one-time guard, so a pole cannot become a false sheet merely because finite samples have opposite signs. Non-finite or restricted subregions are counted in the scene's coverage report. q3 admits at most one q2 parent group: eight children and 2,197,000 lattice points. Candidates must clear the stricter error threshold and have no existing q1 transition mask. After camera settlement, a silent q3-only request can rank retained candidates by estimated error and projected size; ordinary camera motion remains local presentation. Further depth and general neighbor transitions are not implemented. ### Camera, appearance, and persistence Plot bounds and the perspective camera are independent. The graph settings include the opt-in Complex mode contract described above, persisted with the authored document. Wheel input dollies; Shift+wheel and bounds controls change the mathematical ranges. Fit camera targets the bounds without changing them. Camera settlement can request optional refinement, but interaction does not wait for it. All shaded surfaces share the renderer's non-metallic physical material and roughness policy. `sun` uses world-space key/fill lighting; `readable` uses camera-relative lighting. Lighting changes do not change mathematical identity. `DocumentPresentation3dV1` stores a validated semantic perspective camera (position, target, up, field of view) and a versioned lighting preset, `sun-v1` or `readable-v1`. It stores no Three.js matrices, light objects, or DOM dimensions. Authored presentation requires a lighting preset; absent presentation defaults to Sun. Camera/lighting round-trip through durable and working documents, files, and optional V2 publication data without updating the mathematical content timestamp. Exports use the selected presentation. ## Coverage contract and measured geometry Every explicit GPU surface, explicit mesh patch, and implicit cell now emits a `surface_region_reports` entry. The report carries the expression and representation, stable region identity, quality, model/coverage revisions, world bounds, estimated error, and an outcome: - `resolved`: geometry exists and no known local omissions remain; - `proven_empty`: for an implicit cell, directed interval evaluation excludes the zero set; - `unresolved`: domain crossing, unsupported/hidden topology, non-finite samples, or a bounded output omission remains. `unresolved_subregions` is an actual count of omitted sign-changing implicit voxels/transition macrocells or explicit feature cells, rather than a proxy for whether a resource happened to contain triangles. The report is advisory coverage state, not a claim of pixel-accurate geometry. Reports are serialized through Wasm and merged in the browser under the same model/coverage revision fences as geometry; settled groups replace their report set atomically. The named-preset measurements below were rerun against the current working tree after the boundary/domain-report slice. They use a fresh `IncrementalScene3d`, `build_scene_at_quality(..., 1)`, and the bounds shown. They measure referenced mesh vertices, not browser timings or comparisons against Desmos. `a := 1` is substituted where applicable. ### Native mesh evidence Bounds below are ordered x, y, z. These are CPU mesh observations, not GPU timings, new browser captures, or comparisons against Desmos. | Expression | Bounds | Quality-1 result and coverage report | | --- | --- | --- | | `z=log(abs(sin(x*y)))` | `[-10,10]`, `[-10,10]`, `[-10,10]` | 16 mesh patches, 23,856 triangles, referenced z about `[-0.917845, 0]`; all 16 reports remain unresolved (`domain_crossing`, `hidden_topology`), with no adaptive targets | | `z=1/(x*y)` | `[-10,10]`, `[-10,10]`, `[-10,10]` | 16 mesh patches, 63,376 triangles, referenced z about `[-8.192, 8.192]`; 12 of 16 reports have unresolved axis-crossing subregions, with no adaptive targets | | `z=log(25-x^2-y^2)` | `[-6,6]`, `[-6,6]`, `[-8,4]` | 16 mesh patches, 34,704 triangles, referenced z about `[-0.790192, 1.397940]`; 12 of 16 reports remain unresolved at the radial domain boundary, with no adaptive targets | | `z=3*sqrt(1-(x-2)^2/16-(y+1)^2/9)` | `[-3,7]`, `[-5,3]`, `[-1,4]` | 16 mesh patches, 38,052 triangles, z in `[0,3]`; all reports resolve and 16 adaptive targets are exposed. Coverage now exists at `(2,1.95)` (`0.5444` vs true `0.5454`) and `(2,1.99)` (`0.1957` vs true `0.2447`), but near-boundary height accuracy remains visibly insufficient | | `1/(x-0.1)=0` | `[-1,1]`, `[-1,1]`, `[-1,1]` | 0 triangles; 64 cell reports identify unresolved domain-crossing slabs, and no false zero sheet or adaptive target is emitted | All these builds returned no diagnostics and `sampling_budget_exhausted=false`. Measure height extrema over vertices referenced by mesh indices, excluding unused vertices. The hemisphere coverage checks project each triangle into x/y and test barycentric containment of the query point. The current microgrid finds both formerly missing points; the remaining height residual is a parameterization/accuracy issue, and precise browser appearance still depends on camera and lighting. ### Causes and architectural implications 1. **Unresolved topology still becomes omitted geometry.** `feature_cell_decision` discards singular/near-zero break cells and unrepresentable contour cases. The templates cannot generally handle hidden loops, multiple carriers, branching junctions, or degenerate crossings. The bounded hemisphere probe repairs the previously observed lattice-aligned coverage notch, but its near-boundary residual shows that coverage and height accuracy need separate gates. 2. **Refinement is now available for domain boundaries, but not every hard topology.** `explicit_surface_adaptive_kind_is_eligible` admits ordinary, crease, and domain-boundary patches. Break and mixed features remain at q1, and the current feature error proxy is not yet a screen-space accuracy estimate. 3. **Domain and display bounds are conflated with validity filters.** Explicit samples outside an expanded z range become invalid; cells can be dropped before renderer clipping. There is no general construction of the actual intersection `f(x,y)=z_min` or `f(x,y)=z_max` along a singular branch. 4. **Implicit sign changes now require local continuity/domain evidence.** `polygonize_implicit_tetrahedron` still works from sampled values, but each sign-changing voxel and transition macrocell is admitted only when the directed interval/domain analysis proves it safe. A pole between samples is consequently reported and omitted instead of becoming a false sheet. The guard is conservative only for operations understood by the analyzer; unsupported analysis remains unresolved. 5. **Coverage is reported, not conflated with accuracy.** Fixed pass limits, omitted cells, and exhausted local templates can still leave visible error. Reports now expose unresolved counts and revision identity so the scheduler can demand more work without treating `sampling_budget_exhausted` or a nonempty mesh as success. They do not yet provide a screen-space accuracy certificate. ## Architectural priority The next major work is a domain- and boundary-aware adaptive surface system with explicit error and budget accounting. Preserve retained resources, revision fences, packed transfer, and atomic replacement. Share mathematical and scheduling contracts across meshers without forcing every plot family through the same polygonization algorithm. ### Delivered in the current boundary/report slice The first delivery boundary is now implemented for the named failure family: directed local interval/domain analysis, per-voxel implicit guards, guarded transition macrocells, bounded 5×5 domain-boundary micro-tessellation, DomainBoundary adaptive eligibility, explicit unresolved counts, and revision-fenced Wasm/TypeScript report publication. The pole, translated hemisphere coverage, poles lying exactly on shared dyadic boundaries, pole-bearing transition cells, cached-cell reports, legacy serde, and browser merge regressions are covered by focused tests. ### Next architectural slice #### 1. A local domain and boundary contract Extend the existing semantic/sign/interval analysis into per-region queries: defined domain, possible critical sets, continuity/root evidence, conservative value bounds where supported, and explicit uncertainty. Finite sparse probes alone are not proof that a feature is absent. Unsupported operations or loose bounds must remain uncertain; any certification claim also needs appropriate floating-point enclosure handling. The current report is the first contract surface, but its explicit-height interval is not yet a visible-surface proof and its continuity confidence is not yet consumed by all schedulers. Distinguish resolved geometry, proven empty regions, and unresolved regions across explicit, implicit, and parametric representations. Carry unresolved reasons and coverage estimates into refinement demand. Construct domain contours and visible box-intersection contours, separate singular branches, and retain shared edge/root identities across patches. Tangencies and roots on lattice edges/vertices need deterministic ownership. Clipping an open surface does not imply inventing a cap; closed-solid caps are a separate mathematical/presentation policy. Extend the same continuity/domain contract to parametric root extraction, restrictions, and compound predicates. Add branch-aware boundary ownership and shared roots across patch and representation boundaries. ### 2. Parameterizations suitable for steep geometry Additional x/y quadtree depth alone is an inefficient solution for near-vertical walls. Cartesium's one-argument `log` is base 10. At the crater's `z=-8` limit: ```text 25 - x² - y² = 10⁻⁸ ``` The contour is about `10⁻⁹` world units inside the radius-five circle. The wall occupies a substantial visible height despite that tiny radial interval. Support boundary-aligned sampling, height-based sampling, or local changes of surface parameterization when the height field becomes poorly conditioned. A well-conditioned implicit representation may help selected expressions; algebraic lowering must preserve domains, excluded points, and branches. Stable evaluation and local coordinates matter when differences fall below world-coordinate float precision. The radial square-root path illustrates the value of suitable coordinates, but a production contract should also cover translated, stretched, and general boundaries. ### 3. Refinement driven by error and available work Generalize the existing view gates into a continuing scheduler. A patch needs geometric error, boundary/coverage uncertainty, visibility, estimated cost, model/coverage identity, and atomic replacement ownership. Estimate error in screen space, including silhouettes and boundaries; a projected vertical residual alone cannot measure every missing or incorrect connection. After refinement, recompute error and keep useful work eligible until the target is met or its budget is exhausted. Interaction, settled viewing, and exports can choose different tolerances and work budgets. Retain compatible valid predecessors when an optional upgrade fails; report remaining uncertainty instead of treating a pass count as success. Cost accounting should include carrier/gradient/root work, polygonization, transfer, and retained memory, not only nominal lattice samples. General neighbor balancing and shared boundary ownership must accompany deeper refinement. Keep atomic groups small where topology permits; a local CPU/GPU hybrid also needs explicit seam and ownership rules. Expensive builds need resumable chunks or cancellation checkpoints within a cell/patch, since yielding only between builds cannot bound supersession latency. ### 4. Independent quality validation Add coverage and geometric accuracy oracles alongside integrity, topology, fingerprints, and diagnostic screenshots: - True surface samples absent from the mesh, false roots/bridges, boundary displacement, and silhouette error. - Translation, axis permutation, rotation, scaling, bounds changes, and mathematically equivalent explicit/implicit forms. These expose dependence on lattice alignment, recognizers, and field scaling. - Error convergence as budgets grow, plus first-visible/settled latency, cancellation latency, peak memory, and work spent on unresolved regions. - Narrow and oscillatory features, domain boundaries, poles, junctions, and nearly vertical sheets across deterministic cameras and slider values. - Browser/WebGL shader and context-failure coverage, with reference captures and comparable time/memory when evaluating another plotting engine. Topology expectations must match the mathematics: open boundaries and genuine singularities are not all closed manifolds. The current browser corpus has structural/fingerprint checks, explicit height-mesh x/y orientation checks, and optional welded topology, but not a general coverage or image-accuracy oracle. Keep measurement implementation details in the [measurement guide](performance-measurement.md). The next slice should turn the report into demand: schedule unresolved regions and screen-space error together, preserve atomic ownership across neighboring levels, and extend the same contract to parametric surfaces and curves. More lighting adjustments or another fixed refinement tier are lower priority than this geometry work. ## Other compatibility and product gaps These remain useful work, but do not supersede the geometry priority above: - Restrictions and compound solids: shared scalar predicates, contributing boundary faces, and explicitly defined cap/interior semantics. - Expression coverage: cylindrical/spherical lowering, tuple restrictions, common primitives (`segment`, `triangle`, `sphere`), and list/table-driven 3D points. Preserve versioned vector semantics. - Appearance: an expression appearance contract beyond flat color, including opacity, point/line styling, coordinate-based color, and transparency ordering. - Presentation: projection controls, canonical orientations, axes/grid/cube, labeled ticks, and angle mode. - Mathematical interaction: picking, coordinates, labels, movable points, slices, intersections, normals, and gradients. - Adaptive vector density, streamlines, magnitude styling, and broader vector corpus coverage beyond the current vortex scenario. - 3D slider playback, typeset editing, tables, folders/notes, and accessibility. Extend the shared document, publication, and storage-provider boundaries for new capabilities; do not introduce parallel 3D persistence formats. Release claims should match tested plot families and failure behavior, with local/file/ publication round trips and supported-browser checks. A production-quality claim additionally needs the geometric accuracy gates above. ## Implementation map and references | Concern | Source | | --- | --- | | 3D facade and stable public contracts | [three_d.rs](../crates/cartesium-core/src/scene/three_d.rs), [types.rs](../crates/cartesium-core/src/scene/three_d/types.rs) | | Scene preparation, building, revisions, and caches | [builder.rs](../crates/cartesium-core/src/scene/three_d/builder.rs), [cache.rs](../crates/cartesium-core/src/scene/three_d/cache.rs) | | Expression resolution and regional demand/reporting | [resolve.rs](../crates/cartesium-core/src/scene/three_d/resolve.rs), [demand.rs](../crates/cartesium-core/src/scene/three_d/demand.rs) | | Implicit, explicit, and other geometry sampling | [implicit.rs](../crates/cartesium-core/src/scene/three_d/implicit.rs), [explicit.rs](../crates/cartesium-core/src/scene/three_d/explicit.rs), [parametric.rs](../crates/cartesium-core/src/scene/three_d/parametric.rs) | | GPU shader lowering and coverage admission | [gpu.rs](../crates/cartesium-core/src/scene/three_d/gpu.rs) | | Feature and domain semantics | [explicit_surface_foundation.rs](../crates/cartesium-core/src/scene/three_d/explicit_surface_foundation.rs) | | Browser demand and atomic target selection | [scene3d-targets.ts](../apps/web/src/lib/engine/scene3d-targets.ts), [scene3d-view.ts](../apps/web/src/lib/engine/scene3d-view.ts) | | Worker execution and packed transfer | [scene3d.worker.ts](../apps/web/src/lib/engine/scene3d.worker.ts), [packed-scene3d.ts](../apps/web/src/lib/engine/packed-scene3d.ts) | | Publication and replacement | [scene3d-presentation-controller.ts](../apps/web/src/lib/engine/scene3d-presentation-controller.ts), [scene3d-merge.ts](../apps/web/src/lib/engine/scene3d-merge.ts) | | GPU geometry, materials, depth, normals | [canvas-renderer-3d.ts](../apps/web/src/lib/graph/canvas/canvas-renderer-3d.ts), [gpu-surface-lod.ts](../apps/web/src/lib/graph/canvas/gpu-surface-lod.ts) | | Reproducible fixtures | [presets-3d.ts](../apps/web/src/lib/document/presets-3d.ts), [browser scenarios](../apps/web/src/lib/engine/render-regression-scenarios-3d.json) | | Native 3D regression coverage | [tests.rs](../crates/cartesium-core/src/scene/three_d/tests.rs) | [Massively Parallel Rendering of Complex Closed-Form Implicit Surfaces](https://www.mattkeeter.com/research/mpr/) is a reference for interval evaluation and subdivision, with continuous-field assumptions that do not by themselves solve discontinuous expressions. [Transvoxel](https://transvoxel.org/) is a reference for explicit ownership and stitching at multiresolution boundaries, not a drop-in solution for every explicit/parametric surface or for singular topology.