# SALIA Mechanical Eye v0.4

## Spherical phase color

Version 0.4 keeps the v0.3 clock, carriage, dual read, compression, and receipt offices intact. It changes one office only: color is no longer assigned directly in OKLCH from orientation, difference, and coherence. Color is now the terminal display read of a declared wavelength-dependent spherical phase calculation.

The live path is

\[
\text{address}
\longrightarrow
\text{spherical normal}
\longrightarrow
\text{wavelength-dependent phase delay}
\longrightarrow
\text{field recombination}
\longrightarrow
\text{spectrum}
\longrightarrow
XYZ
\longrightarrow
\text{linear sRGB}
\longrightarrow
\text{display encoding}.
\]

No hue is selected upstream. The screen color is computed only after the sampled spectral powers are recombined and integrated.

## 137-address spherical sampling

For address (a\in\{0,\ldots,136\}), let

\[
u_a=\frac{a+\tfrac12}{137},
\qquad
z_a=1-2u_a,
\qquad
\varphi_a=a\gamma+\theta_c+r\frac{\pi}{2},
\]

where (gamma=2\pi/\Phi^2) is the golden angle, (	heta_c) is the tourbillon cage angle, and (r\in\mathbb Z/4\mathbb Z) is the escapement phase. The unit normal is

\[
\widehat n_a=
\left(
\sqrt{1-z_a^2}\cos\varphi_a,
\sqrt{1-z_a^2}\sin\varphi_a,
z_a
\right).
\]

This is an equal-area latitude parameter with golden-angle azimuthal progression. The existing planar lotus coordinate remains the writer chart. The spherical normal is a second, typed coordinate used by the spectral color adapter; the two are not silently identified.

## Declared optical approximation

The visible band is sampled at 31 wavelengths from (400\) to (700\,\mathrm{nm}) in (10\,\mathrm{nm}) steps. The source spectrum is equal energy on that declared grid. The clear medium uses the adjustable Cauchy form

\[
n(\lambda)=A+\frac{B}{\lambda_{\mu\mathrm m}^2},
\qquad
A=1.50,
\]

with (B=0.0040\,\mu\mathrm m^2) by default.

For each normal and wavelength, the code computes unpolarized Fresnel reflectance from the declared source direction. It then combines two fields:

1. a front-surface return;
2. one internally transmitted and returned path through the clear sphere.

The internal chord is

\[
\ell(\lambda)=2R\cos\theta_t(\lambda),
\]

and the relative phase is

\[
\delta(\lambda)=
\frac{2\pi n(\lambda)\ell(\lambda)}{\lambda}
+\pi.
\]

The resulting sampled power is the squared magnitude of the two-field sum, plus a small declared unphased transmitted term that prevents the presentation from treating a destructive sample as absence of the address. The default phase radius is (R=0.55\,\mu\mathrm m). Radius and dispersion are exposed as controls because they belong to the declared model rather than to the fixed algebraic kernel.

This is a first-order two-beam clear-sphere approximation. It is not a Maxwell boundary solver, Mie scattering computation, material characterization, or report of measured emitted light. Those are stricter physical offices and require their own carriers and receipts.

## Colorimetric adapter

The sampled spectrum is integrated against analytic fits to the CIE 1931 (2^\circ) color-matching functions. The result is converted from XYZ to linear sRGB, clipped at the display gamut boundary, tone-mapped monotonically, and encoded for the screen only at the final step.

The dual reader compresses the program's **linear** RGB state. It does not infer linear intensity from gamma-encoded canvas pixels. Canvas sampling remains present, but only for the display-buffer checksum and the bounded horizon deformation receipt. This separates the spectral computation from the rendered trace.

## Preserved offices from v0.3

- The Euler–Escapement clock supplies the four phases (1,i,-1,-i).
- Four releases apply one (L_{\rm ax}) carry, with (L_{\rm ax}^2=Q^2).
- (Q^2) carries the planar writer chart.
- (H=G/\sqrt5) supplies the exact dual read coordinate.
- The independently rotating tourbillon cage changes the spherical orientation sampled against the declared source direction.
- The 137 addresses retain their 548 phase-address traversal.
- Eight channel means still produce 28 alternating seam reads.
- The imported fine-structure value retains its integer address and nonzero residual.

## Runtime certificates

The runtime now refuses to start unless all 24 checks pass. The 17 v0.3 checks remain. Seven spectral checks add:

- the 31-sample (400\)–(700\,\mathrm{nm}) grid;
- unit length of the first and last spherical normals;
- north/south symmetry of the equal-area address endpoints;
- the expected placement of the analytic photopic response near (555\,\mathrm{nm});
- finite linear RGB output for a spectral probe;
- nondegenerate spectral change under a change of phase radius.

Each receipt now retains two independent hashes:

- `spectralStateChecksum` hashes the computed 137-by-31 spectral state;
- `displayBufferChecksum` hashes the canvas trace.

The 28 antisymmetry confirmations remain explicitly labeled a wiring identity, not an empirical result.

## Authority ledger

### Derived and checked

- The 137 unit normals and their equal-area latitude relation.
- Wavelength-dependent Cauchy index, Snell transmission angle, Fresnel coefficients, internal chord, phase delay, and two-field recombination under the declared approximation.
- Spectrum-to-XYZ integration and linear/display RGB separation.
- All v0.3 algebraic, clock, address, and electromagnetic calibration checks.

### Certified software adapter

- Clocked rotation of the spherical normal field.
- Recalculation of all 137 spectra after each live update.
- Linear spectral-color compression before display encoding.
- Independent spectral-state and canvas-buffer receipts.
- JSON export of the complete model declaration and addressed optical witness.

### Declared

- Equal-energy sampled source.
- Source direction.
- Cauchy (A), adjustable (B), phase radius, and two-beam truncation.
- The (400\)–(700\,\mathrm{nm}) grid and analytic color-matching fit.
- Final gamut clipping and monotone display tone map.

### Requires a separate physical certificate

- A real material realizing the selected dispersion and radius.
- A source spectrum, polarization state, boundary geometry, detector response, and instrument calibration.
- Agreement with full electromagnetic scattering or with a measured optical specimen.
- Any biological realization.

The mathematical and colorimetric forms coordinate the computation. The code executes that declared computation. A physical system enters only when its own carrier, units, response law, loss boundary, and receipt are supplied.

## Sources

- Chris Wyman, Peter-Pike Sloan, and Peter Shirley, [*Simple Analytic Approximations to the CIE XYZ Color Matching Functions*](https://jcgt.org/published/0002/02/01/), *Journal of Computer Graphics Techniques* 2(2), 2013.
- CIE, [ISO/CIE 11664-1:2019: Colorimetry — Part 1: CIE standard colorimetric observers](https://www.cie.co.at/publications/colorimetry-part-1-cie-standard-colorimetric-observers-0).
- *SALIA Mechanical Eye v0.3* notes.
- *The Euler–Escapement Lift*, v0.1.

## Privacy and execution

The program makes no network requests and requests no camera, microphone, biometric, storage, or device permissions. Its live sources are browser monotonic time, declared program work, the imported numerical (alpha^{-1}) reference, and the program's own spectral and canvas memory.
