# Design This file fixes the geometry. How the model's code is organised is up to you, as long as the numbers here hold. ## Targets (defaults) Focal 50 mm ± 2%. On-axis RMS spot ≤ 15 µm. 0.7-field RMS spot ≤ 40 µm. The exact bounds and the wavelength (for example 587 nm) are `fixtures/lens-targets.json`. ## Prescription Element count, radii, thicknesses, and index (or a glass name from a shipped table) are `fixtures/lens-prescription.json` after a design run, or a shipped starting point that already meets the bounds. ## Plot tolerance A pixel tolerance of 8 levels, 98% of pixels, or a numeric plot array within 1e-3 of a fixture, as the tests prefer. ## Inputs | Key | Label | Default | Notes | | --- | --- | --- | --- | | `focal` | Target focal length, mm | 50 | From 24 to 85, the design target. | | `aperture` | F-number | 2.8 | From 1.8 to 8. | | `format` | Image circle, mm | 43.3 | The diagonal of the image plane, default a 35 mm still frame. | | `coatings` | Simple coatings | off | A transmission factor in the tracer, not a physical lab coating. | | `aspheres` | Allow an asphere | on | If off, all surfaces are spherical or planar. | | `tracer` | Tracer | shipped | shipped is a small tracer in the project. external is a named open library, if present. | ## Acceptance at the defaults Millimetres and a unit-focal tracing. Default aperture 25, focal length 50, two elements, aspheres on, coatings off. | Quantity | Value | Tolerance | Source | | --- | --- | --- | --- | | Clear aperture | 25.00 | 0.05 | Of the first surface | | Focal length, on axis | 50.00 | 0.20 | At the design wavelength 550 nm | | On-axis spot radius | 0.050 | 0.010 | RMS at the focal plane, 550 nm | | Field, half-angle | 5 deg | — | The off-axis check | | Aspheric term | 4th order only | — | When `aspheres` is on | A ray tracer in the repo (Python is fine) traces a documented 21-ray pencil on axis and a 21-ray pencil at 5 degrees. The prescription is a table in this file or a shipped `fixtures/lens-prescription.csv`. No lab coating or optical bench is required. ## Screenshots These pictures are headless OpenSCAD renders of the reference model in `reference/model.scad`, at the default inputs. They are not drawings of a product that has not been modelled. The first picture is the one Spekkr shows on the spec's card. A build may ship its own goldens; those goldens are of that build and do not have to match these frames pixel-for-pixel. | File | What it shows | | --- | --- | | `shots/cell.png` | Two-element cell 25 mm aperture, 50 mm focal length | ## How to verify 1. Build the model at the default inputs and at two other legal input sets. 2. Measure every row of the acceptance table in this file; each must fall inside its tolerance. Use the solid itself or a mesh library on the exported STL, as `design.md` says for the chosen tool. 3. Refuse at least one out-of-range input by name before modelling. 4. Confirm each exported part is a manifold, watertight mesh, and that walls and print orientation hold where this file asks. 5. Focal length, image-plane spot size, and an aberration metric are compared to documented targets. Ray-trace plots are checked as goldens. No optical bench and no physical glass are required.