Browse documentation
Docs/Functionality

Scientific Scene

Scene inspects multiple native point, line and triangle-mesh objects in one orthographic 3D view. Coordinates, topology, units and scientific properties come from the Grid model; the viewer…

Scientific Scene

Scene inspects multiple native point, line and triangle-mesh objects in one orthographic 3D view. Coordinates, topology, units and scientific properties come from the Grid model; the viewer only projects and selects them.

Open the native field-sample example and choose Open scene. Drag or use arrow keys to orbit; Shift-drag or Shift-arrow keys pan. Zoom in, Zoom out, plus/minus and Fit scene or Home control the camera. The XYZ key follows the camera orientation; it does not mark the scene origin or imply a physical scale. Select an object in the list or projection. Its inspector shows scientific properties; open Coordinates and topology for exact native coordinates. Picking successive vertices keeps this inspector open; orbit, zoom, visibility and field changes keep the current coordinate page. Selecting another object starts its coordinates at the first page. Focus object reveals and frames the selection, and Show only this isolates it. View options offers front, top and side views and Show all objects. For meshes, Mesh display → Wireframe reveals every authored triangle edge without hidden-face fills; intersecting edges still depth-test against other visible edges, points and lines. It changes only presentation and leaves the original vertices and topology untouched. The mesh style follows Save view, reopening, printing and SVG export; older saved views continue to display surfaces. Find an object searches name, ID and kind in scenes with more than eight objects. Filtering the list leaves the projection and saved visibility intact. Export coordinates downloads every native vertex of the selected object as CSV, including its ID, label, zero-based index and authored units. It exports original XYZ values regardless of camera orientation or coordinate-table page. Show controls object visibility without editing its geometry. Export image downloads the current visible projection as SVG, with camera, source/capture identity, units and native provenance in its metadata. Export keeps exact native geometry untouched. With depth rendering, SVG contains a 1280×840 PNG of the visible geometry plus the vector XYZ orientation key. This preserves occlusion and the current selection highlight; the geometry image is raster, not editable vector triangles. Devices without a depth context export the same explicitly approximate vector fallback shown in their viewport. Source and rendering details → Export scene data downloads the complete admitted grid.scene.v1 JSON, including hidden objects, all vertices, triangle topology, units, properties and native provenance. It retains original geometry; list filters and camera changes do not affect it.

Click near a visible native vertex to pick its exact zero-based index and XYZ coordinates. Point picking uses an explicit depth-tested ID pass, with a small screen-space hit radius; a surface click away from its vertices still selects the object. Hidden or occluded vertices can be chosen explicitly in Coordinates and topology → Pick vertex. That table is also the point-picking fallback on devices without depth rendering.

After Open scene, choose Measure distance, pick endpoint A and endpoint B, then Calculate native distance. Grid executes DISTANCE on those exact captured XYZ coordinates through a dedicated, bounded native compiled formula operation. Its small computation state is discarded after use. It does not edit the live model, re-resolve its scene formulas or calculate the distance in the browser. The result is Euclidean coordinate distance, not a geodesic, surface-path, screen-space or calibrated length. Endpoint authored unit labels must match exactly. No conversion or dimensional validation is applied; unspecified labels stay unspecified. Source and working revision must match the displayed capture before and after computation. Refresh after a model edit (including a saved view) before measuring again. Only the two submitted finite XYZ endpoints enter this operation; live model size, imports and external references do not impose private-scenario admission limits. The request and receipt are each bounded to 4 KiB. The native receipt confirms the submitted coordinate computation and model fence; it does not authenticate the endpoint coordinates against a native re-read of the scene. Isolated process calculation backends currently refuse this selected operation explicitly.

For a three-point angle, open Measurement options → Measurement type → Angle. Pick A, center B, then C and review the exact displayed XYZ values. Calculate native angle measures the angle between BA and BC. Degrees are the default; the folded options also offer radians. All three authored coordinate-unit labels must match exactly, independently of the angle unit.

The dedicated native compiled formula operation subtracts B, scales each arm by its maximum absolute component, computes the normalized dot product and applies ACOS; DEGREES converts the result only when selected. Normalization avoids squaring raw large or tiny magnitudes. Zero-length arms, overflowed subtraction and nonfinite inputs/results refuse an annotation. Native cosine clamping to [−1,1] handles floating-point roundoff. Results describe an unoriented angle in [0,180] degrees or [0,π] radians, not a signed rotation, surface angle or calibrated physical quantity. No scientific angle arithmetic runs in JavaScript.

Angle requests and receipts retain the same 4 KiB bounds and before/after source and working-revision fences as distance. A receipt explicitly names displayed-capture-request: it computes the submitted capture coordinates and does not authenticate them by rereading model vertices. Angle annotations retain A, center B, C, the exact native result, angular unit, authored coordinate units and this origin. Explicit camera framing admits all three angle references, including a center on another object, while preserving the current orientation and all native coordinates/results. The default two-point distance API and old saved distance records remain unchanged. Show measurement frames all three points; Measure current endpoints reviews the current three named vertex slots and creates a new record without altering the historical angle. Matching slots do not establish lineage.

Selected cost is one tiny fixed literal compilation and native compiled formula resolve on explicit calculation. There is no new kernel or evaluator, live-model cloning, background work or ordinary-path cost.

Saved measurement records can be inspected and exported immediately after reopening a view, even before opening current geometry or when its source is unavailable. Print retains every saved distance/angle, all original points, units and capture identity without making a native request. Configuring a different scene source does not retarget these historical records. Framing, current-endpoint measurement and annotation editing require an opened scene; matching source/hash/revision checks still govern overlays and framing.

Measurements retain original endpoint object IDs, indices, XYZ, source symbol, source hash, working revision and capture time with the native result. Save view, followed by saving the Grid document, retains them with its acknowledged viewer state. At most 20 measurements fit inside the existing 16 KiB viewer-state budget; an oversized record refuses instead of trimming annotations. Rename or remove an annotation under its exact-result disclosure. Refresh preserves annotations and marks prior captures historical; it never silently recomputes them. Only records that match the currently opened capture draw measurement lines. These lines and point highlights are readable presentation overlays that may cross occluding geometry, not depth-tested scientific objects.

Export measurements downloads every retained exact record as JSON. Image export includes visible overlays and every retained annotation in its metadata. Print includes every retained result and its exact endpoints and capture details, even when historical; a resident-only printed scene cannot certify the saved capture identity and labels those records historical. Run can measure after an explicit Open, but retains new annotations only for that session; workbench Save view is required for document persistence. Download local copy also exports the complete annotation records during save recovery.

A new Scene opens its source picker as the primary setup path; Code stays under Advanced setup. Scene setup → Choose source connects a native scene through a guarded, acknowledged configuration save. Resident scene values are suggested; a source symbol that has not been loaded yet can also be entered. Open scene validates and captures that source through native Grid. A pending setup can be stopped without losing its downloadable draft or treating an unknown write as success.

Configure one native model source:

version = 1
kind = "scene"
title = "Scientific scene"

[source]
symbol = "SceneData"

The source is a portable native record with schema grid.scene.v1, optional units and provenance, and an objects list. Each object declares a unique id, label, kind (points, line or mesh), and a nonempty vertices matrix of finite XYZ coordinates. Lines join adjacent authored vertices. Meshes require a triangles matrix of zero-based, distinct, in-range vertex indices. Optional color is six-digit hex; optional object units and scalar properties are displayed exactly as supplied. Units are authored labels, not a promise of conversion or dimensional validation. Native formulas can compute those values and checks explicitly. grid-scene is the existing 2D scene library and is not this viewer's 3D scientific authority.

Admission refuses the complete scene if any object is malformed, rather than silently dropping coordinates or topology. Limits are 1 MiB of portable data, 64 objects, 5,000 total vertices and 5,000 total drawing primitives. Labels are 160 characters, IDs 120, units 80, provenance 1,000; each object admits 32 scalar properties with keys up to 80 and text up to 500 characters. Use a bounded native projection for larger models. The explicit capture owner also admits at most 500 declared inputs and refuses unsupported native-resource inputs.

Opening starts no request, animation, timer or worker. Open scene captures one native source through the existing source/input/package-checked study owner. The capture displays source hash, working revision and timestamp; later input changes require another explicit load. The viewer does not freeze external data bytes or runtime executable identity. The already-ready resident value can display in Run or print without making a request. Run also offers an explicit Open scene read when its source is absent; it does not save viewer state or mutate geometry. Print never requests a missing source.

Camera exploration is transient and does not block navigation. Unchanged actions, such as fitting an already-fitted scene, do not produce a save prompt. Refresh preserves the current view while its objects remain valid. Camera, object visibility and selection are local presentation state until Save view obtains a matching, advancing native data receipt. Save the Grid document to retain that state in its archive. A rejected, uncertain or conflicting write keeps the local view and prevents automatic replay. Download the local viewer copy before explicitly loading the saved view or choosing a default state. Observe saved view reads a fresh native data revision after an uncertain save. An advancing revision containing exactly the local view confirms the save without another write; a missing, stale or different view keeps the local copy and recovery controls. Source/model/partition/account owner changes fence late responses. Replacing the model bindings or authored source also releases pending coordinate and measurement waits and requires a fresh capture. A replacement writer or binding owner during a save retains the local view as an uncertain write; its late receipt cannot clear the recovery copy or enable a repeated save. Source identity and rendering limitations live in Source and rendering details; scene authoring is under Scene setup. After opening, Refresh scene reads a fresh model capture. Pending or conflicting saves protect navigation while the view stays mounted; Stop waiting releases a stalled operation while fencing its late response. An uncertain write retains the local view and prevents replay. durable local recovery after process restart is not included. The confirmed model data follows the normal saved Grid document contract. A host without a fresh data snapshot or data writer cannot acknowledge viewer saves. Malformed saved viewer data refuses edits and remains available through the Code owner. Older picker-created empty-string viewer slots are treated as unset. If saved object references are obsolete or viewer data is malformed, Run offers Download local copy and Use default view to recover exploration for this session without overwriting saved data. Malformed saved data still blocks workbench saves until repaired through the source owner. Run-mode camera/selection changes are local and do not persist; print hides mutation controls.

The renderer uses orthographic projection with a per-fragment GPU depth buffer for admitted opaque meshes, points and lines. Intersecting surfaces and segments are depth-tested at each visible pixel rather than ordered by their average depth. Clicking selects the visible object at that pixel; the object list remains available for selecting hidden or occluded objects. Surfaces are opaque; there is no transparent blending or scientific shading. Depth and fitted coordinates have GPU floating-point precision; coplanar ties use stable drawing order. The viewer does not claim exact geometric predicates or generate scientific geometry, surface normals or fields. Scientific distance results come only from the explicit native operation described above.

Geometry buffers are cached for the admitted scene and mesh style. Orbit, pan, zoom, selection and visibility change drawing settings without rebuilding thousands of SVG shapes. Rendering occurs only on a selected view change; there is no animation loop, worker, idle drawing or background request. A depth context is created only when admitted scene data is present and released on unmount. Canvas resolution is fixed at 1280×840 rather than growing with device pixel ratio.

If WebGL or the required depth context is unavailable or lost, a visible warning identifies the approximate SVG fallback. Overlapping/intersecting objects can appear in the wrong order in that fallback; export and print preserve the same approximation. Camera, object list, source identity and saved-view recovery remain available. View options → Retry depth rendering explicitly creates a fresh context without rereading native geometry or changing saved camera state. Print embeds the depth image and orientation key when the context is available, and never requests a missing native source. Vertex tables show bounded 50-row pages; printed inspection includes the selected page, with complete object/topology available in the native data inspector.

Local admission, projection, interaction, owner-fencing and receipt tests pass. Focused raster checks cover intersecting triangles, point/line occlusion, visible-object picking, camera reversal, hidden objects, wireframe, and mounted Scene image export/print. They do not establish a measured speed improvement or a packaged-device GPU guarantee. Native example execution, live UI review, archive round-trip and paired presentation costs remain pending in the delivery record.

Compose native workbenches in a View

A Grid View can include the new scientific and review surfaces through the same native compiler and native model bindings. For existing report, image and scene values in a model:

SURFACE StudyDesk
  Optimization ProductionReport
  Statistics StatisticsReport
  ScientificImage ImageValues row axis 0 column axis 1
  Scene SceneData units "m"
  Gallery "images" recursive true
END

These embedded surfaces use their normal inspection/rendering capabilities in Run mode. Edit reports, assumptions, image configuration and review metadata in the standalone workbenches. A Gallery folder is an explicit quoted literal; report, image, mask and scene subjects are native model bindings. ScientificImage also accepts literal asset and calibration records; pinned Files stack records retain their original path, sha256, starting page and selected pages. Existing bounds, source identity and failure behavior remain in each surface. No browser evaluator or background inspection loop is introduced.

Use Color by to show a native per-vertex scalar field. Each object may carry up to eight fields, each with a unique id, label, optional units, a finite increasing authored domain: [minimum, maximum], and values containing one finite number or null per vertex. The canonical example includes temperature samples. Field values and color ranges come from the model; Grid does not infer ranges, derive fields, interpolate scientific values or convert units.

The blue/teal/yellow legend keeps the authored scale fixed while orbiting, hiding objects or zooming. Out-of-range display colors clamp; missing samples are gray. GPU colors interpolate across native mesh faces and line segments for display only. The approximate SVG fallback uses each primitive's first sample color and therefore does not show smooth scalar gradients. Pick a vertex or open Coordinates and topology for exact samples, including missing values. Save view retains the selected field; exports and print include the legend. Only one object's field is colored at a time, preserving other object colors. Existing 1 MiB scene / 5,000 vertex limits remain in force; dense volume fields, isosurfaces, vector fields and arbitrary field resampling are not supported.

Current measurements offer Show measurement to reveal both endpoint objects and frame both endpoints at the current viewing angle. Camera changes preserve native coordinates, the recorded distance and its original capture. Under Exact result and endpoints, Show endpoint A/B centers one endpoint, selects its object and opens its exact coordinate page. Framing honors the bounded camera limits; it does not remove occluding geometry or establish visibility through opaque surfaces. Historical measurements retain their original values and do not navigate against a different capture. Save the view to retain the changed camera and visibility in the Grid document.

Show vectors displays native per-vertex vector samples as arrows. Each object may carry up to eight vectorFields, each with a unique id, label, optional units and six-digit hex color, a positive finite authored scale, and values containing one finite XYZ triple or null per vertex. Scale maps vector components to displayed coordinate displacements; it is a presentation choice, not unit conversion or dimensional validation. The canonical probe example includes velocity samples.

Normal display draws up to 256 nonzero available vectors, evenly sampled in native vertex order. Vector display options offers sparse (64) or dense (512) sampling and arrows or segments. The first and last available nonzero samples are retained; zero and missing vectors have no glyph. Picking and the coordinate table always expose exact original samples, including unsampled vertices. Save view retains selection, density and style.

Fit scene and Home include displayed vector endpoints along with geometry. Extreme authored scales can exceed the camera's zoom/pan bounds; a message explains when arrows remain outside the view. Glyphs never alter native geometry, coordinate exports, topology or vertex picking. WebGL depth-tests them against the rendered geometry. The approximate SVG fallback draws glyphs behind its geometry. Image export and print preserve the visible glyphs and authored scale. Excessive/nonfinite projected displacements refuse the glyph view with a visible message while native data stays available. No vector magnitude, scientific normalization, streamline, integration or new field value is derived by the browser. Arrows are presentation marks, including screen-space arrowheads; native vector samples remain the scientific record.

A current record offers Measure these endpoints again under Exact result and endpoints; a historical record with matching source binding and existing endpoint slots offers Measure current endpoints. Either opens the reviewed two-point distance or three-point angle preview with current native XYZ values. Change angle units if needed, then explicitly calculate to create a separate record for the current source hash and working revision. Opening the preview or changing units never calculates or saves. The original measurement remains unchanged. Reused IDs and indices identify current vertex slots; they do not certify continuity with the original geometry. Missing endpoints or a different source binding offer no shortcut. The existing 20-annotation limit and acknowledged view-save behavior continue to apply.

Under Export measurements, choose Measurements CSV for a complete table of the displayed native distance and angle records, or Complete measurements JSON for the structured records. Each CSV row retains exact endpoint coordinates, native distance or angle, authored units, object IDs, vertex indices and original source/capture identity. Historical records are exported as recorded, without recomputation. Formula-like text is protected when opened as spreadsheet text; signed numeric coordinates retain their values.

Distance-only CSV exports keep the existing columns. When an angle is present, CSV appends angle, coordinate-unit, coordinate-origin and center-point columns; angle rows leave the distance column blank. Old distance records leave the new origin column blank because that field was not stored. Complete JSON retains the original record shapes and all three angle points. Neither export converts or derives a measurement value.

Export native object fields

For a selected object, open Export object and choose Native fields CSV to retain every admitted vertex coordinate and authored scalar/vector sample, including vertices omitted from display sampling. The complete export preserves exact native numeric components, explicit missing samples, field units and authored scalar domains/vector display scales alongside the displayed capture identity. It does not derive magnitudes, interpolate fields or request new data. Text is escaped for spreadsheet use; a file above 8 MiB is refused as a whole. The existing coordinate-only CSV remains available.

Inspect a known vertex

Open Coordinates and topology, enter a zero-based Vertex index, and choose Inspect vertex (or press Enter). Grid jumps to that vertex's page, highlights its row and shows the original coordinates and available native scalar/vector samples. Indices must identify an existing vertex of the selected object. This inspection does not add a measurement endpoint or calculate or save anything; Pick vertex remains the explicit measurement action.

Scene JSON exports, saved viewer records, recovery copies and SVG metadata preserve negative zero as a JSON number. Selected distance/angle requests retain that coordinate sign, and exact receipts reject sign changes. SVG export writes one valid namespace declaration so the file can be reopened by standard XML viewers.

Retained measurement labels and records can be renamed or removed before opening geometry. Use Save view explicitly to keep those edits. This metadata-only path preserves the exact native endpoints/results, capture identity and every camera/object setting; it requires the original owner/source and fresh viewer-data revision. Pending camera/object edits, source changes and uncertain saves retain the existing refusal and recovery behavior.

Opening geometry keeps unsaved historical measurement renames/removals. Camera and object settings still apply only to a matching source capture. Stop waiting and late load responses keep those metadata edits available for the existing explicit save, without loading or recalculating geometry.

Discarding local view edits adopts a newer ready saved revision, including externally added measurement records. When the parent snapshot lags an acknowledged save, the acknowledged state remains the baseline. Discard alone never confirms an uncertain write.

If saved viewer data changes while geometry is opening, the late geometry response cannot replace local records or clear the conflict. The draft stays available; explicitly discard local changes to adopt the saved view, then open geometry again.

Use Center vertex beside an inspected vertex’s exact coordinates to frame that point at the current viewing angle. It reveals a hidden owning object and preserves measurement endpoints, without requesting geometry or recalculating values. Workbench camera changes remain local until Save view; Run keeps them for the session.

Each retained measurement offers CSV and complete JSON under Exact result and endpoints → Export this measurement. These single-record exports retain original coordinates, native result and capture identity, and work without opening current geometry. Collection-wide export remains available separately.