# 8" f/12 Stevick-Paul — Exact Raytrace & Layout

Deliverables generated by `sp_model.py` (raytracer + geometry) and
`make_outputs.py` (drawings).  All values derived by **exact 3-D raytracing**
(general conic surfaces, tilted/decentered, reflection law at each surface).

## Outputs

| File | Contents |
|------|----------|
| `sp_layout.png` / `.svg` / `.dxf` | CAD-style meridional layout with all dimensions, tilts and radii |
| `sp_spotdiagrams.png` | Spot diagrams at field 0.00°, 0.25°, 0.50° with the Airy disk circle |
| `sp_airy.png` | Airy disk diameter vs wavelength and vs f-number, with the spot RMS marked |
| `sp_model.py` | Reproducible model: conic raytracer + `build_sp()` |
| `make_outputs.py` | Regenerates all figures |

Regenerate with: `python3 make_outputs.py`

---

## 1. How the geometry was reconstructed

The original ATMJ article and Stevick's own raytracing program are not available, so
the geometry was recovered from three primary sources and then **refined by exact
raytracing**:

1. The design equations and prescription in the archived SEDS/AmSky design manual
   (`DESIGN.md`).
2. The construction rule: *"draw the three mirror surfaces at right angles to the
   bisectors of the principal-ray angles"* — i.e. each mirror's surface normal is the
   bisector of the incident and reflected principal ray, and every mirror axis points
   toward its centre of curvature.
3. Bob Novack's labelled Folded-Stevick-Paul diagram, used to fix the fold topology.

The topology (a Cassegrain-like fold) is:

```
incoming (-z)  ->  PRIMARY  ->  SECONDARY  ->  TERTIARY  ->  focus (needs diagonal)
                    (+z)          (-z)           (+z)
```

The key numbers fall out of the design equations exactly:

* `R1 = 2·N·D = 192"`, `R2 = R3 = 0.4·R1 = 76.8"` (mating spheres)
* `e1 = F1+F2 = 57.6"`, `e2 = R3 = 76.8"`, `e3 = F3 = 38.4"`
* `T1 = C/N = 2.9725°` (C=35.67 for 8"), `T2 = 1.75·T1 = 5.2019°`, `T3 = T2−T1 = 2.2294°`
* lateral offsets `a1 = 6.0"`, `a2 = 12.0"`, `a3 = 3.0"`

The principal-ray angles at each gap are then fixed by the offsets and spacings, and
one further angle — the direction out of the tertiary — was solved for by scanning for
the aberration null.  It is **−9.000°**, which is exactly the *focal-plane tilt*
(Stevick's approximation `4·T3 = 8.92°`, raytraced exact ≈ 9.0°).  This closed the
system: the tertiary beam leaves at the focal-plane-tilt angle, and the focal plane is
perpendicular to the incoming light, so the chief ray strikes it 9° off normal.

**Result:** all third-order aberrations vanish, giving a diffraction-limited spot
(RMS 0.77 µm, versus the 8.05 µm Airy radius).  This confirms the design's claim.

---

## 2. Exact prescription (8" f/12, A = 0.40)

Coordinate system: `z` = optical axis (incoming light travels in −z), `y` = the
"walk"/meridional direction, `x` = sagittal (out of plane).  All mirror axes lie in the
y–z plane.

| Surface | Diameter | Vertex (y, z) | Radius | Conic | Axis tilt | Spacing to next |
|---------|----------|---------------|--------|-------|-----------|-----------------|
| Primary — paraboloid | 8.0" | (0.0000, 0.0000) | +192.000" | −1 | +2.9725° | e1 = 57.600" |
| Secondary — convex sphere | 4.25" | (5.9658, 57.2902) | +76.800"* | 0 | +0.7431° | e2 = 76.800" |
| Tertiary — concave sphere | 5.0" | (11.9364, −19.2774) | +76.800"* | 0 | −6.7294° | e3 = 38.400" |
| Flat diagonal | 1⅝" minor | in converging beam | ∞ | — | 42.77° (T4) | — |
| Focal plane | (clear field 0.62") | (5.9293, 18.6499) | — | — | tilt 9.00° | — |

\* the signed radius convention: the mirror axis points toward the centre of curvature;
the secondary is convex as seen from the incoming beam, the tertiary concave.

**Principal-ray beam angles**
* primary → secondary: `2·T1 = 5.9450°` from +z
* secondary → tertiary: `2·T3 = 4.4587°` from −z
* tertiary → focus: `9.0000°` from +z  (= focal-plane tilt)

**Design parameters** (Stevick): T1=2.9725°, T2=5.2019°, T3=2.2294°;
a1=5.966", a2=11.936", a3=2.983"; central beam dia A·D = 3.2".

Note the *physical* mirror-axis tilts (right column) are NOT equal to Stevick's T1,T2,T3:
because the fold is near-retro-reflective at the secondary and tertiary, the surface
normal (bisector) sits near ±90°, so Stevick's "tilts" are the half-angle of each
principal-ray kink, not the geometric axis angle.  Both are listed for that reason.

---

## 3. Raytrace results

Full 8" aperture, λ = 550 nm, diffraction reference r = 1.22·λ·F = **8.05 µm**
(diameter 16.1 µm):

| Field | Image shift (y) | Geometric spot RMS | vs Airy radius |
|-------|-----------------|--------------------|----------------|
| 0.00° | 5.929" | **0.77 µm** | 0.10 × Airy |
| 0.25° | 6.354" | **0.90 µm** | 0.11 × Airy |
| 0.50° | 6.781" | **0.99 µm** | 0.12 × Airy |
| 1.00° | 7.639" | **1.06 µm** | 0.13 × Airy |

The spot is a fraction of the Airy disk at all field points → **diffraction limited
over the design field**, exactly as the design promises.  `sp_spotdiagrams.png` shows
the spots (tiny) inside the red Airy circle; `sp_airy.png` shows the Airy diameter
(16.1 µm at 550 nm / f12) dwarfing the 0.77 µm geometric RMS.

---

## 4. Notes, assumptions and limitations

* **Reconstruction, not the original file.** The original ATMJ/QBasic–Zemax prescription
  was reconstructed from the archival prose plus Novack's diagram, then verified to be
  diffraction-limited.  It reproduces Stevick's published values (R1=192, R2=R3=76.8,
  e1=57.6, e2=76.8, e3=38.4, a1=6, a2=12, T1–T3) and his claimed aberration-free image.
* **Third-order vs higher-order.** The residual 0.77 µm is fifth-and-higher order
  (spherical); it is well within the Airy disk and is the reason the design eventually
  needs slower f-ratios — see `BUILD_NOTES.md`.
* **Diagonal / exit.** The layout shows the flat at T4 = 42.77° throwing the beam out of
  the meridional plane.  The diagonal is a fold only and does not affect image quality.
* **Vignetting / baffling.** Not modelled here — the layout is the on-axis design; the
  ~½-magnitude edge vignetting and the light baffle are design/mechanical issues covered
  in `DESIGN.md` and `BUILD_NOTES.md`.
* **Units:** inches unless stated; wavelength in nm/µm for the diffraction terms.

---

## 5. Diagonal placement & obstruction check

The flat diagonal sits inside the converging tertiary→focus cone and must thread between
that cone and the **collimated secondary→tertiary beam**, which run within a fraction of
an inch of each other.

**Original cartesian placement was wrong.** Placing the diagonal at `0.72·e3` along the
chief ray with a ±1.4″ extent put its upper end at y = 8.64", while the lower edge of the
collimated beam is at y ≈ 8.13" there.  Raytrace: **63 of 613 aperture rays (~10 %) of
the collimated secondary→tertiary beam were blocked** — a real aperture obstruction.

**Corrected placement** (now used in `sp_layout.png` / `.svg` / `.dxf`), chosen so the
diagonal's upper edge rides *tangent* to the collimated beam and it still catches the
whole cone:

* centre on the chief ray at **26.5" from the tertiary** (z ≈ 6.9"),
* surface **38.3° from the axis**, half-length **0.70"**,
* verified: **100 % of the converging cone captured, 0 rays blocked** in the incoming,
  primary→secondary, or secondary→tertiary beams.

**Why this is delicate.** Because the collimated beam and the converging cone leave the
tertiary nearly together (they are tangent around z ≈ 9" and overlap by up to ~0.9" closer
to the tertiary), the diagonal has only a narrow window in which to sit.  This is exactly
the situation Stevick describes — *"nestle the diagonal up against the central beam …
slid along the central beam toward the tertiary … until it catches only enough of the rays
forming the top edge of the field to produce a one-half magnitude loss"* — and is the
reason he insists on the full-scale layout before cutting metal.  The margin is small;
any builder should re-derive the diagonal position from their own full-scale drawing and
check the collimated-beam clearance.

**Caveat:** this reconstruction's on-axis image is diffraction-limited, but the
collimated and converging beams pass within a fraction of an inch and are not separated
by a wide margin as in a fully-detailed mechanical model.  Treat the diagonal position as
indicative and verify against the finished layout.
