drawing op• Data kinds: table → table
• Call: import fullseye as fs; fs.ledger.lens_section_drawing(system, fields=None, rays=3, lead_mm=None, edge_margin_pct=5.0, scale=None, profile_points=121, title=None) (to call the implementation directly, import optdraw; optdraw.lens_section_drawing(system, fields=None, rays=3, lead_mm=None, edge_margin_pct=5.0, scale=None, profile_points=121, title=None); from the registry, opsoptics.get("lens_section_drawing"))
Meridional lens layout (table, a drawing dict) — the prescription's surfaces, edges, stop and image plane, real rays coloured by field, and dimensions.
> The detailed description below is the original text — the summary and the headings are translated.
*system* は raytrace.lens_system の処方。*fields* は視野の列(物体が無限遠なら度、有限なら物体の高さ mm、既定は処方の field を F として (0, 0.7F, F)、F = 0 なら軸上だけ)、*rays* は視野ごとに描く光線の本数(絞りの上で等間隔、両端は口径の縁、1 なら主光線だけ)。光線は絞りを狙って実光線で追跡する(割線法で絞りの上の高さを合わせる)ので、入射瞳が無限遠の物体側テレセンでも描ける。面の形は raytrace の sag の式(円錐 + 偶数次の非球面)、面の有効半径は面の ap、無ければ全視野の子午面の実光線(視野あたり 21 本)の最大の高さ。コバ(レンズの外周)は有効半径の最大に *edge_margin_pct* % を足した半径で、有効半径の外は平らな座で描く(光学設計ソフトの断面図と同じ作法)。
寸法線: BFL(最終面 → 後側焦点 F′)・EFL(後側主点 H′ → F′)・全長(第 1 面 → 像面)・像高(最大視野の主光線)。処方表(面ごとの R・間隔・n_d・ν_d)と諸元(EFL・BFL・F 値・全長・視野・波長)を文字で書く。*scale* は紙の mm / 実物の mm(既定は ISO 5455 の推奨尺度から幅 250 mm に収まる最大)。
返り値: {"kind": "optdraw", "entities", "dimensions", "values", "meta", "scale", "frame"}。values は図に書いた数の正本(efl / bfl / total_track / image_height / fno / 面ごとの vertex_z semi_diameter / 光線ごとの面上の交点 rays)。drawing_svg / drawing_dxf で書き出す。平面の R は lens_system の規約どおり inf、無焦点の系(両側テレセン)の efl / bfl も inf (非有限は契約。図には描かず、描かなかった寸法の名前を dimensions_skipped に残す)。鏡・傾き・偏心のある処方(と raytrace3d.noncoaxial_system の系)は noncoaxial_drawing に回す(折り返した系の断面図)。★縁の厚さが負になる処方は ValueError。
Every optics op validates its input before computing (nothing slips through silently):
• Units are baked into the argument name — _mm / _um / _deg / _mrad. Confusing mm with µm does not crash; it yields a plausible-looking wrong answer, so the name prevents it. Nothing here guesses the unit from the magnitude.
• Strings raise ValueError — float('50') succeeds, so an unparsed configuration value would slip through as a length (measured: thin_lens('50', '200') returned a plausible 66.667 mm). bool is refused too, as the implicit promotion True == 1.
• complex / masked arrays raise ValueError (real-valued slots only; silently dropping the imaginary part or peeling off the mask is refused). NaN/Inf raises ValueError on every input.
• Division by zero and its relatives are refused by name: focal length 0, radius of curvature 0, refractive index <= 0, a fully opaque aperture (all zeros, so the normalisation is 0/0), a PSF whose sum is <= 0, a Stokes vector with S0 = 0, and an object sitting at the front focal point (the image is at infinity).
• Only two ops return a non-finite value, and both state it as a contract: depth_of_field returns far_mm = inf beyond the hyperfocal distance (that is what the hyperfocal distance means), and gaussian_beam returns wavefront_radius_mm = inf at the waist (the radius of curvature of a plane wavefront). Both also return a finite companion (far_is_infinite / curvature_per_mm). Any other silent NaN/Inf is detected internally and raises ValueError — "float64 overflowed" and "the answer is infinite" are different claims, so the first is never returned wearing the face of the second.
• Size caps: generated grids are capped by optics.MAX_GRID (4096); supplied fields/PSFs/apertures by optics.MAX_FIELD_ELEMENTS (2^24); ABCD element chains by optics.MAX_SYSTEM_ELEMENTS (1024); Zernike by MAX_ZERNIKE_TERMS (512) / MAX_ZERNIKE_ORDER (40) / MAX_ZERNIKE_BASIS (2^25). This closes, fail-closed, the paths where a small argument triggers a huge internal allocation (measured: n_max=40 × 4096² needs 108 GB).
• Physically impossible states are refused too: a Stokes vector with degree of polarisation > 1, negative transmittance, negative intensity, and invalid Zernike indices such as n-|m| odd.
• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).
• Operator provenance and references — the sources of the research/methods this op family came from.
• The canonical algorithm (author, year) and its uses are named in the family usage guide above.
• poc_optics_drawings — py -3.11 examples/poc_optics_drawings.py
table as input)abcd_matrix · wavefront_stats · sfr_from_edge · paraxial_trace · seidel_coefficients · spot_stats · tolerance_analysis · wavefront_from_opd
drawing)vision_setup_drawing · lens_element_drawing · drawing_svg · drawing_dxf · drawing_raster · svg_entities · dxf_entities · noncoaxial_drawing
*Provenance: optdraw.py — OPTICS operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.