optics
Light on small spheres in a box: narrow Gaussian beams from projectors outside light chosen spheres among many (a volumetric display of held beads). Per beam, the exact fraction on the target through the spheres in front (offset-disc Gaussian, noncentral chi-square), the spill onto spheres behind (crosstalk) and the beam that ends on a board or leaves through a tinted wall (eye safety, peak mW). Brightness of each sphere toward each eye (Lambertian sphere mixed with isotropic scattering, phase angle per source), covering by spheres in front (angular disc overlap) and by opaque boards, room light through tinted walls with front-surface reflection and ports, heat (conduction to still air) and light force against the sphere's grip. Pictures from chosen eyes at true angular size. Files: spheres.csv, eyes.csv, view_<eye>.png, scene.glb (Python: NumPy, SciPy, matplotlib).
- Field
- Waves, optics and circuits
- Version
- 0.1.0
- Runs as
- Compiled (Rust)
- Typical run
- 10 s
Compiled from source: run sh packs/install.sh once before admitting it.
Known answers it must pass
r0001Gaussian beam on a disc: on the axis the fraction is 1 - exp(-2 R^2/w^2) (closed form) for R/w = 0.5, 1, 2 (1e-9); off the axis (d/w = 0.35, 0.7, 1.4, R = w) the noncentral chi-square form against direct polar quadrature of the Gaussian over the disc, 4000 x 8000 cells (1e-6)passed
axis_worst_rel_err≤ 1e-090lockedinside the rangeoffaxis_worst_rel_err≤ 1e-061.61982e-08lockedinside the rangefar_fraction≤ 1e-121.50458e-36lockedinside the ranger0002Lambertian sphere (Russell 1916): intensity toward phase angles 0, 45, 90, 135, 180 deg from a 600 x 1200 facet integration of a sphere lit from one side, against I(alpha) = 2 rho Phi (sin alpha + (pi - alpha) cos alpha)/(3 pi^2) (1e-4 of the head-on value); the phase function, Lambertian, isotropic and a 50/50 mix, integrates over the sphere to the scattered flux (1e-6)passed
intensity_worst_err_rel_headon≤ 0.00011.45444e-06lockedinside the rangeflux_lambert1 ± 1e-061lockedunder 0.01 % of the tolerance usedflux_mix1 ± 1e-061lockedunder 0.01 % of the tolerance usedflux_isotropic1 ± 1e-061lockedunder 0.01 % of the tolerance usedr0003Beer-Lambert for a Poisson field of spheres: 4000 random lines one mean free path long through spheres (R = 0.5 mm) at random, density 1/(pi R^2 mfp): the fraction that touches none is exp(-1) = 0.3679 (abs 0.03, four binomial standard deviations); the thin-beam limit of the beam model is 1 through a sphere and 0 beside itpassed
clear_fraction0.367879 ± 0.030.36925locked4.6 % of the tolerance usedthin_beam_on_sphere≥ 0.9999991lockedinside the rangethin_beam_off_sphere≤ 1e-060lockedinside the ranger0004Closed forms: normal-incidence reflectance of acrylic (n = 1.49), ((n-1)/(n+1))^2 = 0.0387252; an unlit white sphere (rho 0.9) behind walls of T = 0.3 in 300 lx: rho E T^2/pi = 7.73493 (by hand); a 1 mm sphere in still air (Nu = 2) absorbing 1 mW warms P/(4 pi k R) = 6.07462 K (k = 0.0262 W/m K); two unit discs 1 apart overlap 2 pi/3 - sqrt(3)/2 = 1.2283697passed
fresnel_R_acrylic0.0387252 ± 3.9e-110.0387252lockedunder 0.01 % of the tolerance usedunlit_luminance7.73493 ± 7.7e-097.73493lockedunder 0.01 % of the tolerance usedheat_rise_K6.07462 ± 6.1e-096.07462lockedunder 0.01 % of the tolerance usedlens_equal1.22837 ± 1.2e-091.22837lockedunder 0.01 % of the tolerance usedr0005Two spheres on a beam's axis (R = 0.5 mm, w = 0.4 mm, aim 0.2 mm off), the far one lit, through the whole display path: its reach is (1 - (1 - exp(-2R^2/w^2))) x the offset-disc fraction = 0.0386270 and the beam leaving the far wall carries P (1 - f0)(1 - f_d) T = 0.0159299 mW of 10 mW (by hand); an eye from the side sees it, an eye on the axis behind the projector does not (the near sphere covers it)passed
reach_far0.038627 ± 3.9e-110.038627lockedunder 0.01 % of the tolerance usedexit_far_mW0.0159299 ± 1.6e-110.0159299lockedunder 0.01 % of the tolerance usedseen_side1 ± 1e-121lockedunder 0.01 % of the tolerance usedseen_behind0 ± 1e-120lockedunder 0.01 % of the tolerance used
Each line is one reading the kernel checked. The bright band is the tolerance; the needle is the value the instrument actually returned when it was admitted. A needle near the centre line used little of its tolerance.
Inputs
| Name | Unit | Default | Meaning |
|---|---|---|---|
mode | display | display: the design mode. The others are known-answer checks (see run.py). | |
sites | mm | Sphere centres [[x, y, z], ...] in mm (or give sites_file). | |
sites_file | A CSV with x_mm, y_mm, z_mm columns, e.g. a levitator run's traps.csv: "@r2126/traps.csv". Row order = site index. | ||
sphere | radius_mm (0.5), albedo (0.95), isotropic_fraction (0: Lambertian sphere; 1: isotropic scatterer), absorbed_fraction (0.05), density_kg_m3 (25), grip_g (the weakest sideways grip, in g, for the light-force ratio). | ||
beam | waist_mm (1/e^2 radius at the spheres, 0.4), pointing_error_mm (aim miss, worst case, 0), reach_min (a projector serves a sphere only if at least this fraction of its beam lands on it, 0.5), per_sphere (up to this many projectors per lit sphere, 3), exit_limit_mW (optional: also refuse a projector whose escaping beam would exceed this). | ||
box | board_z_mm (boards at +-), board_hx_mm, board_hy_mm (half sizes), wall_x_mm, wall_y_mm (walls at +-), wall_transmittance (luminous, one pass), wall_index (1.49 acrylic), port_fraction (clear area of the walls), board_reflectance. | ||
room | illuminance_lx (300; lux, not in the kernel's unit table), reflectance (0.5) of the room's surfaces. | ||
projectors | [{name, position_mm: [x, y, z] outside the walls, power_mW (optical, 20), efficacy_lm_W (luminous efficacy of its light, 250), scan: vector (one beam steered from sphere to sphere) | raster (a frame), dwell_efficiency (vector, 0.8), frame_area_mm2 (raster)}] | ||
lit | Indices of the lit sites (the image). | ||
colors | For pictures: {"<site>": [r, g, b] 0-1, "default": [...]} | ||
eyes | [{name, group, position_mm: [x, y, z]}]: where people look from. | ||
render_eyes | Names of the eyes to draw a picture from. | ||
seen_min | 1 | 0.5 | A lit sphere counts as seen if at least this fraction of it is uncovered... |
phase_min | 1 | 0.25 | ...and it is at least this fraction as bright toward the eye as head-on. |
fov_deg | deg | 34 | |
air_conductivity_W_mK | W/(m K) | 0.0262 | |
nusselt | 1 | 2.0 | |
seed | 1 | ||
mfp_mm | mm | ||
lines | 1 |
Readings
| Name | Unit | Meaning |
|---|---|---|
reach_fraction | 1 | Fraction of all sites (all loaded) that some projector reaches with at least reach_min of its beam (and under exit_limit_mW if set). |
reach_fraction_any_exit | 1 | |
two_projector_fraction | 1 | Fraction of sites reached that way by at least two projectors. |
lit_n | 1 | |
unreached_lit_n | 1 | |
crosstalk_ratio | 1 | Brightest unlit sphere (head-on, from beam spill and light scattered by lit spheres) over the median lit sphere. |
max_exit_mW_peak | mW | Strongest beam leaving the box through a wall while lighting this image (peak power, after the wall). |
max_dT_K | K | |
light_force_over_grip | 1 | |
max_sphere_power_mW | mW | |
worst_seen_fraction | 1 | Over all eyes: the smallest fraction of lit spheres seen (uncovered and bright enough toward the eye). |
worst_contrast | 1 | Over all eyes: median seen lit sphere over the brightest background (luminance ratio). |
median_lit_luminance_headon | cd/m^2 (not in the kernel's unit table). | |
fresnel_R | 1 | |
ghost_ratio | 1 | |
groups | Per eye group: worst_seen_fraction, worst_contrast and which eyes. | |
eyes | Per eye: seen_fraction, uncovered_fraction, phase_ok_fraction, hidden_by_board, hidden_by_spheres, median_lit_seen (cd/m^2), contrast. | |
projectors | Per projector: spheres served, power, mean power on a sphere, strongest escaping beam, reach fraction. | |
room | Luminances (cd/m^2) of the background parts: unlit sphere, room through the box, board, wall reflection; inside illuminance (lx). | |
files | out/spheres.csv (per site), out/eyes.csv, out/view_<eye>.png, out/scene.glb |
Try the call
Change a value and the command updates. Nothing runs here; paste it into your terminal or give it to your agent.