Core Model: Surfaces And Systems
The manual describes KrakenOS as two primary object types:
surfOne optical interface or object. It stores geometry, aperture, material, coating, drawing, and transform state.
systemAn ordered list of
surfobjects plus the methods that trace rays and expose ray state.
Surface attributes
The provisional manual highlights these core surf fields. The current
layout editor exposes the scalar fields directly in the table and the remaining
fields through Advanced Surface, Shape Builder, grating additional settings,
catalog import, or element grouping.
Attribute |
Meaning |
Current UI exposure |
|---|---|---|
|
Human labels and per-surface comments. |
Table name plus Advanced Surface notes. |
|
Spherical, conic, aspheric, and Zernike surface shape. |
Table |
|
Cylindrical/toroidal ratio and axicon angle. |
Table/Advanced Surface. |
|
Axial spacing and clear/inner apertures. |
Table/Advanced Surface. |
|
Decenter in the surface coordinate system. |
Table. |
|
Surface rotations. |
Table. |
|
Transformation order and optical-axis propagation. |
Table/Advanced Surface. |
|
Diffraction grating order, period, and orientation. |
Row right-click Additional Settings for grating rows. |
|
Surface-profile offset for off-axis shapes. |
Advanced Surface. |
|
Aperture masks and user-defined apertures. |
|
|
User-defined sag function plus coefficients. |
|
|
Measured surface error map |
Error Map workflow and Phase 2 reports. |
|
Display behavior, color, and labels. |
Advanced Surface and display code. |
|
Fabrication-drawing callouts such as clear aperture, form/power, scratch-dig, coating notes, and surface notes. This is UI metadata saved in row advanced attributes; it does not change ray physics. |
|
|
STL-backed optical solid. |
|
|
Dielectric and metal coating data. |
Coating/material workflow and polarization reports. |
|
UI metadata for splitter mode, reflectance, loss, phase, and branch limits. |
|
|
Semantic UI surface type for a source/object split target. |
Runtime maps to |
|
Diffuse/BRDF metadata for |
Built-in Lambertian, Oren-Nayar, Cosine Lobe, and optional
|
System methods and state
The manual identifies system.Trace() for sequential tracing and
system.NsTrace() for non-sequential tracing. The UI now exposes both modes
through the trace-mode selector. Scene tracing adds NsLimit,
target-surface selection, probabilistic coating splitting via
energy_probability, and non-sequential scene/trace-path diagnostics.
Beam-splitter rows add deterministic transmit/reflect child branches, and
Diffuse Object rows add deterministic built-in scatter child branches, in
NsTrace()/NsTraceLoop().
The manual also describes system ray arrays such as SURFACE, NAME,
GLASS, XYZ, S_XYZ, T_XYZ, OST_XYZ, DISTANCE, OP,
TOP, TOP_S, ALPHA, BULK_TRANS, S_LMN, LMN, R_LMN,
N0, N1, WAV, G_LMN, ORDER, GRATING_D, RP, RS,
TP, TS, TTBE, and TT. The UI also adds scene-source and branch
metadata arrays such as SOURCE_ID, SOURCE_NAME, SOURCE_ROLE,
SOURCE_MODEL, SOURCE_XYZ, SOURCE_LMN, SOURCE_POWER,
SOURCE_WEIGHT, SOURCE_WAVELENGTH, LAUNCH_FIELD_REQUESTED,
LAUNCH_FIELD_EFFECTIVE, LAUNCH_FIELD_BASIS,
LAUNCH_FIELD_ACTIVE, LAUNCH_RAY_COUNT, LAUNCH_TRACE_INTENT,
LAUNCH_SAMPLING_MODE, BRANCH_ID, BRANCH_PATH, BRANCH_POWER,
and BRANCH_PHASE. These are collected through raykeeper and surfaced in
the UI through canonical RayEvent3D records, the Ray Inspector, Trace Path
Inspector, Non-Sequential Scene Graph, and CSV exports.
Glass catalogs
The manual describes Setup as the configuration object that loads glass
catalogs from KrakenOS/Cat. The current UI exposes this through:
File -> Glass Catalog Browser
row material editing
stock lens import
enhanced Zemax text import with embedded
n/Vfallback glasses