Interactive 2D wave optics simulator. Turn any image into a refractive scene, add sources, watch waves refract, diffract and interfere. Probes, intensity maps, video export.
C#
Graded and per-face coatings, an absorbing fibre cladding, and the shipped examples under File > Examples
Alexander Graef609d4f09f239
diff --git a/CLAUDE.md b/CLAUDE.mdindex 7bb3892..4ecc316 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -299,8 +299,21 @@ FrameStore: native memory up to the budget, the rest in a temp file (%LOCALAPPDAtriangle, outline), a fibre on a Bézier path, a Bragg reflector, a GRIN lens, the XOR, AND and OR gates under`LogicGatePart` and a zone plate (both Jeroen's, 2026-10-21/22). Painted into the scene pixels, red the index (red 0 amirror), blue for absorbers, green never; a part edit is a simulation edit. The menus of kinds share `PartMenuEntries`- (`ProjectTree.xaml`), added by `ProjectTree.MenuEntries`, not as an `ItemsSource`.+ (`ProjectTree.xaml`), added by `ProjectTree.MenuEntries`, not as an `ItemsSource`. **Coatings** (2026-10-29, the user's+ request, so Jeroen's drawn scenes become parts): a lens, a shape, the GRIN lens and the fibre are `CoatedPart`s, the AR+ band a `Layer` at √n or `Graded`, a raised cosine from the pixel's index to the body (measured against linear, smooth-step+ and quintic in `OpticalParts.md`), on the faces `FrontCoated`, `BackCoated`, `SidesCoated` choose, classed by the outward+ normal in the part frame (within 45° of −x' front, of +x' back, else a side; a fibre's start face, end face and tube); a+ cavity's inner faces can stay bare. A fibre's cladding can absorb (`Absorption`, `AbsorptionRamp`: a hump in its outer+ part, a mode stripper, Jeroen's strips along his fibres).- File types `.wdproj` / `.wdscheme` are registered per user at start-up; unsaved edits ask on close.+- **Examples** (2026-10-29, the user's request): File > Examples lists the project files of the repository's `Examples`+ folder, embedded in the app (`EmbeddedResource` in the WPF project, `Examples.cs`), in file order with the two-digit+ number leading each name; one opens as an unsaved project named after its file in the title (`SuggestedFileName`, which+ Save As proposes; an import is named the same way). The set is 23 files+ curated from Jeroen's examples (the Classic ones through the importer, open edges with a rim, his drawn scenes rebuilt+ from parts: the ball lens, the spherical mirror, the test glass, the fibres); the UI harnesses count the File menu's+ entries, so a new entry moves their Down presses.## Numbers (workstation: 10-core Xeon without AVX2, RTX 2080, 64 GB)@@ -319,10 +332,15 @@ numbers: no GPU JPEG, no OpenCL colouring at presentation, no `Vector256`, no Di`library_check` (100+ checks: engines, store, renderer, half tables, screen path, schemes, probes, scratch, reduced preview, importer, export, parts, group move, open edges, work groups on a prime grid, ranges, XOR gate, zone plate, gate port follower, history, clipboard).UI, all on `Common.ps1`, with their check counts: `PreviewCheck` 43, `RunCheck` 71, `LanguageCheck` 11,-`ProbeGraphCheck` 39, `ImportCheck` 10, `ExportCheck` 41, `PreviewQualityCheck` 35, `SceneImageCheck` 8,+`ProbeGraphCheck` 39, `ImportCheck` 10, `ExportCheck` 44, `PreviewQualityCheck` 35, `SceneImageCheck` 8,`ColorPickerCheck` 13, `KeyboardCheck` 13, `AboutCheck` 18, `SelectionCheck` 10. Test projects `tiny*.wdproj` sit beside them. A harnesssets the persisted settings it expects (split orientation, preview quality). Known flake: a second app start in onescript sometimes comes up active; only the foreground guard fails then.+**Manual figures** (2026-10-27): `Screenshots.ps1` on `Common.ps1` writes `Assets/*.svg` (the PNG inlined, numbered+badges at UI Automation rectangles) and `Assets/Legend.md` (what each number marks): the window, the menus, the tree,+the preview and the timeline from `C:\Work\Examples_WDN\Example14_wave_in_2_boxes.wdproj` at a scratch frame, the+properties form of every object kind from `figures.wdproj` beside the harnesses (one of each kind, made with the+library's adders); dark theme, English, 100 %, the user's 1314 × 1126 arrangement, his settings put back afterwards.## People, name, licensediff --git a/Examples/Example01_Simple_source.wdproj b/Examples/Example01_Simple_source.wdprojnew file mode 100644index 0000000..a3191a6--- /dev/null+++ b/Examples/Example01_Simple_source.wdproj@@ -0,0 +1,12 @@+<?xml version="1.0" encoding="utf-8"?>+<Project Version="3" Seed="763629701">+ <Description>Simple omnidirectional pulsed source with a smoothed square intensity profile.</Description>+ <Scene DampingEdge="-64" />+ <Simulation TimeDecay="13" />+ <Display>+ <Field ColorScheme="Ice and fire" Brightness="70" BlackLevel="-0.05" />+ <Intensity ColorScheme="Default intensity" Brightness="50" />+ <Video Quality="70" />+ </Display>+ <Source Name="Source 1" X="943" Y="507" Frequency="50" Mode="Pulsed" PulseShape="SmoothedSquare" />+</Project>\ No newline at end of filediff --git a/Examples/Example02_Coherent_source.wdproj b/Examples/Example02_Coherent_source.wdprojnew file mode 100644index 0000000..be31046--- /dev/null+++ b/Examples/Example02_Coherent_source.wdproj@@ -0,0 +1,15 @@+<?xml version="1.0" encoding="utf-8"?>+<Project Version="3" Seed="1798021273">+ <Description>Featuring a 21 x 7 composite source that emits a continuous gaussian wave beam</Description>+ <Scene DampingEdge="-64" />+ <Display>+ <Field ColorScheme="Default field" Brightness="6" BlackLevel="-0.05" />+ <Intensity ColorScheme="Inferno" Brightness="7" />+ <Video Quality="70" />+ </Display>+ <Source Name="Source 2" X="382" Y="557" Frequency="50" Amplitude="30">+ <Array SizeX="21" SizeY="7" SpacingX="32" SpacingY="16" />+ </Source>+ <Probe Name="Probe 1" Active="false" AX="1171" AY="226" BoxSize="Large" BoxX="13" BoxY="11" />+ <Probe Name="Probe 2" Layer="Intensity" Measurement="IntegratedValue" Kind="Line" AX="1555" AY="143" BX="1555" BY="962" BoxSize="ExtraLarge" BoxX="16" BoxY="13" YMin="0" YMax="0.005" />+</Project>\ No newline at end of filediff --git a/Examples/Example03_Directional_pulsed_source.wdproj b/Examples/Example03_Directional_pulsed_source.wdprojnew file mode 100644index 0000000..1220589--- /dev/null+++ b/Examples/Example03_Directional_pulsed_source.wdproj@@ -0,0 +1,16 @@+<?xml version="1.0" encoding="utf-8"?>+<Project Version="3" Seed="743064765">+ <Description>Featuring a coherent pulsed assembly of sources that emits a directional stream of wave pulses.</Description>+ <Scene DampingEdge="-64" />+ <Simulation Steps="3000" VisualizeEvery="1" TimeDecay="7" />+ <Display>+ <Field ColorScheme="Default field" Brightness="4" BlackLevel="-0.05" />+ <Intensity ColorScheme="Default intensity" Brightness="8" />+ <Video Quality="70" />+ </Display>+ <Source Name="Source 1" X="402" Y="542" Amplitude="70" Mode="Pulsed" OffWidth="4">+ <Array SizeX="21" SizeY="11" SpacingX="16" SpacingY="8" />+ </Source>+ <Probe Name="Probe 1" AX="1401" AY="540" BoxSize="ExtraLarge" BoxX="21" BoxY="21" />+ <Probe Name="Probe 2" Layer="Intensity" Measurement="Value" AX="1425" AY="540" BoxSize="ExtraLarge" BoxX="21" BoxY="23" />+</Project>\ No newline at end of filediff --git a/Examples/Example04_3_frequencies.wdproj b/Examples/Example04_3_frequencies.wdprojnew file mode 100644index 0000000..fe426e0--- /dev/null+++ b/Examples/Example04_3_frequencies.wdproj@@ -0,0 +1,14 @@+<?xml version="1.0" encoding="utf-8"?>+<Project Version="3" Seed="1312957395">+ <Description>Geometric wave pattern resulting from 3 sources with different frequencies</Description>+ <Scene Width="1080" />+ <Simulation TimeDecay="17.1" />+ <Display>+ <Field ColorScheme="Default field" BlackLevel="-0.05" />+ <Intensity ColorScheme="Default intensity" />+ </Display>+ <Source Name="Source 1" X="525" Y="440" Frequency="95" />+ <Source Name="Source 2" X="525" Y="500" />+ <Source Name="Source 3" X="525" Y="560" Frequency="97" />+ <Probe Name="Probe 1" Layer="Intensity" Measurement="Value" Kind="Line" AX="1024" AY="156" BX="1024" BY="851" BoxX="680" BoxY="880" />+</Project>\ No newline at end of filediff --git a/Examples/Example05_Small_incoherent_source.wdproj b/Examples/Example05_Small_incoherent_source.wdprojnew file mode 100644index 0000000..b4fc086--- /dev/null+++ b/Examples/Example05_Small_incoherent_source.wdproj@@ -0,0 +1,16 @@+<?xml version="1.0" encoding="utf-8"?>+<Project Version="3" Seed="1575669912">+ <Description>Simulation features a small (5x5 composite) source using randomized "off"-time and source frequency.</Description>+ <Scene DampingEdge="-64" />+ <Simulation Steps="4000" WaveSpeed="0.563" />+ <Display>+ <Field ColorScheme="Orange symmetry" Brightness="50" BlackLevel="-0.05" />+ <Intensity ColorScheme="Purple rain" Brightness="50" />+ <Video Quality="70" />+ </Display>+ <Source Name="Source 1" X="542" Y="532" Mode="Pulsed" PulseWidth="5" OffWidth="20" DetachAfter="2000">+ <Array SizeX="5" SizeY="5" SpacingX="3" SpacingY="3" RandomFrequency="50" RandomPhase="90" RandomOffWidth="19" RandomPosition="1" />+ </Source>+ <Probe Name="Probe 1" AX="695" AY="530" BoxSize="ExtraLarge" BoxX="14" BoxY="14" AutoScaleY="false" YMin="-0.02" YMax="0.02" />+ <Probe Name="Probe 2" Layer="Intensity" Measurement="Value" Kind="Line" AX="693" AY="530" BX="1690" BY="530" BoxSize="ExtraLarge" BoxX="16" BoxY="13" AutoScaleY="false" YMin="0" YMax="0.0001" />+</Project>\ No newline at end of filediff --git a/Examples/Example06_Large_incoherent_source.wdproj b/Examples/Example06_Large_incoherent_source.wdprojnew file mode 100644index 0000000..ce07245--- /dev/null+++ b/Examples/Example06_Large_incoherent_source.wdproj@@ -0,0 +1,16 @@+<?xml version="1.0" encoding="utf-8"?>+<Project Version="3" Seed="1529591424">+ <Description>Featuring a large (900+ composite) source that creates both spatially- as well as temporally incoherent wave emission</Description>+ <Scene Width="2500" Height="1500" DampingEdge="-64" />+ <Simulation Steps="10000" />+ <Display>+ <Field ColorScheme="Default field" Brightness="50" BlackLevel="-0.05" />+ <Intensity ColorScheme="Hot orange" Brightness="50" />+ <Video Quality="70" />+ </Display>+ <Source Name="Source 1" X="1221" Y="707" Frequency="150" Mode="Pulsed" PulseWidth="8" OffWidth="1000">+ <Array SizeX="31" SizeY="31" SpacingX="6" SpacingY="6" RandomFrequency="30" RandomPhase="180" RandomOffWidth="998" RandomPosition="3" />+ </Source>+ <Probe Name="Probe 1" Layer="Intensity" Measurement="IntegratedValue" Kind="Line" AX="1521" AY="700" BX="2427" BY="700" BoxSize="Large" BoxX="1847" BoxY="346" StartAfter="1250" />+ <Probe Name="Probe 2" Layer="Intensity" Measurement="IntegratedValue" Kind="Line" AX="639" AY="462" BX="644" BY="984" BoxSize="ExtraLarge" BoxX="280" BoxY="29" />+</Project>\ No newline at end of filediff --git a/Examples/Example07_Random_emitter_lattice.wdproj b/Examples/Example07_Random_emitter_lattice.wdprojnew file mode 100644index 0000000..b9a33e8--- /dev/null+++ b/Examples/Example07_Random_emitter_lattice.wdproj@@ -0,0 +1,16 @@+<?xml version="1.0" encoding="utf-8"?>+<Project Version="3" Seed="2016764161">+ <Description>Collection of 800+ sources distributed over the full animation space and emitting short random wave pulses with a varying frequency.</Description>+ <Scene DampingEdge="20" Edges="Reflective" />+ <Simulation Steps="10000" TimeDecay="3" />+ <Display>+ <Field ColorScheme="Ice and fire" Brightness="60" BlackLevel="-0.05" />+ <Intensity ColorScheme="Default intensity" Brightness="60" />+ <Video Quality="70" />+ </Display>+ <Source Name="emitter lattice" X="937" Y="537" Frequency="90" Mode="Pulsed" PulseWidth="4" OffWidth="1500">+ <Array SizeX="41" SizeY="21" SpacingX="50" SpacingY="50" RandomFrequency="30" RandomPhase="180" RandomOffWidth="1500" />+ </Source>+ <Probe Name="Probe 1" AX="458" AY="973" BoxX="4" BoxY="880" />+ <Probe Name="Probe 2" AX="1703" AY="239" BoxX="1513" BoxY="7" />+</Project>\ No newline at end of filediff --git a/Examples/Example08_Resonant_wave_in_cavity.wdproj b/Examples/Example08_Resonant_wave_in_cavity.wdprojnew file mode 100644index 0000000..43a00f5--- /dev/null+++ b/Examples/Example08_Resonant_wave_in_cavity.wdproj@@ -0,0 +1,14 @@+<?xml version="1.0" encoding="utf-8"?>+<Project Version="3" Seed="605215505">+ <Description>Wave energy released at the center of a cavity at almost the resonance frequency.</Description>+ <Scene Width="500" Height="500" DampingEdge="0" />+ <Display>+ <Field ColorScheme="Default field" Brightness="4.34" BlackLevel="-0.05" />+ <Intensity ColorScheme="Default intensity" Brightness="8.37" />+ </Display>+ <Source Name="Source 1" X="250" Y="250" Frequency="8" DetachAfter="462" />+ <Rectangle Name="Mirror background" X="250" Y="250" Mirror="true" Length="500" Width="500" />+ <Ellipse Name="Cavity" X="250" Y="250" RefractiveIndex="1" Length="400" Width="400" />+ <Probe Name="Probe 1" Kind="Line" AX="49" AY="250" BX="448" BY="250" BoxSize="Tiny" BoxX="49" BoxY="400" />+ <Probe Name="Probe 2" Layer="Intensity" Measurement="Value" Kind="Line" AX="499" AY="252" BX="3" BY="249" BoxSize="Tiny" BoxX="499" BoxY="400" StartAfter="1000" />+</Project>\ No newline at end of filediff --git a/Examples/Example09_Laplacian_dispersion.wdproj b/Examples/Example09_Laplacian_dispersion.wdprojnew file mode 100644index 0000000..31b601d--- /dev/null+++ b/Examples/Example09_Laplacian_dispersion.wdproj@@ -0,0 +1,20 @@+<?xml version="1.0" encoding="utf-8"?>+<Project Version="3" Seed="355814588">+ <Description>Visualization of dispersion (wavelength-dependent propagation speed) when using a third order Laplacian. To remove the dispersion, check the 4th order Laplacian checkbox under "Simulation".</Description>+ <Scene Width="1600" Height="800" />+ <Simulation FourthOrderLaplacian="false" />+ <Display>+ <Field ColorScheme="Default field" Brightness="81" BlackLevel="-0.05" />+ <Intensity ColorScheme="Hot orange" Brightness="87" />+ </Display>+ <Source Name="Source frequency = 30" X="105" Y="116" Frequency="30" Amplitude="20" />+ <Source Name="Source frequency = 60" X="105" Y="302" Frequency="60" Amplitude="40" />+ <Source Name="Source frequency = 120" X="107" Y="492" Frequency="120" Amplitude="60" />+ <Source Name="Source frequency = 240" X="108" Y="686" Frequency="240" Amplitude="80" />+ <Rectangle Name="Separation boundary 1" X="800" Y="23" RefractiveIndex="1" Absorption="255" Length="1600" Width="48" />+ <Rectangle Name="Separation boundary 2" X="802" Y="212" RefractiveIndex="1" Absorption="255" Length="1600" Width="48" />+ <Rectangle Name="Separation boundary 3" X="800" Y="390" RefractiveIndex="1" Absorption="255" Length="1600" Width="48" />+ <Rectangle Name="Separation boundary 4" X="802" Y="594" RefractiveIndex="1" Absorption="255" Length="1600" Width="48" />+ <Rectangle Name="Separation boundary 5" X="799" Y="776" RefractiveIndex="1" Absorption="255" Length="1600" Width="48" />+ <Rectangle Name="Back boundary" X="25" Y="399" RefractiveIndex="1" Absorption="255" Length="50" Width="800" />+</Project>\ No newline at end of filediff --git a/Examples/Example10_Beam_expansion.wdproj b/Examples/Example10_Beam_expansion.wdprojnew file mode 100644index 0000000..f788c71--- /dev/null+++ b/Examples/Example10_Beam_expansion.wdproj@@ -0,0 +1,19 @@+<?xml version="1.0" encoding="utf-8"?>+<Project Version="3" Seed="1645729814">+ <Description>A beam expander using a GRIN lens and a large confocal lens.</Description>+ <Scene Height="500" DampingEdge="16" />+ <Display>+ <Field ColorScheme="Default field" Brightness="1" BlackLevel="-0.05" OverlayGain="2.57" />+ <Intensity ColorScheme="Default intensity" Brightness="1" OverlayGain="2.87" />+ </Display>+ <Source Name="Coherent directional source" X="281" Y="237">+ <Array SizeX="15" SizeY="5" SpacingX="16" SpacingY="8" />+ </Source>+ <Rectangle Name="Absorber 1" X="276" Y="184" RefractiveIndex="1" Absorption="255" Length="400" Width="36" />+ <Rectangle Name="Absorber 2" X="280" Y="288" RefractiveIndex="1" Absorption="255" Length="388" Width="30" />+ <GrinLens Name="GRIN lens" X="523" Y="236" Coating="4" />+ <Lens Name="Confocal lens" X="994" Y="232" Coating="10" Diameter="396" R1="486" R2="-486" Thickness="110" />+ <Lens Name="Highly reflective mirror" X="145" Y="235" Mirror="true" Diameter="104" R1="14401" R2="-14401" Thickness="38" />+ <Rectangle Name="Mount 1" X="994" Y="450" RefractiveIndex="1" Absorption="255" Length="30" />+ <Rectangle Name="Mount 2" X="994" Y="22" RefractiveIndex="1" Absorption="255" Length="34" Width="54" />+</Project>\ No newline at end of filediff --git a/Examples/Example11_Zone_plate.wdproj b/Examples/Example11_Zone_plate.wdprojnew file mode 100644index 0000000..5931846--- /dev/null+++ b/Examples/Example11_Zone_plate.wdproj@@ -0,0 +1,12 @@+<?xml version="1.0" encoding="utf-8"?>+<Project Version="3" Seed="1022494554">+ <Description>One source and a zone plate</Description>+ <Scene Height="700" DampingEdge="32" />+ <Display>+ <Field ColorScheme="Default field" Brightness="92" BlackLevel="-0.05" OverlayGain="3.02" />+ <Intensity ColorScheme="Default intensity" Brightness="78" />+ </Display>+ <Source Name="Source 1" X="93" Y="331" />+ <ZonePlate Name="Zone plate 1" X="934" Y="351" Mount="true" MountWidth="107" Diameter="600" Thickness="16" Coating="0" DesignFrequency="160" FocalLength="500" />+ <Probe Name="Probe 1" Layer="Intensity" Measurement="IntegratedValue" Kind="Line" AX="1457" AY="505" BX="1458" BY="214" BoxX="1261" BoxY="2" />+</Project>\ No newline at end of filediff --git a/Examples/Example12_Pulse_splitter.wdproj b/Examples/Example12_Pulse_splitter.wdprojnew file mode 100644index 0000000..7bf9af2--- /dev/null+++ b/Examples/Example12_Pulse_splitter.wdproj@@ -0,0 +1,18 @@+<?xml version="1.0" encoding="utf-8"?>+<Project Version="3" Seed="47427475">+ <Description>Short coherent pulse divided by a beam splitter</Description>+ <Scene Width="1400" Height="900" DampingEdge="32" />+ <Display>+ <Field ColorScheme="Default field" Brightness="8.53" BlackLevel="-0.05" Preview="false" />+ <Intensity ColorScheme="Default intensity" Brightness="3.6" />+ </Display>+ <Source Name="Source 1" X="236" Y="477" DetachAfter="600">+ <Array SizeX="15" SizeY="5" SpacingX="16" SpacingY="8" />+ </Source>+ <Rectangle Name="Reflective cavity" X="221" Y="474" Mirror="true" Length="358" Width="204" />+ <Rectangle Name="Inner cavity" X="263" Y="476" RefractiveIndex="1" Length="300" Width="108" />+ <Rectangle Name="Absorber 1" X="257" Y="427" RefractiveIndex="1" Absorption="255" Length="284" Width="20" />+ <Rectangle Name="Absorber 2" X="257" Y="526" RefractiveIndex="1" Absorption="255" Length="284" Width="20" />+ <Rectangle Name="Beam splitter" X="819" Y="477" Coating="10" Length="380" Width="380" />+ <Rectangle Name="Splitting reflector (gap)" X="820" Y="477" Angle="45" RefractiveIndex="1" Length="533" Width="4" />+</Project>\ No newline at end of filediff --git a/Examples/Example13_Bragg_reflector.wdproj b/Examples/Example13_Bragg_reflector.wdprojnew file mode 100644index 0000000..49c97c3--- /dev/null+++ b/Examples/Example13_Bragg_reflector.wdproj@@ -0,0 +1,19 @@+<?xml version="1.0" encoding="utf-8"?>+<Project Version="3" Seed="717445987">+ <Description>Demo of a Bragg reflector. The layer thickness of each layer should be 1/4 lambda divided by the refractive index of the specific layer. However, reflectivity is strongly angle dependent.</Description>+ <Scene Width="1400" DampingEdge="64" />+ <Display>+ <Field ColorScheme="Default field" Brightness="8" BlackLevel="-0.05" Preview="false" />+ <Intensity ColorScheme="Simply red" Brightness="8" />+ </Display>+ <Source Name="Directional" X="239" Y="699" Frequency="50" DetachAfter="300">+ <Array SizeX="8" SizeY="4" SpacingX="32" SpacingY="16" />+ </Source>+ <BraggReflector Name="Bragg reflector 1" X="1093" Y="688" Angle="-23" Pairs="20" Thickness1="6" Thickness2="4" Width="772" />+ <Rectangle Name="Total reflector" X="224" Y="696" Mirror="true" Length="358" Width="204" />+ <Rectangle Name="Cavity RI = 1.0" X="266" Y="698" RefractiveIndex="1" Length="300" Width="108" />+ <Rectangle Name="Absorbing side 1" X="260" Y="649" RefractiveIndex="1" Absorption="255" Length="284" Width="20" />+ <Rectangle Name="Absorbing side 2" X="260" Y="748" RefractiveIndex="1" Absorption="255" Length="284" Width="20" />+ <Probe Name="Inside Bragg reflector" Layer="Intensity" Measurement="Value" Kind="Line" AX="1013" AY="608" BX="1203" BY="689" BoxX="786" BoxY="880" />+ <Probe Name="Outside Bragg reflector" Layer="Intensity" Measurement="Value" Kind="Line" AX="292" AY="159" BX="1008" BY="607" BoxX="808" BoxY="18" />+</Project>\ No newline at end of filediff --git a/Examples/Example14_Resonant_roundabout.wdproj b/Examples/Example14_Resonant_roundabout.wdprojnew file mode 100644index 0000000..22963b7--- /dev/null+++ b/Examples/Example14_Resonant_roundabout.wdproj@@ -0,0 +1,25 @@+<?xml version="1.0" encoding="utf-8"?>+<Project Version="3" Seed="314604207">+ <Description>Resonant roundabout with two sources and two exits. If you change the phase of one of the sources, waves will take the other exit.</Description>+ <Scene Width="1080" DampingEdge="31" />+ <Simulation Steps="5000" TimeDecay="1" />+ <Display>+ <Field ColorScheme="Yellow purple" Brightness="10" BlackLevel="-0.05" />+ <Intensity ColorScheme="Default intensity" Brightness="21" Preview="false" />+ </Display>+ <Source Name="Source 1" X="294" Y="137" Frequency="24.75" Amplitude="30" />+ <Source Name="Source 2" X="798" Y="828" Frequency="24.75" Amplitude="30" />+ <Rectangle Name="Reflective background" X="537" Y="547" Mirror="true" RefractiveIndex="1" AbsorptionRamp="1" Length="1080" Width="1080" />+ <Rectangle Name="Ramp 1" X="377" Y="139" RefractiveIndex="1" Length="332" Width="38" />+ <Rectangle Name="Ramp 2" X="705" Y="829" RefractiveIndex="1" Length="350" Width="36" />+ <Ellipse Name="Transparent path circle" X="537" Y="485" RefractiveIndex="1" Length="736" Width="728" />+ <Ellipse Name="Central reflector" X="536" Y="484" Mirror="true" Length="662" Width="652" />+ <Rectangle Name="Wave stop 1" X="210" Y="139" Absorption="223" AbsorptionRamp="72" Length="108" Width="100" />+ <Rectangle Name="Wave stop 2" X="879" Y="829" Absorption="223" AbsorptionRamp="72" Length="102" Width="98" />+ <Rectangle Name="Exit 1" X="931" Y="278" Angle="116" RefractiveIndex="1" Length="54" Width="227" />+ <Rectangle Name="Exit 2" X="147" Y="719" Angle="116" RefractiveIndex="1" Length="52" Width="235" />+ <Rectangle Name="Wave stop 3" X="15" Y="774" Angle="-67" Absorption="255" AbsorptionRamp="60" Length="114" Width="100" />+ <Rectangle Name="Wave stop 4" X="1057" Y="215" Angle="-63" Absorption="255" AbsorptionRamp="60" Length="114" Width="100" />+ <Probe Name="Probe 1" Layer="Intensity" Measurement="Value" AX="112" AY="740" BoxX="24" BoxY="861" AutoScaleY="false" YMin="0" YMax="0.002" />+ <Probe Name="Probe 2" Layer="Intensity" Measurement="Value" AX="978" AY="256" BoxX="664" BoxY="862" AutoScaleY="false" YMin="0" YMax="0.002" />+</Project>\ No newline at end of filediff --git a/Examples/Example15_Top_up_the_tank.wdproj b/Examples/Example15_Top_up_the_tank.wdprojnew file mode 100644index 0000000..3834a7c--- /dev/null+++ b/Examples/Example15_Top_up_the_tank.wdproj@@ -0,0 +1,28 @@+<?xml version="1.0" encoding="utf-8"?>+<Project Version="3" Seed="47427475">+ <Description>Filling a tank with radiative energy</Description>+ <Scene Width="1800" Height="900" DampingEdge="32" />+ <Simulation Steps="5000" />+ <Display>+ <Field ColorScheme="Default field" Brightness="8.53" BlackLevel="-0.05" Preview="false" />+ <Intensity ColorScheme="Default intensity" Brightness="3.6" />+ </Display>+ <Source Name="Coherent directional source" X="223" Y="227" DetachAfter="600">+ <Array SizeX="15" SizeY="5" SpacingX="16" SpacingY="8" />+ </Source>+ <Rectangle Name="Reflective housing" X="208" Y="224" Mirror="true" Length="358" Width="204" />+ <Rectangle Name="Inner cavity" X="250" Y="226" RefractiveIndex="1" Length="300" Width="108" />+ <Rectangle Name="Reflective tank" X="1423" Y="656" Mirror="true" Length="260" Width="248" />+ <Ellipse Name="Ball lens" X="840" Y="223" Coating="6" Length="148" Width="144" />+ <Rectangle Name="Absorber pinhole 1" X="582" Y="353" RefractiveIndex="1" Absorption="255" Length="50" Width="184" />+ <Rectangle Name="Absorber pinhole 2" X="576" Y="98" RefractiveIndex="1" Absorption="255" Length="50" Width="184" />+ <Ellipse Name="Reflective cavity" X="1424" Y="655" RefractiveIndex="1" Length="192" Width="186" />+ <Fiber Name="Fiber" X="1042" Y="223" CoreIndex="1.52" CoreDiameter="7" CladdingIndex="1.41" Ends="Round">+ <Node X="-109" Y="-3" OutX="67" />+ <Node X="150" Y="16" InX="-59" InY="-19" OutX="75" OutY="24" />+ <Node X="305" Y="108" InX="-26" InY="-28" OutX="26" OutY="27" />+ <Node X="375" Y="227" InX="-11" InY="-49" OutX="11" OutY="49" />+ <Node X="382" Y="356" InX="-1" InY="-20" OutX="1" OutY="20" />+ <Node X="382" Y="374" InX="-1" InY="-20" />+ </Fiber>+</Project>\ No newline at end of filediff --git a/Examples/Example16_Wave_in_2_boxes.wdproj b/Examples/Example16_Wave_in_2_boxes.wdprojnew file mode 100644index 0000000..e3a2312--- /dev/null+++ b/Examples/Example16_Wave_in_2_boxes.wdproj@@ -0,0 +1,23 @@+<?xml version="1.0" encoding="utf-8"?>+<Project Version="3" Seed="1006156977">+ <Description>Two boxes connected by a small pipe that allows for wave energy to flow from left to right (and back).</Description>+ <Scene Width="1500" Height="900" DampingEdge="11" />+ <Simulation Steps="10000" TimeDecay="5" />+ <Display>+ <Field ColorScheme="Yellow purple" Brightness="5" BlackLevel="-0.05" />+ <Intensity ColorScheme="Default intensity" Brightness="5" />+ <Video Quality="70" />+ </Display>+ <Source Name="Vertical source" X="134" Y="355" Frequency="21" Amplitude="50" Mode="Pulsed" PulseShape="SmoothedSquare" PulseWidth="20" OffWidth="4000" DetachAfter="1300">+ <Array SizeY="29" SpacingY="20" />+ </Source>+ <Source Name="Horizontal source" X="401" Y="627" Frequency="22" Amplitude="50" Mode="Pulsed" PulseShape="SmoothedSquare" PulseWidth="20" OffWidth="4000" DetachAfter="1300">+ <Array SizeX="29" SpacingX="20" />+ </Source>+ <Rectangle Name="Mirror background" X="750" Y="450" Mirror="true" Length="1500" Width="900" />+ <Rectangle Name="Left box" X="405" Y="353" RefractiveIndex="1" Length="600" Width="608" />+ <Rectangle Name="Right box" X="1120" Y="355" RefractiveIndex="1" Length="600" Width="608" />+ <Rectangle Name="Connection" X="761" Y="359" RefractiveIndex="1" Length="180" Width="62" />+ <Probe Name="Log Intensity distribution over boxes" Layer="Intensity" Measurement="Value" Kind="Line" AX="107" AY="357" BX="1414" BY="356" BoxX="576" BoxY="670" YScale="Logarithmic" />+ <Probe Name="Field amplitude diagonal left box" Kind="Line" AX="105" AY="652" BX="699" BY="57" BoxX="563" BoxY="679" />+</Project>\ No newline at end of filediff --git a/Examples/Example17_Hanbury_Brown_Twiss.wdproj b/Examples/Example17_Hanbury_Brown_Twiss.wdprojnew file mode 100644index 0000000..c99348e--- /dev/null+++ b/Examples/Example17_Hanbury_Brown_Twiss.wdproj@@ -0,0 +1,20 @@+<?xml version="1.0" encoding="utf-8"?>+<Project Version="3" Seed="569738983">+ <Description>Switch on the small source and the two telescopes will see highly correlated signals. Switch on the large source and the correlation disappears. This is a demonstration of the area of coherence as can be measured in the HBT experiment to measure the ratio between the diameter and the distance of a star.</Description>+ <Scene Width="2400" Height="1000" DampingEdge="64" />+ <Simulation Steps="5000" />+ <Display>+ <Field ColorScheme="Yellow purple" BlackLevel="-0.05" />+ <Intensity ColorScheme="Gray scales" />+ </Display>+ <Source Name="Large Incoherent Source" Enabled="false" X="146" Y="520" Mode="Pulsed" OffWidth="50">+ <Array SizeX="11" SizeY="11" RandomFrequency="30" RandomPhase="179" RandomOffWidth="49" RandomPosition="4" />+ </Source>+ <Source Name="Small Incoherent Source" X="156" Y="422" Mode="Pulsed" OffWidth="50">+ <Array SizeX="11" SizeY="11" SpacingX="2" SpacingY="2" RandomFrequency="30" RandomPhase="179" RandomOffWidth="49" RandomPosition="4" />+ </Source>+ <GrinLens Name="Telescope 1" X="1863" Y="368" Coating="8" Length="108" />+ <GrinLens Name="Telescope 2" X="1864" Y="593" Coating="9" Length="108" />+ <Probe Name="Probe 1" Layer="Intensity" Measurement="Value" AX="1923" AY="595" BoxX="1942" BoxY="499" />+ <Probe Name="Probe 2" Layer="Intensity" Measurement="Value" AX="1925" AY="367" BoxX="1942" BoxY="262" />+</Project>\ No newline at end of filediff --git a/Examples/Example18_XOR_AND_OR_logic.wdproj b/Examples/Example18_XOR_AND_OR_logic.wdprojnew file mode 100644index 0000000..7f281a7--- /dev/null+++ b/Examples/Example18_XOR_AND_OR_logic.wdproj@@ -0,0 +1,20 @@+<?xml version="1.0" encoding="utf-8"?>+<Project Version="3" Seed="729055211">+ <Description>3 logical wave gates chained together</Description>+ <Scene Width="1400" Height="401" DampingEdge="32" />+ <Simulation Steps="4000" />+ <Display>+ <Field ColorScheme="Default field" BlackLevel="-0.05" />+ <Intensity ColorScheme="Default intensity" />+ </Display>+ <Source Name="Source 1" X="123" Y="133" Frequency="50" />+ <Source Name="Source 2" X="123" Y="193" Frequency="50" Amplitude="80.6" Mode="Pulsed" PulseShape="SmoothedSquare" />+ <Source Name="Source 3" X="663" Y="72" Frequency="50" Amplitude="67.47" Mode="Pulsed" PulseShape="SmoothedSquare" OffWidth="20" />+ <Rectangle Name="Absorber 1" X="90" Y="161" Absorption="255" AbsorptionRamp="77" Length="62" Width="172" />+ <Rectangle Name="Absorber 2" X="1246" Y="166" Absorption="255" AbsorptionRamp="197" Length="88" Width="248" />+ <Rectangle Name="Absorber 3" X="601" Y="73" Absorption="255" AbsorptionRamp="77" Length="124" />+ <XorGate Name="XOR gate 1" X="396" Y="163" InputCoated="false" OutputCoated="false" />+ <AndGate Name="AND gate 1" X="936" Y="103" InputCoated="false" />+ <OrGate Name="OR gate 1" X="935" Y="223" InputCoated="false" />+ <Probe Name="Probe 1" Layer="Intensity" Measurement="Value" Kind="Line" AX="1173" AY="301" BX="1175" BY="31" BoxSize="Small" BoxX="282" BoxY="232" StartAfter="1100" />+</Project>\ No newline at end of filediff --git a/Examples/Example19_Sources_with_spherical_mirror.wdproj b/Examples/Example19_Sources_with_spherical_mirror.wdprojnew file mode 100644index 0000000..558d336--- /dev/null+++ b/Examples/Example19_Sources_with_spherical_mirror.wdproj@@ -0,0 +1,15 @@+<?xml version="1.0" encoding="utf-8"?>+<Project Version="3" Seed="823923544">+ <Description>Wave pulse emitted from the center of the curvature of a mirror, reflecting and then returning to the point of emission. Featuring timed probes. Notice that this simulation runs extremely fast on the GPU, when no video export is selected.</Description>+ <Scene DampingEdge="-64" />+ <Simulation Steps="3000" WaveSpeed="0.563" TimeDecay="8" />+ <Display>+ <Field ColorScheme="Yellow purple" Brightness="80" BlackLevel="-0.05" Preview="false" />+ <Intensity ColorScheme="Copper" Brightness="80" />+ <Video Quality="80" />+ </Display>+ <Source Name="Source 1" X="570" Y="544" Frequency="200" Mode="Pulsed" PulseWidth="70" OffWidth="100" DetachAfter="670" />+ <Source Name="Source 2" X="570" Y="521" Frequency="200" Mode="Pulsed" PulseWidth="70" OffWidth="100" DetachAfter="670" />+ <Lens Name="Spherical mirror" X="1713" Y="534" Mirror="true" Diameter="824" R1="-1129" R2="0" Thickness="50" />+ <Probe Name="Probe 2" Layer="Intensity" Measurement="IntegratedValue" Kind="Line" AX="572" AY="483" BX="571" BY="579" BoxSize="ExtraLarge" BoxX="572" BoxY="730" StartAfter="2000" />+</Project>\ No newline at end of filediff --git a/Examples/Example20_Test_glass.wdproj b/Examples/Example20_Test_glass.wdprojnew file mode 100644index 0000000..00ae1b9--- /dev/null+++ b/Examples/Example20_Test_glass.wdproj@@ -0,0 +1,18 @@+<?xml version="1.0" encoding="utf-8"?>+<Project Version="3" Seed="1352239642">+ <Description>The simulation shows the interference pattern created between two high-refractive index surfaces in close proximity of each other under a small angle.</Description>+ <Scene DampingEdge="-64" />+ <Simulation Steps="4000" TimeDecay="5" />+ <Display>+ <Field ColorScheme="Default field" BlackLevel="-0.05" />+ <Intensity ColorScheme="Default intensity" Brightness="5" />+ <Video Quality="70" />+ </Display>+ <Source Name="Source 1" X="185" Y="549" Frequency="160" Mode="Pulsed" PulseWidth="30" OffWidth="2000">+ <Array SizeX="15" SizeY="5" SpacingY="5" />+ </Source>+ <Rectangle Name="Left plate" X="1330" Y="592" Angle="-4.73" Coating="20" CoatingProfile="Graded" BackCoated="false" SidesCoated="false" RefractiveIndex="2.55" Length="61" Width="500" />+ <Rectangle Name="Right plate" X="1411" Y="598" Angle="-7.39" Coating="20" CoatingProfile="Graded" FrontCoated="false" SidesCoated="false" RefractiveIndex="2.55" Width="500" />+ <Probe Name="Probe 1" Layer="Intensity" Measurement="IntegratedValue" Kind="Line" AX="1612" AY="375" BX="1565" BY="860" BoxSize="Large" BoxX="1411" BoxY="9" StartAfter="1725" />+ <Probe Name="Probe 2" Layer="Intensity" Measurement="IntegratedValue" Kind="Line" AX="1070" AY="229" BX="986" BY="878" BoxSize="Large" BoxX="523" BoxY="14" StartAfter="1700" />+</Project>\ No newline at end of filediff --git a/Examples/Example21_Ball_lens.wdproj b/Examples/Example21_Ball_lens.wdprojnew file mode 100644index 0000000..7da4ecc--- /dev/null+++ b/Examples/Example21_Ball_lens.wdproj@@ -0,0 +1,15 @@+<?xml version="1.0" encoding="utf-8"?>+<Project Version="3" Seed="1745615521">+ <Description>Continuous point source and high refractive index ball lens. Probe 2A-B features 1/r intensity decay from the source with some interference of some reflections superimposed on it.</Description>+ <Scene Width="2880" DampingEdge="-90" />+ <Simulation Steps="4000" />+ <Display>+ <Field ColorScheme="Default field" BlackLevel="-0.05" />+ <Intensity ColorScheme="Default intensity" />+ <Video Quality="70" />+ </Display>+ <Source Name="Source 1" X="139" Y="533" Frequency="40" />+ <Ellipse Name="Ball lens" X="1449" Y="535" Coating="22" CoatingProfile="Graded" RefractiveIndex="2.55" Length="488" Width="488" Linked="true" />+ <Probe Name="Probe 1" Layer="Intensity" Measurement="IntegratedValue" Kind="Line" AX="1638" AY="506" BX="1638" BY="573" BoxSize="ExtraLarge" BoxX="2162" BoxY="13" />+ <Probe Name="Probe 2" Layer="Intensity" Measurement="IntegratedValue" Kind="Line" AX="360" AY="528" BX="1102" BY="531" BoxSize="ExtraLarge" BoxX="2167" BoxY="675" StartAfter="1050" />+</Project>\ No newline at end of filediff --git a/Examples/Example22_Coherence_and_ball_lens.wdproj b/Examples/Example22_Coherence_and_ball_lens.wdprojnew file mode 100644index 0000000..3827d09--- /dev/null+++ b/Examples/Example22_Coherence_and_ball_lens.wdproj@@ -0,0 +1,17 @@+<?xml version="1.0" encoding="utf-8"?>+<Project Version="3" Seed="295456226">+ <Description>A coherent and directional source directing its waves at a ball lens with a high refractive index. It demonstrates Gaussian beam and Airy disk profiles</Description>+ <Scene Width="2880" DampingEdge="-64" />+ <Simulation Steps="3800" />+ <Display>+ <Field ColorScheme="Default field" Brightness="6" BlackLevel="-0.05" />+ <Intensity ColorScheme="Inferno" Brightness="6" />+ <Video Quality="70" />+ </Display>+ <Source Name="Source 2" X="258" Y="533" Frequency="50" Amplitude="30">+ <Array SizeX="20" SizeY="7" SpacingX="32" SpacingY="16" />+ </Source>+ <Ellipse Name="Ball lens" X="1449" Y="535" Coating="22" CoatingProfile="Graded" RefractiveIndex="2.55" Length="488" Width="488" Linked="true" />+ <Probe Name="Probe 1" Layer="Intensity" Measurement="IntegratedValue" Kind="Line" AX="938" AY="269" BX="938" BY="794" BoxSize="ExtraLarge" BoxX="12" BoxY="6" />+ <Probe Name="Probe 2" Layer="Intensity" Measurement="IntegratedValue" Kind="Line" AX="1625" AY="475" BX="1625" BY="599" BoxSize="ExtraLarge" BoxX="2130" BoxY="65" YMin="0" YMax="0.005" />+</Project>\ No newline at end of filediff --git a/Examples/Example23_Fibers.wdproj b/Examples/Example23_Fibers.wdprojnew file mode 100644index 0000000..74dd7a2--- /dev/null+++ b/Examples/Example23_Fibers.wdproj@@ -0,0 +1,47 @@+<?xml version="1.0" encoding="utf-8"?>+<Project Version="3" Seed="1567109718">+ <Description>Simulation of 3 different fibers:+- Top: single mode fiber+- Middle: narrow multi-mode fiber+- Bottom: wide multi-mode fiber+Includes the use of two probes, an A-B (line) field probe and a single point intensity probe.</Description>+ <Scene DampingEdge="-64" RefractiveIndex="1.01" />+ <Simulation Steps="6000" WaveSpeed="0.563" />+ <Display>+ <Field ColorScheme="Default field" Brightness="20" BlackLevel="-0.05" />+ <Intensity ColorScheme="Default intensity" Brightness="20" />+ <Video Quality="80" />+ </Display>+ <Source Name="Source 1" X="135" Y="198" Mode="Pulsed" PulseShape="SmoothedSquare" PulseWidth="15" OffWidth="15" />+ <Source Name="Source 2" X="147" Y="489" Mode="Pulsed" PulseShape="SmoothedSquare" PulseWidth="15" OffWidth="15" />+ <Source Name="Source 3" X="155" Y="835" Mode="Pulsed" PulseShape="SmoothedSquare" PulseWidth="15" OffWidth="15" />+ <Fiber Name="Single-mode fibre" X="880" Y="202" Coating="44" CoatingProfile="Graded" FrontCoated="false" SidesCoated="false" CoreDiameter="6" CladdingIndex="1.01" CladdingThickness="31" Absorption="252">+ <Node X="-787" Y="0" OutX="80" />+ <Node X="-543" Y="0" InX="-80" OutX="158" />+ <Node X="-177" Y="128" InX="-86" OutX="162" />+ <Node X="239" Y="-128" InX="-170" OutX="162" />+ <Node X="603" Y="0" InX="-186" OutX="60" />+ <Node X="800" Y="0" InX="-60" />+ </Fiber>+ <Fiber Name="Narrow multi-mode fibre" X="880" Y="490" Coating="44" CoatingProfile="Graded" FrontCoated="false" SidesCoated="false" CoreDiameter="16" CladdingIndex="1.01" CladdingThickness="31" Absorption="252">+ <Node X="-787" Y="0" OutX="80" />+ <Node X="-543" Y="0" InX="-80" OutX="158" />+ <Node X="-177" Y="128" InX="-86" OutX="162" />+ <Node X="239" Y="-128" InX="-170" OutX="162" />+ <Node X="603" Y="0" InX="-186" OutX="60" />+ <Node X="800" Y="0" InX="-60" />+ </Fiber>+ <Fiber Name="Wide multi-mode fibre" X="880" Y="837" Coating="44" CoatingProfile="Graded" FrontCoated="false" SidesCoated="false" CoreDiameter="52" CladdingIndex="1.01" CladdingThickness="51" Absorption="252" AbsorptionRamp="15">+ <Node X="-787" Y="0" OutX="80" />+ <Node X="-549" Y="0" InX="-80" OutX="158" />+ <Node X="-182" Y="128" InX="-86" OutX="158" />+ <Node X="234" Y="-128" InX="-166" OutX="158" />+ <Node X="599" Y="0" InX="-182" OutX="60" />+ <Node X="800" Y="0" InX="-60" />+ </Fiber>+ <Rectangle Name="Left absorber" X="0" Y="540" RefractiveIndex="1.01" Absorption="255" AbsorptionRamp="64" Length="260" Width="1208" />+ <Rectangle Name="Output separator 1" X="1760" Y="340" RefractiveIndex="1.01" Absorption="183" AbsorptionRamp="25" Length="360" Width="82" />+ <Rectangle Name="Output separator 2" X="1760" Y="648" RefractiveIndex="1.01" Absorption="183" AbsorptionRamp="25" Length="360" Width="82" />+ <Probe Name="Probe 1" Kind="Line" AX="1658" AY="772" BX="1658" BY="903" BoxSize="ExtraLarge" BoxX="1226" BoxY="4" AutoScaleY="false" YMin="-0.035" YMax="0.035" Window="5000" />+ <Probe Name="Probe 2" Layer="Intensity" Measurement="Value" AX="1630" AY="199" BoxSize="ExtraLarge" BoxX="4" BoxY="2" YMin="0" YMax="0.002" Window="10000" />+</Project>\ No newline at end of filediff --git a/OpticalParts.md b/OpticalParts.mdindex 9bffead..e655f9d 100644--- a/OpticalParts.md+++ b/OpticalParts.md@@ -51,9 +51,17 @@ checked.pixels. A part whose index is not painted (`PaintsIndex` false, the zone plate) writes blue alone.- **The angle** is in degrees, counter-clockwise on the screen, 0 pointing the part's axis x' along +x (the compositesource's convention); y' is across. Shapes face a source on the left (-x').-- **The AR coating** is a band of `Coating` pixels just inside the outline with the index √n (rounded to 0.01), the- quarter-wave idea without a tie to a wavelength; a quarter-wave band is λ / (4 √n) pixels thick, λ the wavelength the- source form shows. Mirrors and Bragg reflectors ignore it.+- **The AR coating** (`CoatedPart`: lens, shapes, GRIN lens) is a band of `Coating` pixels just inside the outline: with+ `CoatingProfile` `Layer` at the index √n (rounded to 0.01), the quarter-wave idea without a tie to a wavelength, a+ quarter-wave band being λ / (4 √n) pixels thick, λ the wavelength the source form shows; with `Graded` (2026-10-29, the+ user's request, after Jeroen's drawn scenes, whose glass faces ramp) the index rises from the medium outside, the index+ the pixel had before the part, to the body as a raised cosine of the depth over the thickness+ (`PartShape.GradedProfile`, measured under Coatings). `FrontCoated`, `BackCoated` and `SidesCoated` choose the faces,+ classed by their outward normal in the part frame: within 45° of −x' the front, of +x' the back, else a side (a lens's+ first surface, second surface and rim; a rectangle's four faces when its length runs along the beam); inside the band+ the nearest face decides, so a cavity's inner faces can stay bare. The fibre is a `CoatedPart` too (its start face the+ front, its end face the back, the tube the sides). Mirrors and Bragg reflectors ignore it; the gates' bands are their+ own measured design, a layer on the ends they coat.## Absorption@@ -70,14 +78,36 @@ absorption 255 every profile reflects a lot; over a 40 px ramp: linear 9 / 25 %,passes through 160 px. Quadratic was chosen (`PartShape.AbsorptionProfile`); 64 is the strength of the gates' absorbingcladding rim (`LogicGateDesign.Absorption`).+## Coatings++The graded band was measured the same way (2026-10-29): a plane pulse of six cycles, a column of emitters, on a deep+slab whose face carries the band, the reflected pulse's peak amplitude in a box before the face against a mirror face's,+for indices 2.55 and 1.50 at wavelengths of 10, 20 and 32 px with the 4th-order stencil. Amplitude as a share of the+mirror's (the reflectance is its square); the band profiles in the order linear, smooth step, quintic, raised cosine:++| face, n = 2.55 | λ 10 px | λ 20 px | λ 32 px |+|---|---|---|---|+| bare (theory 43.7 %) | 54 % | 46 % | 45 % |+| quarter-wave layer at √n, rounded to whole pixels (2, 3, 5) | 25 % | 8.8 % | 7.4 % |+| graded, ½ λ thick | 10.4 / 12.5 / 13.9 / 12.2 % | 11.2 / 11.8 / 13.5 / 11.6 % | 10.9 / 11.2 / 12.8 / 11.3 % |+| graded, 1 λ | 5.6 / 4.3 / 4.0 / 4.1 % | 6.1 / 4.1 / 4.4 / 4.1 % | 6.1 / 4.1 / 4.1 / 3.6 % |+| graded, 2 λ | 2.8 / 1.5 / 0.6 / 1.0 % | 3.2 / 0.9 / 0.8 / 1.0 % | 3.2 / 1.1 / 0.5 / 0.7 % |++For n = 1.50 (bare 20 to 22 %) the layer reflects 3.6 to 4.1 %, a ½ λ band 3.4 to 7.3 %, a 1 λ band 0.9 to 2.2 % and a+2 λ band 0.3 to 1.2 %, the profiles ordered as above. The raised cosine, (1 − cos πt) / 2, was chosen+(`PartShape.GradedProfile`): best or tied at one wavelength and within a few tenths of a percent of the quintic at two,+where the linear ramp reflects three to four times as much; the linear ramp wins only at half a wavelength, by a percent.+A layer beats every band only when the band is thinner than half a wavelength, and at λ = 10 px the rounding of its+thickness to 2 px (1.6 is the quarter wave) costs it most. Jeroen's drawn scenes ramp linearly over 20 to 22 px.+## The kindsEvery part has `Name`, `Enabled` (a disabled part is not painted), `X`, `Y` (its centre, ≥ 0) and `Angle` (−180, 180].Defaults and ranges are in the attributes beside each property; the figures below are the defaults.**Lens** (`LensPart`, `<Lens>`): `Diameter` 200 across the axis, `Thickness` 40 on the axis, signed radii `R1` 300 (the-left surface) and `R2` −300 (R1 > 0 and R2 < 0 bulge outward, 0 is flat), `RefractiveIndex` 1.50, `Coating`,-`Absorption`, `AbsorptionRamp` 40, `Mirror`. The strip |y'| ≤ D/2 between the surfaces x'₁ = −t/2 + s₁(y') and+left surface) and `R2` −300 (R1 > 0 and R2 < 0 bulge outward, 0 is flat), `RefractiveIndex` 1.50, the coating of+`CoatedPart`, `Absorption`, `AbsorptionRamp` 40, `Mirror`. The strip |y'| ≤ D/2 between the surfaces x'₁ = −t/2 + s₁(y') andx'₂ = t/2 + s₂(y'), the sag s(y') = R − sign(R)·√(R² − y'²). The diameter and the centre thickness are the bulk: a radiustoo curved for them is raised to the smallest that fits (`FitRadii`), so the lens fills its diameter and the edge isnever negative (a diameter of 2000 with radii of 300 had given a tiny lens). The form shows the edge thickness, and a@@ -97,8 +127,8 @@ handle sets is rounded to a hundredth of a pixel (`RadiusOfSag`; 2026-10-28, Jerbox and the file), R1 towards +∞ and R2 towards −∞, so a convex surface gets a hair flatter and a concave one a hairdeeper, never the other way, and the rounding never brings on the refit of a lens whose surfaces meet at the rim.-**Shapes** (`ShapePart`: `Mirror`, `RefractiveIndex` 1.50, `Coating`, `Absorption`, `AbsorptionRamp` 40, over an-outline each kind generates). One class per shape, not a shape mode inside one class (the user's point, 2026-10-18: a+**Shapes** (`ShapePart`, a `CoatedPart`: `Mirror`, `RefractiveIndex` 1.50, the coating, `Absorption`, `AbsorptionRamp`+40, over an outline each kind generates). One class per shape, not a shape mode inside one class (the user's point, 2026-10-18: aside length alone made every rectangle a square):- `PolygonPart` (`<Polygon>`): regular, `Sides` 6 (3..64) of `Side` 60 px, a face centred on -x'; for an odd count thefirst vertex lies on +x'.@@ -112,7 +142,12 @@ side length alone made every rectangle a square):- `OutlinePart` (`<Outline>`): free `Points` relative to the centre before rotation; fewer than three paint nothing.**Fibre** (`FiberPart`, `<Fiber>`): `CoreIndex` 1.50, `CoreDiameter` 20, `CladdingIndex` 1.45, `CladdingThickness` 10-(0 for a bare core), `Coating`, `Ends` Flat or Round. The path (2026-10-22, the user's request, replacing a polyline whose+(0 for a bare core), the coating of `CoatedPart` (2026-10-29: the start face is the front, the end face the back, the+tube the sides; a graded band on the back alone is the author's output taper), `Absorption` and `AbsorptionRamp`+(2026-10-29, the user's request, after the author's fibre scene, whose fibres run between absorbing strips: the+cladding's absorbing band, a hump in its outer part 2 × ramp wide that rises and falls by the quadratic profile, so the+guided mode's tail in the inner cladding is untouched and stray light is eaten from either side without a damping step;+nothing on a bare core; a mode stripper), `Ends` Flat or Round. The path (2026-10-22, the user's request, replacing a polyline whosejoints were sharp bends) is cubic Bézier segments through `Nodes` (`<Node X Y InX InY OutX OutY Smooth>`, the handlesoffsets from the node, sparse); a new fibre gets two nodes at (−100, 0) and (100, 0) with handles a third of the wayalong. A smooth node (the default) lines its handles up when switched on (`AlignNode`; a node without handles is seeded@@ -127,7 +162,8 @@ fibre across a Full HD canvas: 51 ms against 1.3 s without the grid), and superstyped; a quarter-wave layer is λ / (4 n).**GRIN lens** (`GrinLensPart`, `<GrinLens>`): a rectangle of `Length` 100 and `Diameter` 100 whose index falls from-`CentreIndex` 1.80 to `EdgeIndex` 1.50 as n(y') = n_c − (n_c − n_e)·(2y'/D)²; `Coating`.+`CentreIndex` 1.80 to `EdgeIndex` 1.50 as n(y') = n_c − (n_c − n_e)·(2y'/D)²; the coating of `CoatedPart`, its end+faces the front and back, its long sides the sides.**Logic gates** (`LogicGatePart`: `XorGatePart`, `AndGatePart`, `OrGatePart`; `<XorGate>`, `<AndGate>`, `<OrGate>`;under "+ Part" > Optical logic). One 2 × 2 directional coupler, the combining half of a Mach-Zehnder (the user'sdiff --git a/WaveDudeNext.WPF/Converters/TitleConverter.cs b/WaveDudeNext.WPF/Converters/TitleConverter.csindex 5487223..9fe7893 100644--- a/WaveDudeNext.WPF/Converters/TitleConverter.cs+++ b/WaveDudeNext.WPF/Converters/TitleConverter.cs@@ -22,10 +22,11 @@ using System.Windows.Data;namespace WaveDudeNext.WPF.Converters;/// <summary>-/// Builds the window title from the application name, the open file and the dirty flag: the non-empty-/// parts joined with " - ", an asterisk after the file for unsaved edits, and "Untitled*" when an unsaved-/// project has no file yet (the word is looked up in the current language's strings on every conversion;-/// the window refreshes the binding on a language switch).+/// Builds the window title from the application name, the open file, the dirty flag and the suggested file name:+/// the non-empty parts joined with " - ", the suggested name standing in for a missing file (an unsaved import or a+/// shipped example, 2026-10-29), "Untitled" when an unsaved project has no name at all (the word is looked up in the+/// current language's strings on every conversion; the window refreshes the binding on a language switch), and an+/// asterisk after it for unsaved edits./// </summary>public sealed class TitleConverter : IMultiValueConverter{@@ -35,15 +36,21 @@ public sealed class TitleConverter : IMultiValueConverterstring title = values.Length > 0 ? values[0]?.ToString() ?? "" : "";string file = values.Length > 1 ? values[1]?.ToString() ?? "" : "";bool dirty = values.Length > 2 && values[2] is true;+ if (file.Length == 0 && values.Length > 3)+ {+ // an unsaved project that came from somewhere, a shipped example or an import, is named after its file (2026-10-29, the user's request)+ file = values[3]?.ToString() ?? "";+ }+ if (file.Length == 0)+ {+ // a new project reads "Untitled" from the start (2026-10-29, the user's point: the bar was empty until an edit turned it into "Untitled*")+ file = Application.Current?.TryFindResource("Untitled") as string ?? "Untitled";+ }if (dirty){- if (file.Length == 0)- {- file = Application.Current?.TryFindResource("Untitled") as string ?? "Untitled";- }file += "*";}- return file.Length == 0 ? title : title + " - " + file;+ return title + " - " + file;}/// <inheritdoc/>diff --git a/WaveDudeNext.WPF/Examples.cs b/WaveDudeNext.WPF/Examples.csnew file mode 100644index 0000000..cc5a63f--- /dev/null+++ b/WaveDudeNext.WPF/Examples.cs@@ -0,0 +1,81 @@+// SPDX-License-Identifier: GPL-3.0-or-later+// Copyright (C) 2026 Alexander Graef <[email protected]>+//+// This file is part of WaveDude Next, a 2D wave simulator.+//+// Based on the work of+// Jeroen Vleggaar (Huygens Optics), author of Wave Dude 2D, Copyright (C) 2026+// <https://www.youtube.com/@HuygensOptics>, <https://www.huygensoptics.com>+// 0x23 (Diffraction Limited), author of WaveSimulator2D+// <https://www.youtube.com/@DiffractionLimited>, <https://github.com/0x23/WaveSimulator2D>+//+// WaveDude Next is free software: you can redistribute it and/or modify it under+// the terms of the GNU General Public License as published by the Free Software+// Foundation, either version 3 of the License, or (at your option) any later+// version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or+// <https://www.gnu.org/licenses/>.++using System.IO;+using System.Reflection;+using System.Text.RegularExpressions;++namespace WaveDudeNext.WPF;++/// <summary>+/// One shipped example: the embedded resource, the file it came from, its number and its title ("Example07_Random_emitter_lattice.wdproj"+/// is number 7, "Random emitter lattice").+/// </summary>+/// <param name="Resource">The manifest resource name, "Examples/" and the file name.</param>+/// <param name="FileName">The project file's name, suggested when the example is saved.</param>+/// <param name="Number">The two-digit number leading the file name, the examples' order.</param>+/// <param name="Title">The file name after the number, underscores as spaces.</param>+public sealed record ExampleEntry(string Resource, string FileName, int Number, string Title)+{+ /// <summary>The menu entry's text: the number and the title.</summary>+ public string Header => $"{Number}. {Title}";++ /// <summary>The menu entry's automation id, "MenuExample" and the two-digit number.</summary>+ public string AutomationId => $"MenuExample{Number:00}";+}++/// <summary>+/// The examples shipped inside the application (2026-10-29, the user's request): the project files of the repository's+/// Examples folder, embedded as resources named "Examples/<file>" (the project file), listed under File > Examples+/// in file order, a two-digit number leading each name, and opened as unsaved projects that suggest their file name+/// when saved. Read once on first use; any thread.+/// </summary>+public static class Examples+{+ /// <summary>The resource names' prefix.</summary>+ public const string ResourcePrefix = "Examples/";++ private static readonly Regex NamePattern = new(@"^Example(\d+)_(.+)\.wdproj$", RegexOptions.CultureInvariant);++ /// <summary>Every shipped example in file order.</summary>+ public static IReadOnlyList<ExampleEntry> All { get; } = Load();++ /// <summary>Opens an example's project file; the caller disposes the stream.</summary>+ /// <exception cref="FileNotFoundException">No such resource.</exception>+ public static Stream Open(ExampleEntry example) =>+ typeof(Examples).Assembly.GetManifestResourceStream(example.Resource) ?? throw new FileNotFoundException("The example is not in the application.", example.Resource);++ private static List<ExampleEntry> Load()+ {+ var examples = new List<ExampleEntry>();+ foreach (string resource in typeof(Examples).Assembly.GetManifestResourceNames())+ {+ if (!resource.StartsWith(ResourcePrefix, StringComparison.Ordinal))+ {+ continue;+ }+ string fileName = resource[ResourcePrefix.Length..];+ Match match = NamePattern.Match(fileName);+ // a file outside the pattern is listed last, under its own name+ int number = match.Success ? int.Parse(match.Groups[1].Value, System.Globalization.CultureInfo.InvariantCulture) : int.MaxValue;+ string title = (match.Success ? match.Groups[2].Value : Path.GetFileNameWithoutExtension(fileName)).Replace('_', ' ');+ examples.Add(new ExampleEntry(resource, fileName, number, title));+ }+ examples.Sort((a, b) => a.Number != b.Number ? a.Number.CompareTo(b.Number) : string.CompareOrdinal(a.FileName, b.FileName));+ return examples;+ }+}diff --git a/WaveDudeNext.WPF/MainWindow.Export.cs b/WaveDudeNext.WPF/MainWindow.Export.csindex 1ee6b79..38adc11 100644--- a/WaveDudeNext.WPF/MainWindow.Export.cs+++ b/WaveDudeNext.WPF/MainWindow.Export.cs@@ -533,7 +533,7 @@ public partial class MainWindow}/// <summary>The project's name for a file: the project file's name, else "project".</summary>- private string ProjectName() => Path.GetFileNameWithoutExtension(Filename ?? _suggestedFileName ?? "project");+ private string ProjectName() => Path.GetFileNameWithoutExtension(Filename ?? SuggestedFileName ?? "project");/// <summary>/// A completed run the export can read: the current one when it is fresh, finished or in progress, anddiff --git a/WaveDudeNext.WPF/MainWindow.xaml b/WaveDudeNext.WPF/MainWindow.xamlindex 7a7ffc6..d77fa9a 100644--- a/WaveDudeNext.WPF/MainWindow.xaml+++ b/WaveDudeNext.WPF/MainWindow.xaml@@ -56,6 +56,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<converters:RunStatusConverter x:Key="RunStatus" /><RoutedUICommand x:Key="FileOpenRecent" />+ <RoutedUICommand x:Key="FileOpenExample" /><RoutedUICommand x:Key="ShowMessages" Text="Show messages" /><RoutedUICommand x:Key="FileExit" Text="{StaticResource MenuFileExit}"><RoutedUICommand.InputGestures>@@ -77,6 +78,21 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<Setter Property="CommandParameter" Value="{Binding}" /></Style>+ <!-- one entry per shipped example (2026-10-29): its number and title as plain text, click opens it as an unsaved project -->+ <Style x:Key="ExampleMenuItemStyle" TargetType="{x:Type MenuItem}" BasedOn="{StaticResource {x:Type MenuItem}}">+ <Setter Property="Header" Value="{Binding Header}" />+ <Setter Property="HeaderTemplate">+ <Setter.Value>+ <DataTemplate>+ <TextBlock Text="{Binding}" />+ </DataTemplate>+ </Setter.Value>+ </Setter>+ <Setter Property="Command" Value="{StaticResource FileOpenExample}" />+ <Setter Property="CommandParameter" Value="{Binding}" />+ <Setter Property="AutomationProperties.AutomationId" Value="{Binding AutomationId}" />+ </Style>+<!-- one entry per registered pane: check mark follows IsShown, click toggles --><Style x:Key="PaneMenuItemStyle" TargetType="{x:Type MenuItem}" BasedOn="{StaticResource {x:Type MenuItem}}"><Setter Property="Header" Value="{Binding Title}" />@@ -149,6 +165,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<Binding Source="{StaticResource Title}" /><Binding Path="Filename" /><Binding Path="IsDirty" />+ <Binding Path="SuggestedFileName" /></MultiBinding></Window.Title>@@ -156,6 +173,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<CommandBinding Command="ApplicationCommands.New" Executed="OnFileNew" /><CommandBinding Command="ApplicationCommands.Open" Executed="OnFileOpen" /><CommandBinding Command="{StaticResource FileOpenRecent}" Executed="OnFileOpen" />+ <CommandBinding Command="{StaticResource FileOpenExample}" Executed="OnFileOpenExample" /><CommandBinding Command="ApplicationCommands.Save" Executed="OnFileSave" /><CommandBinding Command="ApplicationCommands.SaveAs" Executed="OnFileSaveAs" /><CommandBinding Command="ApplicationCommands.Close" CanExecute="CanFileClose" Executed="OnFileClose" />@@ -228,6 +246,10 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<MenuItem Header="{DynamicResource MenuFileRecent}"ItemsSource="{Binding RecentFiles, Source={x:Static p:Settings.Default}}"ItemContainerStyle="{StaticResource RecentFileMenuItemStyle}" controls:MenuIcon.Glyph="" />+ <!-- the shipped examples, embedded in the application (2026-10-29) -->+ <MenuItem Header="{DynamicResource MenuFileExamples}" AutomationProperties.AutomationId="MenuExamples"+ ItemsSource="{x:Static local:Examples.All}"+ ItemContainerStyle="{StaticResource ExampleMenuItemStyle}" controls:MenuIcon.Glyph="" /><Separator /><MenuItem Command="ApplicationCommands.Save" Header="{DynamicResource MenuFileSave}" controls:MenuIcon.Glyph="" /><MenuItem Command="ApplicationCommands.SaveAs" Header="{DynamicResource MenuFileSaveAs}" InputGestureText="Ctrl+Shift+S" controls:MenuIcon.Glyph="" />diff --git a/WaveDudeNext.WPF/MainWindow.xaml.cs b/WaveDudeNext.WPF/MainWindow.xaml.csindex e387a7e..bdd80d4 100644--- a/WaveDudeNext.WPF/MainWindow.xaml.cs+++ b/WaveDudeNext.WPF/MainWindow.xaml.cs@@ -217,7 +217,7 @@ public partial class MainWindow : WindowDiscardRun();Project = loaded;Filename = fileName;- _suggestedFileName = null;+ SuggestedFileName = null;RestoreExportPaths();Logger.Info("Opened '{Path}'", fileName);RememberRecent(fileName);@@ -247,7 +247,7 @@ public partial class MainWindow : WindowProject = imported;Filename = null;SyncSceneImage("imported");- _suggestedFileName = LegacyProject.SuggestedFileName(fileName, projectName);+ SuggestedFileName = LegacyProject.SuggestedFileName(fileName, projectName);foreach (string note in notes){Logger.Warn(note);@@ -262,8 +262,19 @@ public partial class MainWindow : Window}}- /// <summary>The file name Save As proposes for an unsaved imported project; null otherwise.</summary>- private string? _suggestedFileName;+ public static readonly DependencyProperty SuggestedFileNameProperty = DependencyProperty.Register(+ nameof(SuggestedFileName), typeof(string), typeof(MainWindow), new PropertyMetadata(null));++ /// <summary>+ /// The file name of an unsaved project that came from somewhere, an import or a shipped example: the title shows it+ /// (2026-10-29, the user's request: an opened example read as nothing, then "Untitled*") and Save As proposes it; null+ /// for a new project.+ /// </summary>+ public string? SuggestedFileName+ {+ get => (string?)GetValue(SuggestedFileNameProperty);+ set => SetValue(SuggestedFileNameProperty, value);+ }/// <summary>A scheme file (double-clicked, or given on the command line) is added to the open project's own schemes and selected.</summary>private void ImportScheme(string fileName)@@ -368,7 +379,7 @@ public partial class MainWindow : WindowFilter = (string)FindResource("SaveFileDialogFilter"),DefaultExt = ProjectExtension,AddExtension = true,- FileName = _suggestedFileName ?? "",+ FileName = SuggestedFileName ?? "",};return dialog.ShowDialog(this) == true && SaveFile(dialog.FileName);}@@ -413,7 +424,7 @@ public partial class MainWindow : WindowDiscardRun();Project = new Project();Filename = null;- _suggestedFileName = null;+ SuggestedFileName = null;projectTree.SelectRoot();}@@ -439,6 +450,37 @@ public partial class MainWindow : Window}}+ /// <summary>+ /// File > Examples > one of the shipped examples (2026-10-29): the embedded project becomes the open project, unsaved+ /// and without a file, its own file name suggested when it is saved; a failure leaves the previous project open.+ /// </summary>+ private void OnFileOpenExample(object sender, ExecutedRoutedEventArgs e)+ {+ if (e.Parameter is not ExampleEntry example || !ConfirmDiscard())+ {+ return;+ }+ try+ {+ Project loaded;+ using (Stream stream = Examples.Open(example))+ {+ loaded = Project.Load(stream);+ }+ DiscardRun();+ Project = loaded;+ Filename = null;+ SuggestedFileName = example.FileName;+ Logger.Info("Opened the example '{Title}' ({Resource})", example.Title, example.Resource);+ projectTree.SelectRoot();+ }+ catch (Exception ex)+ {+ Logger.Error(ex, "Error while opening the example '{Resource}'", example.Resource);+ ShowError(string.Format((string)FindResource("OpenError"), example.FileName), ex);+ }+ }+private void OnFileSave(object sender, ExecutedRoutedEventArgs e){if (Filename == null)@@ -458,7 +500,7 @@ public partial class MainWindow : WindowFilter = (string)FindResource("SaveFileDialogFilter"),DefaultExt = ProjectExtension,AddExtension = true,- FileName = Filename ?? _suggestedFileName ?? "",+ FileName = Filename ?? SuggestedFileName ?? "",};if (dialog.ShowDialog(this) == true){@@ -480,7 +522,7 @@ public partial class MainWindow : WindowDiscardRun();Project = new Project();Filename = null;- _suggestedFileName = null;+ SuggestedFileName = null;projectTree.SelectRoot();}diff --git a/WaveDudeNext.WPF/Strings/Strings.DE.xaml b/WaveDudeNext.WPF/Strings/Strings.DE.xamlindex a8c67ad..bb2e589 100644--- a/WaveDudeNext.WPF/Strings/Strings.DE.xaml+++ b/WaveDudeNext.WPF/Strings/Strings.DE.xaml@@ -29,6 +29,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="MenuFileNew">_Neues Projekt</s:String><s:String x:Key="MenuFileOpen">Projekt _öffnen...</s:String><s:String x:Key="MenuFileRecent">_Zuletzt geöffnet</s:String>+ <s:String x:Key="MenuFileExamples">Beis_piele</s:String><s:String x:Key="MenuFileSave">_Speichern</s:String><s:String x:Key="MenuFileSaveAs">Speichern _unter...</s:String><s:String x:Key="MenuFileClose">Projekt s_chließen</s:String>@@ -597,7 +598,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="Label.LensPart.RefractiveIndex">Brechungsindex</s:String><s:String x:Key="Hint.LensPart.RefractiveIndex">Brechungsindex des Glases, 1,00 bis 2,55 in Schritten von 0,01.</s:String><s:String x:Key="Label.LensPart.Coating">Entspiegelung</s:String>- <s:String x:Key="Hint.LensPart.Coating">Dicke in Pixeln des entspiegelnden Bands direkt innerhalb des Umrisses mit dem Index √n; 0 für keines. Eine λ/4-Schicht ist λ / (4 √n) Pixel dick, λ die Wellenlänge aus dem Quellenformular.</s:String>+ <s:String x:Key="Hint.LensPart.Coating">Dicke in Pixeln des entspiegelnden Bands direkt innerhalb des Umrisses; 0 für keines. Eine λ/4-Schicht ist λ / (4 √n) Pixel dick, λ die Wellenlänge aus dem Quellenformular; ein graduelles Band ist ab einer Wellenlänge umso besser, je dicker es ist.</s:String><s:String x:Key="Label.LensPart.Absorption">Absorption</s:String><s:String x:Key="Hint.LensPart.Absorption">Wie stark das Bauteil Wellen absorbiert, 0 (gar nicht) bis 255, wie der Blaukanal des Szenenbilds. Sie steigt über die Absorptionsrampe vom Umriss an von null an, damit eine Welle in das Bauteil eindringt statt reflektiert zu werden. Ein Spiegel ignoriert sie.</s:String><s:String x:Key="Label.LensPart.AbsorptionRamp">Absorptionsrampe</s:String>@@ -617,7 +618,15 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="Label.ShapePart.RefractiveIndex">Brechungsindex</s:String><s:String x:Key="Hint.ShapePart.RefractiveIndex">Brechungsindex des Glases, 1,00 bis 2,55 in Schritten von 0,01.</s:String><s:String x:Key="Label.ShapePart.Coating">Entspiegelung</s:String>- <s:String x:Key="Hint.ShapePart.Coating">Dicke in Pixeln des entspiegelnden Bands direkt innerhalb des Umrisses mit dem Index √n; 0 für keines. Eine λ/4-Schicht ist λ / (4 √n) Pixel dick, λ die Wellenlänge aus dem Quellenformular.</s:String>+ <s:String x:Key="Hint.ShapePart.Coating">Dicke in Pixeln des entspiegelnden Bands direkt innerhalb des Umrisses; 0 für keines. Eine λ/4-Schicht ist λ / (4 √n) Pixel dick, λ die Wellenlänge aus dem Quellenformular; ein graduelles Band ist ab einer Wellenlänge umso besser, je dicker es ist.</s:String>+ <s:String x:Key="Label.CoatedPart.CoatingProfile">Profil der Entspiegelung</s:String>+ <s:String x:Key="Hint.CoatedPart.CoatingProfile">Wie der Index durch das Band verläuft: eine Schicht mit √n, die λ/4-Idee, oder ein gradueller Anstieg vom Medium außen zum Glas. Ein graduelles Band reflektiert ab einer Wellenlänge Dicke weniger als eine Schicht, bei jeder Wellenlänge; eine Schicht nur bei der, für die sie bemessen ist.</s:String>+ <s:String x:Key="Label.CoatedPart.FrontCoated">Vorderseite entspiegeln</s:String>+ <s:String x:Key="Hint.CoatedPart.FrontCoated">Das Band auf die Vorderseite legen: die Flächen, die einer Quelle links zugewandt sind, die erste Fläche einer Linse. Abwählen lässt sie blank, wie die Innenflächen eines Resonators.</s:String>+ <s:String x:Key="Label.CoatedPart.BackCoated">Rückseite entspiegeln</s:String>+ <s:String x:Key="Hint.CoatedPart.BackCoated">Das Band auf die Rückseite legen: die Flächen, die von einer Quelle links abgewandt sind, die zweite Fläche einer Linse. Abwählen lässt sie blank.</s:String>+ <s:String x:Key="Label.CoatedPart.SidesCoated">Seiten entspiegeln</s:String>+ <s:String x:Key="Hint.CoatedPart.SidesCoated">Das Band auf die Seiten legen: die Flächen, die weder vorn noch hinten sind, der Rand einer Linse, die schmalen Enden einer Platte. Abwählen lässt sie blank.</s:String><s:String x:Key="Label.ShapePart.Absorption">Absorption</s:String><s:String x:Key="Hint.ShapePart.Absorption">Wie stark das Bauteil Wellen absorbiert, 0 (gar nicht) bis 255, wie der Blaukanal des Szenenbilds. Sie steigt über die Absorptionsrampe vom Umriss an von null an, damit eine Welle in das Bauteil eindringt statt reflektiert zu werden. Ein Spiegel ignoriert sie.</s:String><s:String x:Key="Label.ShapePart.AbsorptionRamp">Absorptionsrampe</s:String>@@ -657,7 +666,11 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="Label.FiberPart.CladdingThickness">Manteldicke</s:String><s:String x:Key="Hint.FiberPart.CladdingThickness">Dicke des Mantels um den Kern in Pixeln; 0 für einen blanken Kern.</s:String><s:String x:Key="Label.FiberPart.Coating">Entspiegelung</s:String>- <s:String x:Key="Hint.FiberPart.Coating">Dicke in Pixeln des entspiegelnden Bands direkt innerhalb der Außengrenze mit dem Index √n; 0 für keines.</s:String>+ <s:String x:Key="Hint.FiberPart.Coating">Dicke in Pixeln des entspiegelnden Bands direkt innerhalb der Außengrenze und der Endflächen; 0 für keines. Eine λ/4-Schicht ist λ / (4 √n) Pixel dick, λ die Wellenlänge aus dem Quellenformular; ein graduelles Band ist ab einer Wellenlänge umso besser, je dicker es ist.</s:String>+ <s:String x:Key="Label.FiberPart.Absorption">Absorption des Mantels</s:String>+ <s:String x:Key="Hint.FiberPart.Absorption">Spitzenabsorption des absorbierenden Bands im Mantel, 0 (keine) bis 255, als Blaukanal des Szenenbilds: ein Buckel im äußeren Teil des Mantels, der über die Bandbreite von nichts ansteigt, seinen Gipfel erreicht und zur Außenkante wieder auf nichts abfällt, sodass der Ausläufer der geführten Welle unberührt bleibt und Streulicht von beiden Seiten geschluckt wird. Nichts bei einem nackten Kern.</s:String>+ <s:String x:Key="Label.FiberPart.AbsorptionRamp">Absorptionsband</s:String>+ <s:String x:Key="Hint.FiberPart.AbsorptionRamp">Die halbe Breite des absorbierenden Bands in Pixeln: die Absorption steigt über so viele Pixel zum Gipfel an und fällt über ebenso viele zur Außenkante ab. Ein Band breiter als der Mantel wird in ihn gestaucht.</s:String><s:String x:Key="Label.FiberPart.Ends">Enden</s:String><s:String x:Key="Hint.FiberPart.Ends">Wie die beiden Enden geschnitten sind: flach, gerade quer zum Pfad wie eine gebrochene Faser, oder mit dem Außenradius gerundet. Die AR-Beschichtung folgt einer flachen Endfläche.</s:String><s:String x:Key="Label.FiberPart.Nodes">Knoten</s:String>@@ -697,7 +710,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="Label.GrinLensPart.EdgeIndex">Index am Rand</s:String><s:String x:Key="Hint.GrinLensPart.EdgeIndex">Brechungsindex am Rand, 1,00 bis 2,55 in Schritten von 0,01. Das Profil zwischen Achse und Rand ist parabolisch.</s:String><s:String x:Key="Label.GrinLensPart.Coating">Entspiegelung</s:String>- <s:String x:Key="Hint.GrinLensPart.Coating">Dicke in Pixeln des entspiegelnden Bands direkt innerhalb des Umrisses mit dem Index √n; 0 für keines.</s:String>+ <s:String x:Key="Hint.GrinLensPart.Coating">Dicke in Pixeln des entspiegelnden Bands direkt innerhalb des Umrisses; 0 für keines. Eine λ/4-Schicht ist λ / (4 √n) Pixel dick, λ die Wellenlänge aus dem Quellenformular; ein graduelles Band ist ab einer Wellenlänge umso besser, je dicker es ist.</s:String><s:String x:Key="Label.LogicGatePart.DesignFrequency">Entwurfsfrequenz</s:String><s:String x:Key="Hint.LogicGatePart.DesignFrequency">Die Quellfrequenz, für die das Gatter entworfen ist, auf derselben Skala wie die Frequenz einer Quelle: die Frequenz der speisenden Quellen. Die Wellenlänge und daraus Kernbreite, Koppler und Phasenabschnitt folgen daraus, das Gatter arbeitet also nur bei dieser Frequenz.</s:String><s:String x:Key="Label.LogicGatePart.Coating">Entspiegelung</s:String>@@ -738,6 +751,8 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="Hint.LogicGatePart.PortSpacing">Abstand zwischen den beiden Eingängen und zwischen den beiden Ausgängen in Pixeln. Ein Wert unter dem, was der Entwurf braucht, um die Arme getrennt zu halten, wird darauf angehoben, und das Feld zeigt den verwendeten Abstand.</s:String><s:String x:Key="Enum.FiberEnds.Flat">Flach</s:String><s:String x:Key="Enum.FiberEnds.Round">Rund</s:String>+ <s:String x:Key="Enum.CoatingProfile.Layer">Schicht</s:String>+ <s:String x:Key="Enum.CoatingProfile.Graded">Graduell</s:String><s:String x:Key="Enum.TriangleType.Equilateral">Gleichseitig</s:String><s:String x:Key="Enum.TriangleType.RightIsosceles">Rechtwinklig-gleichschenklig (45°)</s:String><s:String x:Key="Enum.TriangleType.ThirtySixtyNinety">30-60-90</s:String>diff --git a/WaveDudeNext.WPF/Strings/Strings.EN.xaml b/WaveDudeNext.WPF/Strings/Strings.EN.xamlindex 0ab6d93..d400a08 100644--- a/WaveDudeNext.WPF/Strings/Strings.EN.xaml+++ b/WaveDudeNext.WPF/Strings/Strings.EN.xaml@@ -29,6 +29,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="MenuFileNew">_New Project</s:String><s:String x:Key="MenuFileOpen">_Open Project...</s:String><s:String x:Key="MenuFileRecent">_Recent Projects</s:String>+ <s:String x:Key="MenuFileExamples">Exam_ples</s:String><s:String x:Key="MenuFileSave">_Save</s:String><s:String x:Key="MenuFileSaveAs">Save _As...</s:String><s:String x:Key="MenuFileClose">_Close Project</s:String>@@ -599,7 +600,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="Label.LensPart.RefractiveIndex">Refractive index</s:String><s:String x:Key="Hint.LensPart.RefractiveIndex">Refractive index of the glass, 1.00 to 2.55 in steps of 0.01.</s:String><s:String x:Key="Label.LensPart.Coating">AR coating</s:String>- <s:String x:Key="Hint.LensPart.Coating">Thickness in pixels of the anti-reflection band just inside the outline, with the index √n; 0 for none. A quarter-wave coating is λ / (4 √n) pixels thick, λ being the wavelength the source form shows.</s:String>+ <s:String x:Key="Hint.LensPart.Coating">Thickness in pixels of the anti-reflection band just inside the outline; 0 for none. A quarter-wave layer is λ / (4 √n) pixels thick, λ being the wavelength the source form shows; a graded band is the better the thicker, from a wavelength on.</s:String><s:String x:Key="Label.LensPart.Absorption">Absorption</s:String><s:String x:Key="Hint.LensPart.Absorption">How strongly the part absorbs waves, 0 (not at all) to 255, as the scene image's blue channel. It rises from nothing at the outline over the absorption ramp, so a wave enters the part instead of being reflected. A mirror ignores it.</s:String><s:String x:Key="Label.LensPart.AbsorptionRamp">Absorption ramp</s:String>@@ -619,7 +620,15 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="Label.ShapePart.RefractiveIndex">Refractive index</s:String><s:String x:Key="Hint.ShapePart.RefractiveIndex">Refractive index of the glass, 1.00 to 2.55 in steps of 0.01.</s:String><s:String x:Key="Label.ShapePart.Coating">AR coating</s:String>- <s:String x:Key="Hint.ShapePart.Coating">Thickness in pixels of the anti-reflection band just inside the outline, with the index √n; 0 for none. A quarter-wave coating is λ / (4 √n) pixels thick, λ being the wavelength the source form shows.</s:String>+ <s:String x:Key="Hint.ShapePart.Coating">Thickness in pixels of the anti-reflection band just inside the outline; 0 for none. A quarter-wave layer is λ / (4 √n) pixels thick, λ being the wavelength the source form shows; a graded band is the better the thicker, from a wavelength on.</s:String>+ <s:String x:Key="Label.CoatedPart.CoatingProfile">Coating profile</s:String>+ <s:String x:Key="Hint.CoatedPart.CoatingProfile">How the index runs through the band: a layer at √n, the quarter-wave idea, or a graded rise from the medium outside to the glass. A graded band reflects less than a layer once it is a wavelength thick or more, at any wavelength; a layer only at the wavelength it is cut for.</s:String>+ <s:String x:Key="Label.CoatedPart.FrontCoated">Coat the front</s:String>+ <s:String x:Key="Hint.CoatedPart.FrontCoated">Put the band on the front: the faces turned toward a source on the left, a lens's first surface. Clear it to leave them bare, as the inner faces of a cavity are.</s:String>+ <s:String x:Key="Label.CoatedPart.BackCoated">Coat the back</s:String>+ <s:String x:Key="Hint.CoatedPart.BackCoated">Put the band on the back: the faces turned away from a source on the left, a lens's second surface. Clear it to leave them bare.</s:String>+ <s:String x:Key="Label.CoatedPart.SidesCoated">Coat the sides</s:String>+ <s:String x:Key="Hint.CoatedPart.SidesCoated">Put the band on the sides: the faces that are neither front nor back, a lens's rim, a slab's narrow ends. Clear it to leave them bare.</s:String><s:String x:Key="Label.ShapePart.Absorption">Absorption</s:String><s:String x:Key="Hint.ShapePart.Absorption">How strongly the part absorbs waves, 0 (not at all) to 255, as the scene image's blue channel. It rises from nothing at the outline over the absorption ramp, so a wave enters the part instead of being reflected. A mirror ignores it.</s:String><s:String x:Key="Label.ShapePart.AbsorptionRamp">Absorption ramp</s:String>@@ -659,7 +668,11 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="Label.FiberPart.CladdingThickness">Cladding thickness</s:String><s:String x:Key="Hint.FiberPart.CladdingThickness">Thickness of the cladding around the core in pixels; 0 for a bare core.</s:String><s:String x:Key="Label.FiberPart.Coating">AR coating</s:String>- <s:String x:Key="Hint.FiberPart.Coating">Thickness in pixels of the anti-reflection band just inside the outer boundary, with the index √n; 0 for none.</s:String>+ <s:String x:Key="Hint.FiberPart.Coating">Thickness in pixels of the anti-reflection band just inside the outer boundary and the end faces; 0 for none. A quarter-wave layer is λ / (4 √n) pixels thick, λ being the wavelength the source form shows; a graded band is the better the thicker, from a wavelength on.</s:String>+ <s:String x:Key="Label.FiberPart.Absorption">Cladding absorption</s:String>+ <s:String x:Key="Hint.FiberPart.Absorption">Peak absorption of the cladding's absorbing band, 0 (not at all) to 255, as the scene image's blue channel: a hump in the outer part of the cladding, rising over the band width from nothing, peaking, and falling to nothing at the outer edge, so the guided wave's tail stays untouched and stray light is absorbed from either side. Nothing on a bare core.</s:String>+ <s:String x:Key="Label.FiberPart.AbsorptionRamp">Absorption band</s:String>+ <s:String x:Key="Hint.FiberPart.AbsorptionRamp">Half the absorbing band's width in pixels: the absorption rises over this many pixels to its peak and falls over as many to the outer edge. A band wider than the cladding is squeezed into it.</s:String><s:String x:Key="Label.FiberPart.Ends">Ends</s:String><s:String x:Key="Hint.FiberPart.Ends">How the two ends are cut: flat, straight across the path like a cleaved fibre, or rounded with the outer radius. The AR coating follows a flat end face.</s:String><s:String x:Key="Label.FiberPart.Nodes">Nodes</s:String>@@ -699,7 +712,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="Label.GrinLensPart.EdgeIndex">Edge index</s:String><s:String x:Key="Hint.GrinLensPart.EdgeIndex">Refractive index at the edge, 1.00 to 2.55 in steps of 0.01. The profile between the axis and the edge is parabolic.</s:String><s:String x:Key="Label.GrinLensPart.Coating">AR coating</s:String>- <s:String x:Key="Hint.GrinLensPart.Coating">Thickness in pixels of the anti-reflection band just inside the outline, with the index √n; 0 for none.</s:String>+ <s:String x:Key="Hint.GrinLensPart.Coating">Thickness in pixels of the anti-reflection band just inside the outline; 0 for none. A quarter-wave layer is λ / (4 √n) pixels thick, λ being the wavelength the source form shows; a graded band is the better the thicker, from a wavelength on.</s:String><s:String x:Key="Label.LogicGatePart.DesignFrequency">Design frequency</s:String><s:String x:Key="Hint.LogicGatePart.DesignFrequency">The source frequency the gate is designed for, on the same scale as a source's frequency: the frequency of the sources that drive it. The wavelength, and from it the core width, the coupler and the phase section, follow from it, so the gate works at this frequency only.</s:String><s:String x:Key="Label.LogicGatePart.Coating">AR coating</s:String>@@ -740,6 +753,8 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="Hint.LogicGatePart.PortSpacing">Distance between the two inputs, and between the two outputs, in pixels. A value below what the design needs to keep the arms apart is raised to it, and the box shows the spacing used.</s:String><s:String x:Key="Enum.FiberEnds.Flat">Flat</s:String><s:String x:Key="Enum.FiberEnds.Round">Round</s:String>+ <s:String x:Key="Enum.CoatingProfile.Layer">Layer</s:String>+ <s:String x:Key="Enum.CoatingProfile.Graded">Graded</s:String><s:String x:Key="Enum.TriangleType.Equilateral">Equilateral</s:String><s:String x:Key="Enum.TriangleType.RightIsosceles">Right isosceles (45°)</s:String><s:String x:Key="Enum.TriangleType.ThirtySixtyNinety">30-60-90</s:String>diff --git a/WaveDudeNext.WPF/Strings/Strings.FR.xaml b/WaveDudeNext.WPF/Strings/Strings.FR.xamlindex 72cd7a1..9721f4a 100644--- a/WaveDudeNext.WPF/Strings/Strings.FR.xaml+++ b/WaveDudeNext.WPF/Strings/Strings.FR.xaml@@ -29,6 +29,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="MenuFileNew">_Nouveau projet</s:String><s:String x:Key="MenuFileOpen">_Ouvrir un projet...</s:String><s:String x:Key="MenuFileRecent">Projets _récents</s:String>+ <s:String x:Key="MenuFileExamples">Exem_ples</s:String><s:String x:Key="MenuFileSave">_Enregistrer</s:String><s:String x:Key="MenuFileSaveAs">Enregistrer _sous...</s:String><s:String x:Key="MenuFileClose">_Fermer le projet</s:String>@@ -597,7 +598,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="Label.LensPart.RefractiveIndex">Indice de réfraction</s:String><s:String x:Key="Hint.LensPart.RefractiveIndex">Indice de réfraction du verre, de 1,00 à 2,55 par pas de 0,01.</s:String><s:String x:Key="Label.LensPart.Coating">Traitement antireflet</s:String>- <s:String x:Key="Hint.LensPart.Coating">Épaisseur en pixels de la bande antireflet juste à l'intérieur du contour, d'indice √n ; 0 pour aucune. Une couche quart d'onde fait λ / (4 √n) pixels, λ étant la longueur d'onde affichée dans le formulaire de la source.</s:String>+ <s:String x:Key="Hint.LensPart.Coating">Épaisseur en pixels de la bande antireflet juste à l'intérieur du contour ; 0 pour aucune. Une couche quart d'onde fait λ / (4 √n) pixels, λ étant la longueur d'onde affichée dans le formulaire de la source ; une bande graduelle est d'autant meilleure qu'elle est épaisse, à partir d'une longueur d'onde.</s:String><s:String x:Key="Label.LensPart.Absorption">Absorption</s:String><s:String x:Key="Hint.LensPart.Absorption">Force avec laquelle le composant absorbe les ondes, de 0 (pas du tout) à 255, comme le canal bleu de l'image de la scène. Elle croît depuis zéro au contour le long de la rampe d'absorption, pour qu'une onde entre dans le composant au lieu d'être réfléchie. Un miroir l'ignore.</s:String><s:String x:Key="Label.LensPart.AbsorptionRamp">Rampe d'absorption</s:String>@@ -617,7 +618,15 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="Label.ShapePart.RefractiveIndex">Indice de réfraction</s:String><s:String x:Key="Hint.ShapePart.RefractiveIndex">Indice de réfraction du verre, de 1,00 à 2,55 par pas de 0,01.</s:String><s:String x:Key="Label.ShapePart.Coating">Traitement antireflet</s:String>- <s:String x:Key="Hint.ShapePart.Coating">Épaisseur en pixels de la bande antireflet juste à l'intérieur du contour, d'indice √n ; 0 pour aucune. Une couche quart d'onde fait λ / (4 √n) pixels, λ étant la longueur d'onde affichée dans le formulaire de la source.</s:String>+ <s:String x:Key="Hint.ShapePart.Coating">Épaisseur en pixels de la bande antireflet juste à l'intérieur du contour ; 0 pour aucune. Une couche quart d'onde fait λ / (4 √n) pixels, λ étant la longueur d'onde affichée dans le formulaire de la source ; une bande graduelle est d'autant meilleure qu'elle est épaisse, à partir d'une longueur d'onde.</s:String>+ <s:String x:Key="Label.CoatedPart.CoatingProfile">Profil du traitement</s:String>+ <s:String x:Key="Hint.CoatedPart.CoatingProfile">Comment l'indice varie dans la bande : une couche d'indice √n, l'idée du quart d'onde, ou une montée graduelle du milieu extérieur vers le verre. Une bande graduelle réfléchit moins qu'une couche dès qu'elle fait une longueur d'onde ou plus, à toute longueur d'onde ; une couche seulement à celle pour laquelle elle est taillée.</s:String>+ <s:String x:Key="Label.CoatedPart.FrontCoated">Traiter l'avant</s:String>+ <s:String x:Key="Hint.CoatedPart.FrontCoated">Mettre la bande sur l'avant : les faces tournées vers une source à gauche, la première surface d'une lentille. Décocher les laisse nues, comme les faces internes d'une cavité.</s:String>+ <s:String x:Key="Label.CoatedPart.BackCoated">Traiter l'arrière</s:String>+ <s:String x:Key="Hint.CoatedPart.BackCoated">Mettre la bande sur l'arrière : les faces tournées à l'opposé d'une source à gauche, la seconde surface d'une lentille. Décocher les laisse nues.</s:String>+ <s:String x:Key="Label.CoatedPart.SidesCoated">Traiter les côtés</s:String>+ <s:String x:Key="Hint.CoatedPart.SidesCoated">Mettre la bande sur les côtés : les faces qui ne sont ni avant ni arrière, le bord d'une lentille, les bouts étroits d'une lame. Décocher les laisse nues.</s:String><s:String x:Key="Label.ShapePart.Absorption">Absorption</s:String><s:String x:Key="Hint.ShapePart.Absorption">Force avec laquelle le composant absorbe les ondes, de 0 (pas du tout) à 255, comme le canal bleu de l'image de la scène. Elle croît depuis zéro au contour le long de la rampe d'absorption, pour qu'une onde entre dans le composant au lieu d'être réfléchie. Un miroir l'ignore.</s:String><s:String x:Key="Label.ShapePart.AbsorptionRamp">Rampe d'absorption</s:String>@@ -657,7 +666,11 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="Label.FiberPart.CladdingThickness">Épaisseur de la gaine</s:String><s:String x:Key="Hint.FiberPart.CladdingThickness">Épaisseur de la gaine autour du cœur en pixels ; 0 pour un cœur nu.</s:String><s:String x:Key="Label.FiberPart.Coating">Traitement antireflet</s:String>- <s:String x:Key="Hint.FiberPart.Coating">Épaisseur en pixels de la bande antireflet juste à l'intérieur de la limite extérieure, d'indice √n ; 0 pour aucune.</s:String>+ <s:String x:Key="Hint.FiberPart.Coating">Épaisseur en pixels de la bande antireflet juste à l'intérieur de la limite extérieure et des faces d'extrémité ; 0 pour aucune. Une couche quart d'onde fait λ / (4 √n) pixels, λ étant la longueur d'onde affichée dans le formulaire de la source ; une bande graduelle est d'autant meilleure qu'elle est épaisse, à partir d'une longueur d'onde.</s:String>+ <s:String x:Key="Label.FiberPart.Absorption">Absorption de la gaine</s:String>+ <s:String x:Key="Hint.FiberPart.Absorption">Absorption maximale de la bande absorbante de la gaine, 0 (aucune) à 255, comme le canal bleu de l'image de scène : une bosse dans la partie extérieure de la gaine, montant de rien sur la largeur de bande, culminant, puis retombant à rien au bord extérieur, de sorte que la queue de l'onde guidée reste intacte et que la lumière parasite est absorbée des deux côtés. Rien sur un cœur nu.</s:String>+ <s:String x:Key="Label.FiberPart.AbsorptionRamp">Bande d'absorption</s:String>+ <s:String x:Key="Hint.FiberPart.AbsorptionRamp">La demi-largeur de la bande absorbante en pixels : l'absorption monte sur autant de pixels jusqu'à son maximum et redescend sur autant jusqu'au bord extérieur. Une bande plus large que la gaine y est comprimée.</s:String><s:String x:Key="Label.FiberPart.Ends">Extrémités</s:String><s:String x:Key="Hint.FiberPart.Ends">Comment les deux extrémités sont coupées : à plat, droit en travers du trajet comme une fibre clivée, ou arrondies au rayon extérieur. Le traitement antireflet suit une face plate.</s:String><s:String x:Key="Label.FiberPart.Nodes">Nœuds</s:String>@@ -697,7 +710,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="Label.GrinLensPart.EdgeIndex">Indice au bord</s:String><s:String x:Key="Hint.GrinLensPart.EdgeIndex">Indice de réfraction au bord, de 1,00 à 2,55 par pas de 0,01. Le profil entre l'axe et le bord est parabolique.</s:String><s:String x:Key="Label.GrinLensPart.Coating">Traitement antireflet</s:String>- <s:String x:Key="Hint.GrinLensPart.Coating">Épaisseur en pixels de la bande antireflet juste à l'intérieur du contour, d'indice √n ; 0 pour aucune.</s:String>+ <s:String x:Key="Hint.GrinLensPart.Coating">Épaisseur en pixels de la bande antireflet juste à l'intérieur du contour ; 0 pour aucune. Une couche quart d'onde fait λ / (4 √n) pixels, λ étant la longueur d'onde affichée dans le formulaire de la source ; une bande graduelle est d'autant meilleure qu'elle est épaisse, à partir d'une longueur d'onde.</s:String><s:String x:Key="Label.LogicGatePart.DesignFrequency">Fréquence de conception</s:String><s:String x:Key="Hint.LogicGatePart.DesignFrequency">La fréquence de source pour laquelle la porte est conçue, sur la même échelle que la fréquence d'une source : celle des sources qui l'alimentent. La longueur d'onde, et d'elle la largeur des cœurs, le coupleur et la section de phase, en découlent ; la porte ne fonctionne donc qu'à cette fréquence.</s:String><s:String x:Key="Label.LogicGatePart.Coating">Traitement antireflet</s:String>@@ -738,6 +751,8 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="Hint.LogicGatePart.PortSpacing">Distance entre les deux entrées, et entre les deux sorties, en pixels. Une valeur inférieure à ce que la conception exige pour garder les bras séparés y est relevée, et la case affiche l'écart utilisé.</s:String><s:String x:Key="Enum.FiberEnds.Flat">Plates</s:String><s:String x:Key="Enum.FiberEnds.Round">Arrondies</s:String>+ <s:String x:Key="Enum.CoatingProfile.Layer">Couche</s:String>+ <s:String x:Key="Enum.CoatingProfile.Graded">Graduel</s:String><s:String x:Key="Enum.TriangleType.Equilateral">Équilatéral</s:String><s:String x:Key="Enum.TriangleType.RightIsosceles">Rectangle isocèle (45°)</s:String><s:String x:Key="Enum.TriangleType.ThirtySixtyNinety">30-60-90</s:String>diff --git a/WaveDudeNext.WPF/Strings/Strings.NL.xaml b/WaveDudeNext.WPF/Strings/Strings.NL.xamlindex c04604b..bcd74a7 100644--- a/WaveDudeNext.WPF/Strings/Strings.NL.xaml+++ b/WaveDudeNext.WPF/Strings/Strings.NL.xaml@@ -29,6 +29,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="MenuFileNew">_Nieuw project</s:String><s:String x:Key="MenuFileOpen">Project _openen...</s:String><s:String x:Key="MenuFileRecent">_Recente projecten</s:String>+ <s:String x:Key="MenuFileExamples">_Voorbeelden</s:String><s:String x:Key="MenuFileSave">Op_slaan</s:String><s:String x:Key="MenuFileSaveAs">Opslaan _als...</s:String><s:String x:Key="MenuFileClose">Project s_luiten</s:String>@@ -597,7 +598,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="Label.LensPart.RefractiveIndex">Brekingsindex</s:String><s:String x:Key="Hint.LensPart.RefractiveIndex">Brekingsindex van het glas, 1,00 tot 2,55 in stappen van 0,01.</s:String><s:String x:Key="Label.LensPart.Coating">AR-coating</s:String>- <s:String x:Key="Hint.LensPart.Coating">Dikte in pixels van de antireflectieband net binnen de omtrek, met index √n; 0 voor geen. Een kwartgolfcoating is λ / (4 √n) pixels dik, λ de golflengte die het bronformulier toont.</s:String>+ <s:String x:Key="Hint.LensPart.Coating">Dikte in pixels van de antireflectieband net binnen de omtrek; 0 voor geen. Een kwartgolflaag is λ / (4 √n) pixels dik, λ de golflengte die het bronformulier toont; een geleidelijke band is vanaf een golflengte beter naarmate hij dikker is.</s:String><s:String x:Key="Label.LensPart.Absorption">Absorptie</s:String><s:String x:Key="Hint.LensPart.Absorption">Hoe sterk het onderdeel golven absorbeert, 0 (helemaal niet) tot 255, zoals het blauwe kanaal van de scèneafbeelding. Ze stijgt vanaf nul bij de omtrek over de absorptiehelling, zodat een golf het onderdeel binnengaat in plaats van te worden teruggekaatst. Een spiegel negeert haar.</s:String><s:String x:Key="Label.LensPart.AbsorptionRamp">Absorptiehelling</s:String>@@ -617,7 +618,15 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="Label.ShapePart.RefractiveIndex">Brekingsindex</s:String><s:String x:Key="Hint.ShapePart.RefractiveIndex">Brekingsindex van het glas, 1,00 tot 2,55 in stappen van 0,01.</s:String><s:String x:Key="Label.ShapePart.Coating">AR-coating</s:String>- <s:String x:Key="Hint.ShapePart.Coating">Dikte in pixels van de antireflectieband net binnen de omtrek, met index √n; 0 voor geen. Een kwartgolfcoating is λ / (4 √n) pixels dik, λ de golflengte die het bronformulier toont.</s:String>+ <s:String x:Key="Hint.ShapePart.Coating">Dikte in pixels van de antireflectieband net binnen de omtrek; 0 voor geen. Een kwartgolflaag is λ / (4 √n) pixels dik, λ de golflengte die het bronformulier toont; een geleidelijke band is vanaf een golflengte beter naarmate hij dikker is.</s:String>+ <s:String x:Key="Label.CoatedPart.CoatingProfile">Coatingprofiel</s:String>+ <s:String x:Key="Hint.CoatedPart.CoatingProfile">Hoe de index door de band loopt: een laag met √n, het kwartgolfidee, of een geleidelijke stijging van het medium buiten naar het glas. Een geleidelijke band reflecteert minder dan een laag zodra hij een golflengte of dikker is, bij elke golflengte; een laag alleen bij de golflengte waarvoor hij is gesneden.</s:String>+ <s:String x:Key="Label.CoatedPart.FrontCoated">Voorkant coaten</s:String>+ <s:String x:Key="Hint.CoatedPart.FrontCoated">De band op de voorkant leggen: de vlakken die naar een bron links zijn gekeerd, het eerste oppervlak van een lens. Uitschakelen laat ze kaal, zoals de binnenvlakken van een trilholte.</s:String>+ <s:String x:Key="Label.CoatedPart.BackCoated">Achterkant coaten</s:String>+ <s:String x:Key="Hint.CoatedPart.BackCoated">De band op de achterkant leggen: de vlakken die van een bron links zijn afgekeerd, het tweede oppervlak van een lens. Uitschakelen laat ze kaal.</s:String>+ <s:String x:Key="Label.CoatedPart.SidesCoated">Zijkanten coaten</s:String>+ <s:String x:Key="Hint.CoatedPart.SidesCoated">De band op de zijkanten leggen: de vlakken die voor- noch achterkant zijn, de rand van een lens, de smalle uiteinden van een plaat. Uitschakelen laat ze kaal.</s:String><s:String x:Key="Label.ShapePart.Absorption">Absorptie</s:String><s:String x:Key="Hint.ShapePart.Absorption">Hoe sterk het onderdeel golven absorbeert, 0 (helemaal niet) tot 255, zoals het blauwe kanaal van de scèneafbeelding. Ze stijgt vanaf nul bij de omtrek over de absorptiehelling, zodat een golf het onderdeel binnengaat in plaats van te worden teruggekaatst. Een spiegel negeert haar.</s:String><s:String x:Key="Label.ShapePart.AbsorptionRamp">Absorptiehelling</s:String>@@ -657,7 +666,11 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="Label.FiberPart.CladdingThickness">Manteldikte</s:String><s:String x:Key="Hint.FiberPart.CladdingThickness">Dikte van de mantel om de kern in pixels; 0 voor een kale kern.</s:String><s:String x:Key="Label.FiberPart.Coating">AR-coating</s:String>- <s:String x:Key="Hint.FiberPart.Coating">Dikte in pixels van de antireflectieband net binnen de buitenrand, met index √n; 0 voor geen.</s:String>+ <s:String x:Key="Hint.FiberPart.Coating">Dikte in pixels van de antireflectieband net binnen de buitengrens en de eindvlakken; 0 voor geen. Een kwartgolflaag is λ / (4 √n) pixels dik, λ de golflengte die het bronformulier toont; een geleidelijke band is vanaf een golflengte beter naarmate hij dikker is.</s:String>+ <s:String x:Key="Label.FiberPart.Absorption">Absorptie van de mantel</s:String>+ <s:String x:Key="Hint.FiberPart.Absorption">Piekabsorptie van de absorberende band in de mantel, 0 (geen) tot 255, als het blauwe kanaal van de scèneafbeelding: een bult in het buitenste deel van de mantel, die over de bandbreedte vanaf niets stijgt, piekt en naar de buitenrand weer tot niets daalt, zodat de staart van de geleide golf onaangeroerd blijft en strooilicht van beide kanten wordt opgenomen. Niets bij een kale kern.</s:String>+ <s:String x:Key="Label.FiberPart.AbsorptionRamp">Absorptieband</s:String>+ <s:String x:Key="Hint.FiberPart.AbsorptionRamp">De halve breedte van de absorberende band in pixels: de absorptie stijgt over zoveel pixels naar haar piek en daalt over evenveel naar de buitenrand. Een band breder dan de mantel wordt erin samengedrukt.</s:String><s:String x:Key="Label.FiberPart.Ends">Uiteinden</s:String><s:String x:Key="Hint.FiberPart.Ends">Hoe de twee uiteinden zijn afgesneden: vlak, recht dwars op het pad zoals een gekliefde vezel, of afgerond met de buitenstraal. De AR-coating volgt een vlak eindvlak.</s:String><s:String x:Key="Label.FiberPart.Nodes">Knooppunten</s:String>@@ -697,7 +710,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="Label.GrinLensPart.EdgeIndex">Index aan de rand</s:String><s:String x:Key="Hint.GrinLensPart.EdgeIndex">Brekingsindex aan de rand, 1,00 tot 2,55 in stappen van 0,01. Het profiel tussen de as en de rand is parabolisch.</s:String><s:String x:Key="Label.GrinLensPart.Coating">AR-coating</s:String>- <s:String x:Key="Hint.GrinLensPart.Coating">Dikte in pixels van de antireflectieband net binnen de omtrek, met index √n; 0 voor geen.</s:String>+ <s:String x:Key="Hint.GrinLensPart.Coating">Dikte in pixels van de antireflectieband net binnen de omtrek; 0 voor geen. Een kwartgolflaag is λ / (4 √n) pixels dik, λ de golflengte die het bronformulier toont; een geleidelijke band is vanaf een golflengte beter naarmate hij dikker is.</s:String><s:String x:Key="Label.LogicGatePart.DesignFrequency">Ontwerpfrequentie</s:String><s:String x:Key="Hint.LogicGatePart.DesignFrequency">De bronfrequentie waarvoor de poort is ontworpen, op dezelfde schaal als de frequentie van een bron: de frequentie van de bronnen die hem voeden. De golflengte, en daaruit de kernbreedte, de koppelaar en de fasesectie, volgen eruit, dus de poort werkt alleen bij deze frequentie.</s:String><s:String x:Key="Label.LogicGatePart.Coating">AR-coating</s:String>@@ -738,6 +751,8 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="Hint.LogicGatePart.PortSpacing">Afstand tussen de twee ingangen, en tussen de twee uitgangen, in pixels. Een waarde onder wat het ontwerp nodig heeft om de armen gescheiden te houden, wordt daartoe verhoogd, en het vak toont de gebruikte afstand.</s:String><s:String x:Key="Enum.FiberEnds.Flat">Vlak</s:String><s:String x:Key="Enum.FiberEnds.Round">Rond</s:String>+ <s:String x:Key="Enum.CoatingProfile.Layer">Laag</s:String>+ <s:String x:Key="Enum.CoatingProfile.Graded">Geleidelijk</s:String><s:String x:Key="Enum.TriangleType.Equilateral">Gelijkzijdig</s:String><s:String x:Key="Enum.TriangleType.RightIsosceles">Rechthoekig-gelijkbenig (45°)</s:String><s:String x:Key="Enum.TriangleType.ThirtySixtyNinety">30-60-90</s:String>diff --git a/WaveDudeNext.WPF/Views/FiberPartView.xaml b/WaveDudeNext.WPF/Views/FiberPartView.xamlindex 7ac94d1..0aff2ba 100644--- a/WaveDudeNext.WPF/Views/FiberPartView.xaml+++ b/WaveDudeNext.WPF/Views/FiberPartView.xaml@@ -46,8 +46,27 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<TextBlock Style="{StaticResource FormLabel}" Text="{meta:Label model:FiberPart.CladdingThickness}" /><controls:NumberBox Text="{Binding CladdingThickness}" Minimum="0" ToolTip="{meta:Hint model:FiberPart.CladdingThickness}" AutomationProperties.AutomationId="PartCladdingThickness" />+ <!-- the cladding's absorbing band, a hump in its outer part (2026-10-29) -->+ <TextBlock Style="{StaticResource FormLabel}" Text="{meta:Label model:FiberPart.Absorption}" />+ <controls:NumberBox Text="{Binding Absorption}" Minimum="0" Maximum="255" Increment="5" ToolTip="{meta:Hint model:FiberPart.Absorption}" AutomationProperties.AutomationId="PartAbsorption" />++ <TextBlock Style="{StaticResource FormLabel}" Text="{meta:Label model:FiberPart.AbsorptionRamp}" />+ <controls:NumberBox Text="{Binding AbsorptionRamp}" Minimum="1" Maximum="400" ToolTip="{meta:Hint model:FiberPart.AbsorptionRamp}" AutomationProperties.AutomationId="PartAbsorptionRamp" />+<TextBlock Style="{StaticResource FormLabel}" Text="{meta:Label model:FiberPart.Coating}" /><controls:NumberBox Text="{Binding Coating}" Minimum="0" Maximum="50" ToolTip="{meta:Hint model:FiberPart.Coating}" AutomationProperties.AutomationId="PartCoating" />++ <TextBlock Style="{StaticResource FormLabel}" Text="{meta:Label model:CoatedPart.CoatingProfile}" />+ <ComboBox Style="{StaticResource EnumComboBox}" ItemsSource="{meta:EnumValues model:CoatingProfile}" SelectedItem="{Binding CoatingProfile}"+ ToolTip="{meta:Hint model:CoatedPart.CoatingProfile}" AutomationProperties.AutomationId="PartCoatingProfile" />++ <!-- the faces: the start face is the front, the end face the back, the tube the sides (2026-10-29) -->+ <CheckBox controls:FormPanel.FullWidth="True" Content="{meta:Label model:CoatedPart.FrontCoated}"+ IsChecked="{Binding FrontCoated}" ToolTip="{meta:Hint model:CoatedPart.FrontCoated}" AutomationProperties.AutomationId="PartFrontCoated" />+ <CheckBox controls:FormPanel.FullWidth="True" Content="{meta:Label model:CoatedPart.BackCoated}"+ IsChecked="{Binding BackCoated}" ToolTip="{meta:Hint model:CoatedPart.BackCoated}" AutomationProperties.AutomationId="PartBackCoated" />+ <CheckBox controls:FormPanel.FullWidth="True" Content="{meta:Label model:CoatedPart.SidesCoated}"+ IsChecked="{Binding SidesCoated}" ToolTip="{meta:Hint model:CoatedPart.SidesCoated}" AutomationProperties.AutomationId="PartSidesCoated" /></controls:FormPanel><Label Style="{StaticResource FormSection}" Content="{DynamicResource SectionShape}" />diff --git a/WaveDudeNext.WPF/Views/GrinLensPartView.xaml b/WaveDudeNext.WPF/Views/GrinLensPartView.xamlindex a0dbe50..a7f929e 100644--- a/WaveDudeNext.WPF/Views/GrinLensPartView.xaml+++ b/WaveDudeNext.WPF/Views/GrinLensPartView.xaml@@ -39,6 +39,18 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<TextBlock Style="{StaticResource FormLabel}" Text="{meta:Label model:GrinLensPart.Coating}" /><controls:NumberBox Text="{Binding Coating}" Minimum="0" Maximum="50" ToolTip="{meta:Hint model:GrinLensPart.Coating}" AutomationProperties.AutomationId="PartCoating" />++ <TextBlock Style="{StaticResource FormLabel}" Text="{meta:Label model:CoatedPart.CoatingProfile}" />+ <ComboBox Style="{StaticResource EnumComboBox}" ItemsSource="{meta:EnumValues model:CoatingProfile}" SelectedItem="{Binding CoatingProfile}"+ ToolTip="{meta:Hint model:CoatedPart.CoatingProfile}" AutomationProperties.AutomationId="PartCoatingProfile" />++ <!-- the faces by their outward normal: the end faces across the axis are front and back, the long sides the sides -->+ <CheckBox controls:FormPanel.FullWidth="True" Content="{meta:Label model:CoatedPart.FrontCoated}"+ IsChecked="{Binding FrontCoated}" ToolTip="{meta:Hint model:CoatedPart.FrontCoated}" AutomationProperties.AutomationId="PartFrontCoated" />+ <CheckBox controls:FormPanel.FullWidth="True" Content="{meta:Label model:CoatedPart.BackCoated}"+ IsChecked="{Binding BackCoated}" ToolTip="{meta:Hint model:CoatedPart.BackCoated}" AutomationProperties.AutomationId="PartBackCoated" />+ <CheckBox controls:FormPanel.FullWidth="True" Content="{meta:Label model:CoatedPart.SidesCoated}"+ IsChecked="{Binding SidesCoated}" ToolTip="{meta:Hint model:CoatedPart.SidesCoated}" AutomationProperties.AutomationId="PartSidesCoated" /></controls:FormPanel><Label Style="{StaticResource FormSection}" Content="{DynamicResource SectionShape}" />diff --git a/WaveDudeNext.WPF/Views/LensPartView.xaml b/WaveDudeNext.WPF/Views/LensPartView.xamlindex ecbd4f5..5086b0a 100644--- a/WaveDudeNext.WPF/Views/LensPartView.xaml+++ b/WaveDudeNext.WPF/Views/LensPartView.xaml@@ -42,6 +42,20 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or</DataTrigger></Style.Triggers></Style>+ <Style x:Key="GlassOnlyCombo" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource EnumComboBox}">+ <Style.Triggers>+ <DataTrigger Binding="{Binding Mirror}" Value="True">+ <Setter Property="IsEnabled" Value="False" />+ </DataTrigger>+ </Style.Triggers>+ </Style>+ <Style x:Key="GlassOnlyCheck" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource {x:Type CheckBox}}">+ <Style.Triggers>+ <DataTrigger Binding="{Binding Mirror}" Value="True">+ <Setter Property="IsEnabled" Value="False" />+ </DataTrigger>+ </Style.Triggers>+ </Style></UserControl.Resources><ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">@@ -63,6 +77,18 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<controls:NumberBox Style="{StaticResource GlassOnly}" Text="{Binding Coating}" Minimum="0" Maximum="50"ToolTip="{meta:Hint model:LensPart.Coating}" AutomationProperties.AutomationId="PartCoating" />+ <TextBlock Style="{StaticResource FormLabel}" Text="{meta:Label model:CoatedPart.CoatingProfile}" />+ <ComboBox Style="{StaticResource GlassOnlyCombo}" ItemsSource="{meta:EnumValues model:CoatingProfile}" SelectedItem="{Binding CoatingProfile}"+ ToolTip="{meta:Hint model:CoatedPart.CoatingProfile}" AutomationProperties.AutomationId="PartCoatingProfile" />++ <!-- the faces: the first surface is the front, the second the back, the rim the sides (2026-10-29) -->+ <CheckBox controls:FormPanel.FullWidth="True" Style="{StaticResource GlassOnlyCheck}" Content="{meta:Label model:CoatedPart.FrontCoated}"+ IsChecked="{Binding FrontCoated}" ToolTip="{meta:Hint model:CoatedPart.FrontCoated}" AutomationProperties.AutomationId="PartFrontCoated" />+ <CheckBox controls:FormPanel.FullWidth="True" Style="{StaticResource GlassOnlyCheck}" Content="{meta:Label model:CoatedPart.BackCoated}"+ IsChecked="{Binding BackCoated}" ToolTip="{meta:Hint model:CoatedPart.BackCoated}" AutomationProperties.AutomationId="PartBackCoated" />+ <CheckBox controls:FormPanel.FullWidth="True" Style="{StaticResource GlassOnlyCheck}" Content="{meta:Label model:CoatedPart.SidesCoated}"+ IsChecked="{Binding SidesCoated}" ToolTip="{meta:Hint model:CoatedPart.SidesCoated}" AutomationProperties.AutomationId="PartSidesCoated" />+<TextBlock Style="{StaticResource FormLabel}" Text="{meta:Label model:LensPart.Absorption}" /><controls:NumberBox Style="{StaticResource GlassOnly}" Text="{Binding Absorption}" Minimum="0" Maximum="255" Increment="5"ToolTip="{meta:Hint model:LensPart.Absorption}" AutomationProperties.AutomationId="PartAbsorption" />diff --git a/WaveDudeNext.WPF/Views/ShapeMaterialView.xaml b/WaveDudeNext.WPF/Views/ShapeMaterialView.xamlindex f0762e1..efaf8e1 100644--- a/WaveDudeNext.WPF/Views/ShapeMaterialView.xaml+++ b/WaveDudeNext.WPF/Views/ShapeMaterialView.xaml@@ -33,6 +33,20 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or</DataTrigger></Style.Triggers></Style>+ <Style x:Key="GlassOnlyCombo" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource EnumComboBox}">+ <Style.Triggers>+ <DataTrigger Binding="{Binding Mirror}" Value="True">+ <Setter Property="IsEnabled" Value="False" />+ </DataTrigger>+ </Style.Triggers>+ </Style>+ <Style x:Key="GlassOnlyCheck" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource {x:Type CheckBox}}">+ <Style.Triggers>+ <DataTrigger Binding="{Binding Mirror}" Value="True">+ <Setter Property="IsEnabled" Value="False" />+ </DataTrigger>+ </Style.Triggers>+ </Style></UserControl.Resources><!-- the material of a shape part (polygon, rectangle, triangle, outline): mirror or glass, the index, the coating, the absorption -->@@ -50,6 +64,18 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<controls:NumberBox Style="{StaticResource GlassOnly}" Text="{Binding Coating}" Minimum="0" Maximum="50"ToolTip="{meta:Hint model:ShapePart.Coating}" AutomationProperties.AutomationId="PartCoating" />+ <TextBlock Style="{StaticResource FormLabel}" Text="{meta:Label model:CoatedPart.CoatingProfile}" />+ <ComboBox Style="{StaticResource GlassOnlyCombo}" ItemsSource="{meta:EnumValues model:CoatingProfile}" SelectedItem="{Binding CoatingProfile}"+ ToolTip="{meta:Hint model:CoatedPart.CoatingProfile}" AutomationProperties.AutomationId="PartCoatingProfile" />++ <!-- the faces by their outward normal: front toward a source on the left, back away from it, the rest sides (2026-10-29) -->+ <CheckBox controls:FormPanel.FullWidth="True" Style="{StaticResource GlassOnlyCheck}" Content="{meta:Label model:CoatedPart.FrontCoated}"+ IsChecked="{Binding FrontCoated}" ToolTip="{meta:Hint model:CoatedPart.FrontCoated}" AutomationProperties.AutomationId="PartFrontCoated" />+ <CheckBox controls:FormPanel.FullWidth="True" Style="{StaticResource GlassOnlyCheck}" Content="{meta:Label model:CoatedPart.BackCoated}"+ IsChecked="{Binding BackCoated}" ToolTip="{meta:Hint model:CoatedPart.BackCoated}" AutomationProperties.AutomationId="PartBackCoated" />+ <CheckBox controls:FormPanel.FullWidth="True" Style="{StaticResource GlassOnlyCheck}" Content="{meta:Label model:CoatedPart.SidesCoated}"+ IsChecked="{Binding SidesCoated}" ToolTip="{meta:Hint model:CoatedPart.SidesCoated}" AutomationProperties.AutomationId="PartSidesCoated" />+<TextBlock Style="{StaticResource FormLabel}" Text="{meta:Label model:ShapePart.Absorption}" /><controls:NumberBox Style="{StaticResource GlassOnly}" Text="{Binding Absorption}" Minimum="0" Maximum="255" Increment="5"ToolTip="{meta:Hint model:ShapePart.Absorption}" AutomationProperties.AutomationId="PartAbsorption" />diff --git a/WaveDudeNext.WPF/WaveDudeNext.WPF.csproj b/WaveDudeNext.WPF/WaveDudeNext.WPF.csprojindex 1cfda47..65126c0 100644--- a/WaveDudeNext.WPF/WaveDudeNext.WPF.csproj+++ b/WaveDudeNext.WPF/WaveDudeNext.WPF.csproj@@ -26,6 +26,13 @@<Resource Include="App.png" /></ItemGroup>+ <!-- the shipped examples (2026-10-29, the user's request): the repository's Examples folder, embedded so the single file+ carries them; File > Examples lists them in file order (Examples.cs). Linked into an Examples folder of the project,+ so Solution Explorer shows them there and not among the sources -->+ <ItemGroup>+ <EmbeddedResource Include="..\Examples\*.wdproj" Link="Examples\%(Filename)%(Extension)" LogicalName="Examples/%(Filename)%(Extension)" />+ </ItemGroup>+<!-- LICENSE.md becomes the embedded FlowDocument "License.xaml" that Help > About shows --><Import Project="Build\LicenseDocument.targets" />diff --git a/WaveDudeNext/Model/OpticalPart.cs b/WaveDudeNext/Model/OpticalPart.csindex 2b36170..2b8c7d4 100644--- a/WaveDudeNext/Model/OpticalPart.cs+++ b/WaveDudeNext/Model/OpticalPart.cs@@ -242,6 +242,113 @@ public sealed class PartPoint : ObservableObjectpublic override string ToString() => $"({X}, {Y})";}+/// <summary>+/// How the index runs through an anti-reflection band (2026-10-29, the user's request: the author's drawn scenes give+/// a glass face a graded ramp, and the parts had only the layer).+/// </summary>+public enum CoatingProfile+{+ /// <summary>A band at the index √n throughout: a quarter-wave layer when it is λ / (4 √n) thick, the least reflecting then.</summary>+ Layer,+ /// <summary>+ /// The index rises over the band from the medium outside to the glass as a raised cosine, (1 − cos πt) / 2 of the+ /// depth over the thickness (<see cref="Parts.PartShape.GradedProfile"/>): broadband, and the thicker the better; the+ /// figures are under "Coatings" in OpticalParts.md.+ /// </summary>+ Graded,+}++/// <summary>+/// A refractive part with an anti-reflection band along its outline (a lens, a shape, a GRIN lens; 2026-10-29, the+/// user's request): the band's <see cref="Coating"/> thickness, its <see cref="CoatingProfile"/>, and which faces carry+/// it. A face is classed by its outward normal in the part frame: within 45° of −x', the side a source on the left+/// meets, it is the front, within 45° of +x' the back, otherwise a side; so a lens's first surface, second surface and+/// rim, and a rectangle's four faces when its length runs along the beam. Every face is coated by default.+/// </summary>+public abstract class CoatedPart : OpticalPart+{+ /// <summary>Default <see cref="CoatingProfile"/>.</summary>+ public const CoatingProfile DefaultCoatingProfile = CoatingProfile.Layer;++ private int _coating;+ private CoatingProfile _coatingProfile = DefaultCoatingProfile;+ private bool _frontCoated = true;+ private bool _backCoated = true;+ private bool _sidesCoated = true;++ /// <summary>Thickness in pixels of the anti-reflection band just inside the outline; 0 for none. A quarter-wave layer is λ / (4 √n) thick.</summary>+ [XmlAttribute]+ [DefaultValue(0)]+ [Range(0, MaxCoating)]+ [Category("Material")]+ [DisplayName("AR coating")]+ [Description("Thickness in pixels of the anti-reflection band just inside the outline; 0 for none. A quarter-wave layer is λ / (4 √n) pixels thick, λ being the wavelength the source form shows; a graded band is the better the thicker, from a wavelength on.")]+ public int Coating+ {+ get => _coating;+ set => SetProperty(ref _coating, value);+ }++ /// <summary>How the index runs through the band: a layer at √n, or a graded rise from the medium outside to the glass.</summary>+ [XmlAttribute]+ [DefaultValue(DefaultCoatingProfile)]+ [Category("Material")]+ [DisplayName("Coating profile")]+ [Description("How the index runs through the band: a layer at √n, the quarter-wave idea, or a graded rise from the medium outside to the glass. A graded band reflects less than a layer once it is a wavelength thick or more, at any wavelength; a layer only at the wavelength it is cut for.")]+ public CoatingProfile CoatingProfile+ {+ get => _coatingProfile;+ set => SetProperty(ref _coatingProfile, value);+ }++ /// <summary>Whether the front faces carry the band: those whose outward normal lies within 45° of −x', the side a source on the left meets.</summary>+ [XmlAttribute]+ [DefaultValue(true)]+ [Category("Material")]+ [DisplayName("Coat the front")]+ [Description("Put the band on the front: the faces turned toward a source on the left, a lens's first surface. Clear it to leave them bare, as the inner faces of a cavity are.")]+ public bool FrontCoated+ {+ get => _frontCoated;+ set => SetProperty(ref _frontCoated, value);+ }++ /// <summary>Whether the back faces carry the band: those whose outward normal lies within 45° of +x'.</summary>+ [XmlAttribute]+ [DefaultValue(true)]+ [Category("Material")]+ [DisplayName("Coat the back")]+ [Description("Put the band on the back: the faces turned away from a source on the left, a lens's second surface. Clear it to leave them bare.")]+ public bool BackCoated+ {+ get => _backCoated;+ set => SetProperty(ref _backCoated, value);+ }++ /// <summary>Whether the other faces carry the band: a lens's rim, a slab's narrow ends.</summary>+ [XmlAttribute]+ [DefaultValue(true)]+ [Category("Material")]+ [DisplayName("Coat the sides")]+ [Description("Put the band on the sides: the faces that are neither front nor back, a lens's rim, a slab's narrow ends. Clear it to leave them bare.")]+ public bool SidesCoated+ {+ get => _sidesCoated;+ set => SetProperty(ref _sidesCoated, value);+ }++ /// <inheritdoc/>+ public override void Normalize()+ {+ base.Normalize();+ Coating = Math.Clamp(Coating, 0, MaxCoating);+ if (!Enum.IsDefined(CoatingProfile))+ {+ CoatingProfile = DefaultCoatingProfile;+ }+ }+}+/// <summary>/// A lens, or a curved or flat mirror when <see cref="Mirror"/> is set: the strip of <see cref="Diameter"/> across/// the axis between two spherical surfaces of radii <see cref="R1"/> (left, facing -x') and <see cref="R2"/>@@ -251,7 +358,7 @@ public sealed class PartPoint : ObservableObject/// diameter and the edge thickness is never negative (the user's point, 2026-10-18: a diameter of 2000 with the/// default radii gave a tiny lens, since the surfaces crossed long before the rim)./// </summary>-public sealed class LensPart : OpticalPart+public sealed class LensPart : CoatedPart{/// <summary>Default <see cref="RefractiveIndex"/>.</summary>public const double DefaultIndex = 1.5;@@ -266,7 +373,6 @@ public sealed class LensPart : OpticalPartprivate bool _mirror;private double _refractiveIndex = DefaultIndex;- private int _coating;private int _absorption;private int _absorptionRamp = DefaultAbsorptionRamp;private int _diameter = DefaultDiameter;@@ -313,19 +419,6 @@ public sealed class LensPart : OpticalPartset => SetProperty(ref _refractiveIndex, value);}- /// <summary>Thickness in pixels of the anti-reflection band just inside the outline, with the index √n; 0 for none. A quarter-wave coating is λ / (4 √n) thick.</summary>- [XmlAttribute]- [DefaultValue(0)]- [Range(0, MaxCoating)]- [Category("Material")]- [DisplayName("AR coating")]- [Description("Thickness in pixels of the anti-reflection band just inside the outline, with the index √n; 0 for none. A quarter-wave coating is λ / (4 √n) pixels thick, λ being the wavelength the source form shows.")]- public int Coating- {- get => _coating;- set => SetProperty(ref _coating, value);- }-/// <summary>/// How strongly the part absorbs, 0 (not at all) to 255, painted into the scene's blue channel (the engines damp a/// cell's velocity by 1 − blue / 255 each step) where it rises over <see cref="AbsorptionRamp"/>; a mirror ignores it.@@ -658,7 +751,6 @@ public sealed class LensPart : OpticalPart{base.Normalize();RefractiveIndex = NormalizeIndex(RefractiveIndex);- Coating = Math.Clamp(Coating, 0, MaxCoating);Absorption = Math.Clamp(Absorption, 0, MaxAbsorption);AbsorptionRamp = Math.Clamp(AbsorptionRamp, 1, MaxAbsorptionRamp);Diameter = Math.Max(2, Diameter);@@ -674,19 +766,18 @@ public sealed class LensPart : OpticalPart/// <summary>/// A part that is a plain shape of glass or mirror: the shared material (<see cref="Mirror"/>, <see cref="RefractiveIndex"/>,-/// <see cref="Coating"/>, <see cref="Absorption"/> over <see cref="AbsorptionRamp"/>) over an outline each subclass+/// the coating of <see cref="CoatedPart"/>, <see cref="Absorption"/> over <see cref="AbsorptionRamp"/>) over an outline each subclass/// generates (<see cref="Vertices"/>): a regular <see cref="PolygonPart"/>, a <see cref="RectanglePart"/>, an/// <see cref="EllipsePart"/>, a <see cref="TrianglePart"/>, a free <see cref="OutlinePart"/> (one class each, chosen when/// the part is added: the user's point, 2026-10-18, against a shape mode inside one class)./// </summary>-public abstract class ShapePart : OpticalPart+public abstract class ShapePart : CoatedPart{/// <summary>Default <see cref="RefractiveIndex"/>.</summary>public const double DefaultIndex = 1.5;private bool _mirror;private double _refractiveIndex = DefaultIndex;- private int _coating;private int _absorption;private int _absorptionRamp = DefaultAbsorptionRamp;@@ -714,19 +805,6 @@ public abstract class ShapePart : OpticalPartset => SetProperty(ref _refractiveIndex, value);}- /// <summary>Thickness in pixels of the anti-reflection band just inside the outline, with the index √n; 0 for none.</summary>- [XmlAttribute]- [DefaultValue(0)]- [Range(0, MaxCoating)]- [Category("Material")]- [DisplayName("AR coating")]- [Description("Thickness in pixels of the anti-reflection band just inside the outline, with the index √n; 0 for none. A quarter-wave coating is λ / (4 √n) pixels thick, λ being the wavelength the source form shows.")]- public int Coating- {- get => _coating;- set => SetProperty(ref _coating, value);- }-/// <summary>/// How strongly the part absorbs, 0 (not at all) to 255, painted into the scene's blue channel (the engines damp a/// cell's velocity by 1 − blue / 255 each step) where it rises over <see cref="AbsorptionRamp"/>; a mirror ignores it.@@ -769,7 +847,6 @@ public abstract class ShapePart : OpticalPart{base.Normalize();RefractiveIndex = NormalizeIndex(RefractiveIndex);- Coating = Math.Clamp(Coating, 0, MaxCoating);Absorption = Math.Clamp(Absorption, 0, MaxAbsorption);AbsorptionRamp = Math.Clamp(AbsorptionRamp, 1, MaxAbsorptionRamp);}@@ -1438,7 +1515,7 @@ public sealed class FiberNode : ObservableObject/// wrapped in a cladding of <see cref="CladdingThickness"/>; the ends cut <see cref="Ends"/>. The path is flattened/// into chords (<see cref="Flatten"/>) for painting and drawing. The angle rotates the whole path about the centre./// </summary>-public sealed class FiberPart : OpticalPart+public sealed class FiberPart : CoatedPart{/// <summary>Default <see cref="CoreIndex"/>.</summary>public const double DefaultCoreIndex = 1.5;@@ -1450,6 +1527,8 @@ public sealed class FiberPart : OpticalPartpublic const int DefaultCladdingThickness = 10;/// <summary>Default <see cref="Ends"/>.</summary>public const FiberEnds DefaultEnds = FiberEnds.Flat;+ /// <summary>Default <see cref="AbsorptionRamp"/>, half the absorbing band's width in pixels.</summary>+ public const int DefaultAbsorptionBand = 10;/// <summary>Half the default path length in pixels: the path runs from (-100, 0) to (100, 0).</summary>public const int DefaultHalfLength = 100;/// <summary>How far a flattened chord may leave the curve, in canvas pixels: far below the painter's quarter-pixel samples.</summary>@@ -1459,7 +1538,8 @@ public sealed class FiberPart : OpticalPartprivate int _coreDiameter = DefaultCoreDiameter;private double _claddingIndex = DefaultCladdingIndex;private int _claddingThickness = DefaultCladdingThickness;- private int _coating;+ private int _absorption;+ private int _absorptionRamp = DefaultAbsorptionBand;private FiberEnds _ends = DefaultEnds;private ObservableCollection<FiberNode> _nodes = [];private HashSet<FiberNode> _watched = [];@@ -1528,17 +1608,36 @@ public sealed class FiberPart : OpticalPartset => SetProperty(ref _claddingThickness, value);}- /// <summary>Thickness in pixels of the anti-reflection band just inside the outer boundary, with the index √n of the cladding (or the core when bare); 0 for none.</summary>+ /// <summary>+ /// Peak absorption of the cladding's absorbing band, 0 (none) to 255, painted into the blue channel (2026-10-29, the+ /// user's request, after the author's fibre scene, whose fibres run between absorbing strips): a hump in the outer+ /// part of the cladding, rising over <see cref="AbsorptionRamp"/> pixels from nothing, peaking, and falling back to+ /// nothing at the outer edge, so the guided mode's tail in the inner cladding is untouched and stray light is+ /// absorbed from either side without a damping step; a mode stripper. Nothing on a bare core.+ /// </summary>[XmlAttribute][DefaultValue(0)]- [Range(0, MaxCoating)]+ [Range(0, MaxAbsorption)][Category("Cladding")]- [DisplayName("AR coating")]- [Description("Thickness in pixels of the anti-reflection band just inside the outer boundary, with the index √n; 0 for none.")]- public int Coating+ [DisplayName("Cladding absorption")]+ [Description("Peak absorption of the cladding's absorbing band, 0 (not at all) to 255, as the scene image's blue channel: a hump in the outer part of the cladding, rising over the band width from nothing, peaking, and falling to nothing at the outer edge, so the guided wave's tail stays untouched and stray light is absorbed from either side. Nothing on a bare core.")]+ public int Absorption{- get => _coating;- set => SetProperty(ref _coating, value);+ get => _absorption;+ set => SetProperty(ref _absorption, value);+ }++ /// <summary>Half the absorbing band's width in pixels: the absorption rises over this many pixels and falls over as many; a band wider than the cladding is squeezed into it.</summary>+ [XmlAttribute]+ [DefaultValue(DefaultAbsorptionBand)]+ [Range(1, MaxAbsorptionRamp)]+ [Category("Cladding")]+ [DisplayName("Absorption band")]+ [Description("Half the absorbing band's width in pixels: the absorption rises over this many pixels to its peak and falls over as many to the outer edge. A band wider than the cladding is squeezed into it.")]+ public int AbsorptionRamp+ {+ get => _absorptionRamp;+ set => SetProperty(ref _absorptionRamp, value);}/// <summary>How the two ends are cut: straight across the path, or rounded.</summary>@@ -1833,7 +1932,8 @@ public sealed class FiberPart : OpticalPartCladdingIndex = NormalizeIndex(CladdingIndex);CoreDiameter = Math.Max(2, CoreDiameter);CladdingThickness = Math.Max(0, CladdingThickness);- Coating = Math.Clamp(Coating, 0, MaxCoating);+ Absorption = Math.Clamp(Absorption, 0, MaxAbsorption);+ AbsorptionRamp = Math.Clamp(AbsorptionRamp, 1, MaxAbsorptionRamp);if (!Enum.IsDefined(Ends)){Ends = DefaultEnds;@@ -1998,7 +2098,7 @@ public sealed class BraggReflectorPart : OpticalPart/// index falls from <see cref="CentreIndex"/> on the axis to <see cref="EdgeIndex"/> at the edge as/// n(y') = n_c − (n_c − n_e)·(2y'/D)²./// </summary>-public sealed class GrinLensPart : OpticalPart+public sealed class GrinLensPart : CoatedPart{/// <summary>Default <see cref="Length"/> in pixels.</summary>public const int DefaultLength = 100;@@ -2013,7 +2113,6 @@ public sealed class GrinLensPart : OpticalPartprivate int _diameter = DefaultDiameter;private double _centreIndex = DefaultCentreIndex;private double _edgeIndex = DefaultEdgeIndex;- private int _coating;/// <inheritdoc/>public override string NameStem => "GRIN lens";@@ -2068,19 +2167,6 @@ public sealed class GrinLensPart : OpticalPartset => SetProperty(ref _edgeIndex, value);}- /// <summary>Thickness in pixels of the anti-reflection band just inside the outline, with the index √n of the local index; 0 for none.</summary>- [XmlAttribute]- [DefaultValue(0)]- [Range(0, MaxCoating)]- [Category("Material")]- [DisplayName("AR coating")]- [Description("Thickness in pixels of the anti-reflection band just inside the outline, with the index √n; 0 for none.")]- public int Coating- {- get => _coating;- set => SetProperty(ref _coating, value);- }-/// <inheritdoc/>public override double AxisReach => Length / 2.0;@@ -2100,7 +2186,6 @@ public sealed class GrinLensPart : OpticalPartDiameter = Math.Max(2, Diameter);CentreIndex = NormalizeIndex(CentreIndex);EdgeIndex = NormalizeIndex(EdgeIndex);- Coating = Math.Clamp(Coating, 0, MaxCoating);}/// <inheritdoc/>diff --git a/WaveDudeNext/Parts/PartPainter.cs b/WaveDudeNext/Parts/PartPainter.csindex bebedc9..5abdcef 100644--- a/WaveDudeNext/Parts/PartPainter.cs+++ b/WaveDudeNext/Parts/PartPainter.cs@@ -28,7 +28,8 @@ namespace WaveDudeNext.Parts;/// (damping, see <see cref="PaintAbsorption"/>). Green (image sources) is never touched. Parts are painted in list/// order, a later one's index over an earlier one's. Refractive parts are supersampled/// 4 × 4 per pixel and the sample indices averaged, a sample outside the part counting the pixel's existing index-/// (red 0 as 1); a mirror part tests the pixel centre alone and writes red 0, since an averaged mirror edge would+/// (red 0 as 1), which is also the medium a graded coating band rises from (<see cref="CoatedPart"/>); a mirror part+/// tests the pixel centre alone and writes red 0, since an averaged mirror edge would/// clamp to glass. Only pixels near an edge (the outline, the coating band's inner edge, a Bragg layer) are/// supersampled: the shape's depth at the pixel centre is an exact distance, so a pixel farther than a sample's/// reach from every edge takes its centre's index in one go (2026-10-19, a drag of a part was sluggish).@@ -149,25 +150,26 @@ public static class PartPainter{continue; // every sample outside}+ int red = bgra[offset];+ // red 0 is a mirror the engine reads as index 1000; averaging it in as glass of index 1 is the user's rule,+ // and a graded band rises from the index the pixel had+ double existing = red == 0 ? 1.0 : red / 100.0;if (!innerEdges && depth > SampleReach && (coating == 0 || Math.Abs(depth - coating) > SampleReach)){// every sample inside, all in the body or all in the coating band: the centre's index stands for the pixel- if (shape.IndexAt(x + 0.5, y + 0.5) is { } whole)+ if (shape.IndexAt(x + 0.5, y + 0.5, existing) is { } whole){bgra[offset] = (byte)Math.Clamp((int)Math.Round(whole * 100.0), 1, 255);}continue;}- int red = bgra[offset];- // red 0 is a mirror the engine reads as index 1000; averaging it in as glass of index 1 is the user's rule- double existing = red == 0 ? 1.0 : red / 100.0;double sum = 0.0;int inside = 0;for (int sy = 0; sy < Supersample; sy++){for (int sx = 0; sx < Supersample; sx++){- double? index = shape.IndexAt(x + half + sx * step, y + half + sy * step);+ double? index = shape.IndexAt(x + half + sx * step, y + half + sy * step, existing);if (index is { } n){sum += n;diff --git a/WaveDudeNext/Parts/PartShape.cs b/WaveDudeNext/Parts/PartShape.csindex 12bb56d..d33fc81 100644--- a/WaveDudeNext/Parts/PartShape.cs+++ b/WaveDudeNext/Parts/PartShape.cs@@ -23,7 +23,7 @@ namespace WaveDudeNext.Parts;/// The geometry of one <see cref="OpticalPart"/> as the painter sees it: a point of the canvas is mapped into the/// part's frame (the centre at the canvas point (X, Y), the top-left corner of pixel (X, Y), so a part of even size/// covers whole pixels; x' along the axis turned by the angle, counter-clockwise on the screen, y' across) and classified by <see cref="Depth"/>, how far inside the outline it lies, and-/// <see cref="BodyIndex"/>, the refractive index there. <see cref="IndexAt"/> combines both with the coating band.+/// <see cref="BodyIndex"/>, the refractive index there. <see cref="IndexAt(double, double, double)"/> combines both with the coating band./// Immutable once built from a part; any thread./// </summary>public abstract class PartShape@@ -41,6 +41,62 @@ public abstract class PartShapedouble radians = part.Angle * Math.PI / 180.0;_cos = Math.Cos(radians);_sin = Math.Sin(radians);+ if (part is CoatedPart coated)+ {+ _profile = Enum.IsDefined(coated.CoatingProfile) ? coated.CoatingProfile : CoatedPart.DefaultCoatingProfile;+ _frontCoated = coated.FrontCoated;+ _backCoated = coated.BackCoated;+ _sidesCoated = coated.SidesCoated;+ }+ else+ {+ // a fibre, a gate: their bands are their own designs, a layer on every face they coat+ _profile = CoatingProfile.Layer;+ _frontCoated = _backCoated = _sidesCoated = true;+ }+ }++ private readonly CoatingProfile _profile;+ private readonly bool _frontCoated;+ private readonly bool _backCoated;+ private readonly bool _sidesCoated;++ /// <summary>cos 45°: the bound on the outward normal's x' component that makes a face a front or a back.</summary>+ protected const double Cos45 = 0.70710678118654752;++ /// <summary>A face of the outline by its outward normal in the part frame (<see cref="CoatedPart"/>): within 45° of −x' the front, of +x' the back, else a side.</summary>+ protected enum Face+ {+ /// <summary>Turned toward a source on the left (−x').</summary>+ Front,+ /// <summary>Turned away from it (+x').</summary>+ Back,+ /// <summary>Neither: a lens's rim, a slab's narrow ends.</summary>+ Sides,+ }++ /// <summary>+ /// The face nearest the point (x', y') of the part frame. Asked only inside the band of a part that leaves a face+ /// bare, so a shape without faces to tell apart answers <see cref="Face.Front"/>.+ /// </summary>+ protected virtual Face FaceAt(double x, double y) => Face.Front;++ /// <summary>Whether the band at (x', y') is painted: the flag of the nearest face, without the search when every face is coated.</summary>+ private bool Coated(double x, double y) =>+ _frontCoated && _backCoated && _sidesCoated || FaceAt(x, y) switch { Face.Front => _frontCoated, Face.Back => _backCoated, _ => _sidesCoated };++ /// <summary>+ /// The share of the index step a graded band has reached at <paramref name="t"/>, the depth inside the outline over the+ /// band's thickness: a raised cosine, (1 − cos πt) / 2. Measured 2026-10-29 with a plane pulse on a deep slab against a+ /// mirror's reflection (the table is under "Coatings" in OpticalParts.md): of linear, smooth-step, quintic and raised+ /// cosine bands the linear one is best at half a wavelength, the raised cosine best or tied at one and within a few+ /// tenths of a percent of the best at two, where the linear ramp reflects three to four times as much.+ /// </summary>+ /// <param name="t">Depth over thickness; clamped to 0..1.</param>+ public static double GradedProfile(double t)+ {+ t = Math.Clamp(t, 0.0, 1.0);+ return (1.0 - Math.Cos(Math.PI * t)) / 2.0;}/// <summary>@@ -146,12 +202,19 @@ public abstract class PartShapereturn (x0, y0, x1, y1);}+ /// <summary>The index at a canvas point as <see cref="IndexAt(double, double, double)"/> gives it over a medium of index 1.</summary>+ public double? IndexAt(double canvasX, double canvasY) => IndexAt(canvasX, canvasY, 1.0);+/// <summary>/// The refractive index the part gives the canvas point (<paramref name="canvasX"/>, <paramref name="canvasY"/>)- /// (continuous coordinates, pixel (x, y) spanning [x, x + 1)): null outside the outline, √n rounded to 0.01 in the- /// coating band, else the body index; 0 inside a mirror.+ /// (continuous coordinates, pixel (x, y) spanning [x, x + 1)): null outside the outline; in the coating band of a+ /// coated face, √n rounded to 0.01 for a layer, or for a graded band the index risen from <paramref name="outside"/>+ /// toward the body's by <see cref="GradedProfile"/> of the depth over the thickness; else the body index; 0 inside a mirror./// </summary>- public double? IndexAt(double canvasX, double canvasY)+ /// <param name="canvasX">Canvas x, continuous.</param>+ /// <param name="canvasY">Canvas y, continuous.</param>+ /// <param name="outside">The index the pixel had before the part, the medium a graded band rises from.</param>+ public double? IndexAt(double canvasX, double canvasY, double outside){(double x, double y) = ToFrame(canvasX, canvasY);double depth = Depth(x, y);@@ -164,7 +227,11 @@ public abstract class PartShapereturn 0.0;}double index = BodyIndex(x, y);- return Coating > 0 && depth < Coating ? Math.Round(Math.Sqrt(index), 2) : index;+ if (Coating <= 0 || depth >= Coating || !Coated(x, y))+ {+ return index;+ }+ return _profile == CoatingProfile.Graded ? outside + (index - outside) * GradedProfile(depth / Coating) : Math.Round(Math.Sqrt(index), 2);}/// <summary>A refractive index within the part range.</summary>@@ -253,6 +320,15 @@ public abstract class PartShapeprotected override double Depth(double x, double y) =>Math.Min(Math.Min(SurfaceDepth(x, y, _vertex1, _r1, -1), SurfaceDepth(x, y, _vertex2, _r2, +1)), _half - Math.Abs(y));+ /// <summary>The nearest of the three: the first surface is the front, the second the back, the rim the sides.</summary>+ protected override Face FaceAt(double x, double y)+ {+ double first = SurfaceDepth(x, y, _vertex1, _r1, -1);+ double second = SurfaceDepth(x, y, _vertex2, _r2, +1);+ double rim = _half - Math.Abs(y);+ return first <= second && first <= rim ? Face.Front : second <= rim ? Face.Back : Face.Sides;+ }+/// <summary>/// How far inside one surface (x', y') lies: the surface has its vertex at <paramref name="vertex"/> on the axis,/// the lens interior on the side opposite to <paramref name="side"/> (-1 for the first surface, whose interior is@@ -284,6 +360,7 @@ public abstract class PartShapeprivate sealed class VertexShape : PartShape{private readonly (double X, double Y)[] _vertices;+ private readonly Face[] _faces;private readonly double _index;private readonly double _extent;@@ -296,6 +373,45 @@ public abstract class PartShapeAbsorption = shape.Mirror ? 0 : GuardAbsorption(shape.Absorption);AbsorptionRamp = GuardAbsorptionRamp(shape.AbsorptionRamp);_extent = _vertices.Max(v => Math.Sqrt(v.X * v.X + v.Y * v.Y));+ // each edge's face by its outward normal: the normal that points out of the polygon at the edge's midpoint+ _faces = new Face[_vertices.Length];+ for (int i = 0, j = _vertices.Length - 1; i < _vertices.Length; j = i++)+ {+ (double ax, double ay) = _vertices[j];+ (double bx, double by) = _vertices[i];+ double dx = bx - ax;+ double dy = by - ay;+ double length = Math.Sqrt(dx * dx + dy * dy);+ if (length == 0.0)+ {+ _faces[i] = Face.Sides;+ continue;+ }+ double nx = dy / length;+ double ny = -dx / length;+ if (PolygonDepth(_vertices, (ax + bx) / 2.0 + nx * 0.01, (ay + by) / 2.0 + ny * 0.01) > 0.0)+ {+ nx = -nx;+ }+ _faces[i] = nx < -Cos45 ? Face.Front : nx > Cos45 ? Face.Back : Face.Sides;+ }+ }++ /// <summary>The face of the edge nearest the point.</summary>+ protected override Face FaceAt(double x, double y)+ {+ int nearest = 0;+ double best = double.PositiveInfinity;+ for (int i = 0, j = _vertices.Length - 1; i < _vertices.Length; j = i++)+ {+ double distance = SegmentDistance(_vertices[j].X, _vertices[j].Y, _vertices[i].X, _vertices[i].Y, x, y);+ if (distance < best)+ {+ best = distance;+ nearest = i;+ }+ }+ return _faces[nearest];}public override bool IsMirror { get; }@@ -358,6 +474,9 @@ public abstract class PartShape_claddingIndex = fiber.CladdingThickness > 0 ? GuardIndex(fiber.CladdingIndex) : _coreIndex;HasInnerEdges = fiber.CladdingThickness > 0;Coating = GuardCoating(fiber.Coating);+ // the cladding's absorbing band: a hump of 2 × ramp at the outer part of the cladding, squeezed into a thinner one; nothing on a bare core+ Absorption = fiber.CladdingThickness > 0 ? GuardAbsorption(fiber.Absorption) : 0;+ _band = Math.Min(GuardAbsorptionRamp(fiber.AbsorptionRamp), Math.Max(0, fiber.CladdingThickness) / 2.0);_extent = _path.Max(v => Math.Sqrt(v.X * v.X + v.Y * v.Y)) + _outerRadius;// the chords a flat face cuts: every chord is a capsule, and one starting within the outer radius of an// end (twice that, for a bend) reaches past the face with its round cap@@ -413,6 +532,50 @@ public abstract class PartShapepublic override bool IsMirror => false;protected override int Coating { get; }+ private readonly double _band;+ public override int Absorption { get; }+ public override int AbsorptionRamp => Math.Max(1, (int)Math.Ceiling(_band));++ /// <summary>+ /// The share of the peak absorption at a canvas point: by the distance r from the path, nothing within the core and+ /// the inner cladding, rising as the quadratic profile over the band's half-width from the band's inner edge at+ /// outer radius − 2 × band to the peak, and falling the same way to nothing at the outer edge; the depth given by+ /// the painter is not used, so the band runs up to an end face and stops there instead of wrapping it.+ /// </summary>+ public override double AbsorptionShareAt(double canvasX, double canvasY, double depth, double ramp)+ {+ if (_band <= 0.0)+ {+ return 0.0;+ }+ (double x, double y) = ToFrame(canvasX, canvasY);+ double r = PathDistance(x, y);+ double inner = _outerRadius - 2.0 * _band;+ if (r <= inner || r >= _outerRadius)+ {+ return 0.0;+ }+ double t = (r - inner) / _band;+ return AbsorptionProfile(t <= 1.0 ? t : 2.0 - t);+ }++ /// <summary>+ /// The start face is the front, the end face the back, the tube the sides: with flat ends, whichever of the three+ /// the point is nearest to inside; with round ends, the caps before the start and beyond the end.+ /// </summary>+ protected override Face FaceAt(double x, double y)+ {+ int last = _path.Length - 1;+ double startDepth = (x - _path[0].X) * _startTangent.X + (y - _path[0].Y) * _startTangent.Y;+ double endDepth = (_path[last].X - x) * _endTangent.X + (_path[last].Y - y) * _endTangent.Y;+ if (!_flat)+ {+ return startDepth < 0.0 ? Face.Front : endDepth < 0.0 ? Face.Back : Face.Sides;+ }+ double side = _outerRadius - PathDistance(x, y);+ return startDepth <= endDepth && startDepth <= side ? Face.Front : endDepth <= side ? Face.Back : Face.Sides;+ }+/// <summary>The core's edge steps inside the outline, so the painter samples every pixel of the tube (without this the core edge came out unsmoothed, 2026-10-22).</summary>public override bool HasInnerEdges { get; }protected override double Extent => _extent;@@ -559,6 +722,10 @@ public abstract class PartShapeprotected override double Extent => Math.Sqrt(_halfLength * _halfLength + _halfDiameter * _halfDiameter);protected override double Depth(double x, double y) => Math.Min(_halfLength - Math.Abs(x), _halfDiameter - Math.Abs(y));+ /// <summary>The end faces across the axis are the front (−x') and the back, the long sides the sides.</summary>+ protected override Face FaceAt(double x, double y) =>+ _halfLength - Math.Abs(x) <= _halfDiameter - Math.Abs(y) ? (x < 0.0 ? Face.Front : Face.Back) : Face.Sides;+/// <summary>n(y') = n_c − (n_c − n_e)·(y' / (D/2))².</summary>protected override double BodyIndex(double x, double y){diff --git a/_tools/library_check/Program.cs b/_tools/library_check/Program.csindex 38f27eb..6c354f4 100644--- a/_tools/library_check/Program.cs+++ b/_tools/library_check/Program.cs@@ -2556,6 +2556,82 @@ internal static class Programpainted = PartPainter.Paint(image, W, H, 1.0, project.Parts)!;Check(RedAt(painted, 100, 60) == 150 && RedAt(painted, 100, 60 + 47) == 122 && RedAt(painted, 100, 60 - 47) == 122 && RedAt(painted, 100 - 18, 60) == 122 && RedAt(painted, 100 - 14, 60) == 150,"a 5 px coating: red 122 = round(100 √1.5) just inside the flat edges and the curved surfaces, 150 in the body");+ // the graded profile (2026-10-29): along the axis the index rises from the canvas's 1.00 at the first surface (x = 80)+ // to 1.50 as a raised cosine over the 5 px band: 1.25 exactly at mid-depth (pixel 82), the body from pixel 85 on+ lens.CoatingProfile = CoatingProfile.Graded;+ painted = PartPainter.Paint(image, W, H, 1.0, project.Parts)!;+ int[] ramp = Enumerable.Range(80, 8).Select(x => RedAt(painted, x, 60)).ToArray();+ Check(ramp[0] <= 103 && ramp[2] == 125 && ramp[5] == 150 && ramp[7] == 150 && ramp.Zip(ramp.Skip(1)).All(pair => pair.First <= pair.Second),+ $"a graded 5 px band rises from red 100 to 150 as a raised cosine: 125 at mid-depth, the body from the band's end, never falling ({string.Join(" ", ramp)})");+ Check(RedAt(painted, 100 + 17, 60) == 125 && RedAt(painted, 100, 60 + 47) == 125, "the graded band is the same on the second surface and the rim");+ lens.CoatingProfile = CoatingProfile.Layer;+ // the faces: the first surface is the front, the second the back, the rim the sides+ lens.FrontCoated = false;+ painted = PartPainter.Paint(image, W, H, 1.0, project.Parts)!;+ Check(RedAt(painted, 100 - 18, 60) == 150 && RedAt(painted, 100 + 17, 60) == 122 && RedAt(painted, 100, 60 + 47) == 122 && RedAt(painted, 100, 60 - 47) == 122,+ "the front left bare: 150 just inside the first surface, the band on the second surface and both rims");+ lens.FrontCoated = true;+ lens.SidesCoated = false;+ painted = PartPainter.Paint(image, W, H, 1.0, project.Parts)!;+ Check(RedAt(painted, 100 - 18, 60) == 122 && RedAt(painted, 100 + 17, 60) == 122 && RedAt(painted, 100, 60 + 47) == 150 && RedAt(painted, 100, 60 - 47) == 150,+ "the sides left bare: the band on both surfaces, 150 just inside both rims");+ lens.SidesCoated = true;+ {+ // a slab along the beam, 40 along and 60 across at (100, 60), index 2.25 so the layer is 1.50 (red 150) against the body's 225;+ // it spans x 80..119 and y 30..89 and the 4 px band lies just inside each face+ var slabProject = new Project();+ slabProject.Scene.Width = W;+ slabProject.Scene.Height = H;+ var slab = slabProject.AddPart<RectanglePart>();+ slab.X = 100;+ slab.Y = 60;+ slab.Length = 40;+ slab.Width = 60;+ slab.RefractiveIndex = 2.25;+ slab.Coating = 4;+ slab.FrontCoated = false;+ slab.SidesCoated = false;+ ScenePixels slabPainted = PartPainter.Paint(null, W, H, 1.0, slabProject.Parts)!;+ Check(RedAt(slabPainted, 82, 60) == 225 && RedAt(slabPainted, 117, 60) == 150 && RedAt(slabPainted, 100, 32) == 225 && RedAt(slabPainted, 100, 87) == 225,+ "a slab with only its back coated: bare at the front and the long sides, √2.25 = 1.50 inside the back face");+ slab.FrontCoated = true;+ slab.BackCoated = false;+ slab.SidesCoated = true;+ slabPainted = PartPainter.Paint(null, W, H, 1.0, slabProject.Parts)!;+ Check(RedAt(slabPainted, 82, 60) == 150 && RedAt(slabPainted, 117, 60) == 225 && RedAt(slabPainted, 100, 32) == 150 && RedAt(slabPainted, 100, 87) == 150,+ "front and sides coated, the back bare");+ // the faces turn with the part: at 90° (counter-clockwise on the screen) the front lies at y = 80, facing down, the back at y = 40+ slab.Angle = 90;+ slabPainted = PartPainter.Paint(null, W, H, 1.0, slabProject.Parts)!;+ Check(RedAt(slabPainted, 100, 78) == 150 && RedAt(slabPainted, 100, 42) == 225 && RedAt(slabPainted, 72, 60) == 150 && RedAt(slabPainted, 127, 60) == 150,+ "turned by 90° the bare back faces up: 225 just inside y = 40, the band inside y = 80 and both long sides");+ slab.Angle = 0;+ // a circle: the arcs within 45° of the axis are front and back, the top and bottom arcs the sides+ var disc = slabProject.AddPart<EllipsePart>();+ disc.X = 100;+ disc.Y = 60;+ disc.Length = 60;+ disc.Width = 60;+ disc.RefractiveIndex = 2.25;+ disc.Coating = 4;+ disc.SidesCoated = false;+ slab.Enabled = false;+ slabPainted = PartPainter.Paint(null, W, H, 1.0, slabProject.Parts)!;+ Check(RedAt(slabPainted, 72, 60) == 150 && RedAt(slabPainted, 127, 60) == 150 && RedAt(slabPainted, 100, 32) == 225 && RedAt(slabPainted, 100, 87) == 225,+ "a circle with its sides bare: the band at the leftmost and rightmost points, none at the top and bottom");+ // the profile and the bare faces persist as attributes, coated faces and the layer as the defaults+ slab.CoatingProfile = CoatingProfile.Graded;+ using var stream = new MemoryStream();+ slabProject.Save(stream);+ stream.Position = 0;+ Project loadedProject = Project.Load(stream);+ string coatingXml = System.Text.Encoding.UTF8.GetString(stream.ToArray());+ var loadedSlab = (RectanglePart)loadedProject.Parts[0];+ var loadedDisc = (EllipsePart)loadedProject.Parts[1];+ Check(loadedSlab.CoatingProfile == CoatingProfile.Graded && !loadedSlab.BackCoated && loadedSlab.FrontCoated && loadedSlab.SidesCoated && !loadedDisc.SidesCoated+ && loadedDisc.CoatingProfile == CoatingProfile.Layer && coatingXml.Contains("CoatingProfile=\"Graded\"") && coatingXml.Contains("BackCoated=\"false\"") && !coatingXml.Contains("FrontCoated=") && !coatingXml.Contains("CoatingProfile=\"Layer\""),+ "the coating profile and a bare face round-trip through the file; the defaults are not written");+ }lens.Coating = 0;lens.Mirror = true;painted = PartPainter.Paint(image, W, H, 1.0, project.Parts)!;@@ -2785,6 +2861,51 @@ internal static class Programpainted = PartPainter.Paint(null, W, H, 1.0, project.Parts)!;Check(RedAt(painted, 177, 60) == 122 && RedAt(painted, 176, 60) == 150 && RedAt(painted, 80, 60 + 18) == 120 && RedAt(painted, 80, 60 + 16) == 145,"the AR coating lies along the sides (√1.45 = 1.20) and on the flat end face (√1.5 = 1.22)");+ // the fibre's faces (2026-10-29): the start face is the front, the end face the back, the tube the sides; a shorter+ // fibre at x = 100 so both faces lie on the canvas, 40..160+ static int BlueAt(ScenePixels pixels, int x, int y) => pixels.Bgra[y * pixels.StrideBytes + x * 4];+ fiber.X = 100;+ fiber.Nodes[0].X = -60;+ fiber.Nodes[1].X = 60;+ painted = PartPainter.Paint(null, W, H, 1.0, project.Parts)!;+ Check(RedAt(painted, 42, 60) == 122 && RedAt(painted, 157, 60) == 122 && RedAt(painted, 100, 60 + 18) == 120, "the 3 px layer on both end faces and along the tube");+ fiber.FrontCoated = false;+ painted = PartPainter.Paint(null, W, H, 1.0, project.Parts)!;+ Check(RedAt(painted, 42, 60) == 150 && RedAt(painted, 157, 60) == 122 && RedAt(painted, 100, 60 + 18) == 120, "the start face left bare, the end face and the tube coated");+ fiber.FrontCoated = true;+ fiber.BackCoated = false;+ fiber.SidesCoated = false;+ painted = PartPainter.Paint(null, W, H, 1.0, project.Parts)!;+ Check(RedAt(painted, 42, 60) == 122 && RedAt(painted, 157, 60) == 150 && RedAt(painted, 100, 60 + 18) == 145, "the end face and the tube left bare, the start face coated");+ // a graded 10 px band on the end face alone: the core's index falls to the canvas's 1.00 at the face as a raised cosine+ fiber.FrontCoated = false;+ fiber.BackCoated = true;+ fiber.Coating = 10;+ fiber.CoatingProfile = CoatingProfile.Graded;+ painted = PartPainter.Paint(null, W, H, 1.0, project.Parts)!;+ Check(RedAt(painted, 145, 60) == 150 && RedAt(painted, 155, 60) == 121 && RedAt(painted, 159, 60) <= 103 && RedAt(painted, 42, 60) == 150,+ $"a graded end taper: 150 before the band, 121 at mid-depth of the band, near 100 at the face, the start face bare ({RedAt(painted, 155, 60)}, {RedAt(painted, 159, 60)})");+ fiber.Coating = 0;+ fiber.CoatingProfile = CoatingProfile.Layer;+ fiber.FrontCoated = true;+ fiber.SidesCoated = true;+ // the cladding's absorbing band (2026-10-29): with a half-width of 5 in a 10 px cladding the hump fills the cladding, nothing in+ // the core, the peak 15 px from the path, nothing at the outer edge, the band running up to the end face and not beyond it;+ // pixel centres lie at r = 12.5, 14.5, 15.5 and 18.5: shares 0.25, 0.81, 0.81 and 0.09 of 200+ fiber.Absorption = 200;+ fiber.AbsorptionRamp = 5;+ painted = PartPainter.Paint(null, W, H, 1.0, project.Parts)!;+ Check(BlueAt(painted, 100, 69) == 0 && BlueAt(painted, 100, 72) == 50 && BlueAt(painted, 100, 74) == 162 && BlueAt(painted, 100, 75) == 162 && BlueAt(painted, 100, 78) == 18 && BlueAt(painted, 100, 80) == 0,+ $"the cladding's absorbing hump: 0 in the core, 50 half-way up, 162 either side of the peak 15 px out, 18 near the outer edge, 0 beyond it ({BlueAt(painted, 100, 72)}, {BlueAt(painted, 100, 75)}, {BlueAt(painted, 100, 78)})");+ Check(BlueAt(painted, 158, 75) == 162 && BlueAt(painted, 162, 75) == 0 && BlueAt(painted, 158, 60) == 0, "the band runs to the end face and stops there; the core stays clear");+ fiber.CladdingThickness = 0;+ painted = PartPainter.Paint(null, W, H, 1.0, project.Parts)!;+ Check(BlueAt(painted, 100, 75) == 0 && BlueAt(painted, 100, 65) == 0, "a bare core absorbs nothing");+ fiber.CladdingThickness = 10;+ fiber.Absorption = 0;+ fiber.X = 80;+ fiber.Nodes[0].X = -100;+ fiber.Nodes[1].X = 100;fiber.Coating = 0;fiber.Ends = FiberEnds.Round;painted = PartPainter.Paint(null, W, H, 1.0, project.Parts)!;diff --git a/_tools/ui_check/AboutCheck.ps1 b/_tools/ui_check/AboutCheck.ps1index e5ffa7b..fda3d5d 100644--- a/_tools/ui_check/AboutCheck.ps1+++ b/_tools/ui_check/AboutCheck.ps1@@ -130,7 +130,7 @@ try {DKey $VK_ESCAPE 300$gone = WaitFor { (Dialog) -eq $null } 3000 100Check "Esc closes the dialog" $gone- Check "the main window is still there" ($win.Current.Name -eq "WaveDude Next") $win.Current.Name+ Check "the main window is still there" ($win.Current.Name -like "WaveDude Next - *") $win.Current.NameCheck "app never became the foreground window" ((Foreground) -ne "APP") (Foreground)}finally {diff --git a/_tools/ui_check/ExportCheck.ps1 b/_tools/ui_check/ExportCheck.ps1index 128188b..151d6b6 100644--- a/_tools/ui_check/ExportCheck.ps1+++ b/_tools/ui_check/ExportCheck.ps1@@ -74,9 +74,9 @@ Start-App $Exe (Join-Path $PSScriptRoot "tiny.wdproj")try {Check "the title names the file, no asterisk" ($win.Current.Name -like "*tiny.wdproj") $win.Current.Name- # File > Export > Export field...: F10 focuses the menu bar, Down opens File on New; New, Open, Recent, Save, Save As, Export+ # File > Export > Export field...: F10 focuses the menu bar, Down opens File on New; New, Open, Recent, Examples (2026-10-29), Save, Save As, ExportStep "F10" 0x79 150; Step "Down" $VK_DOWN 150- for ($i = 0; $i -lt 5; $i++) { Step "Down" $VK_DOWN 80 }+ for ($i = 0; $i -lt 6; $i++) { Step "Down" $VK_DOWN 80 }Step "Right" $VK_RIGHT 150Check "File > Export opens on 'Export field...'" (MenuItemVisible "Export intensity...")Step "Enter" $VK_RETURN 200@@ -92,7 +92,7 @@ try {# File > Export last (Ctrl+E, 2026-10-28): the last export again, to the same folder, without the question about a folder with files in it$before = (Get-Item (Join-Path $field "tiny_field_0099.png")).LastWriteTimeUtcStep "F10" 0x79 150; Step "Down" $VK_DOWN 150- for ($i = 0; $i -lt 6; $i++) { Step "Down" $VK_DOWN 80 }+ for ($i = 0; $i -lt 7; $i++) { Step "Down" $VK_DOWN 80 }Check "'Export last' sits below Export in the File menu" ((PopupFocusedId) -eq "MenuExportLast") (PopupFocusedId)Step "Enter" $VK_RETURN 200Check "Export last rewrites the 100 PNGs without asking about the folder" (WaitFor { (Pngs $field) -eq 100 -and (Get-Item (Join-Path $field "tiny_field_0099.png")).LastWriteTimeUtc -gt $before } 60000) ("{0} files, status '{1}'" -f (Pngs $field), (ExportStatus))@@ -129,6 +129,17 @@ try {$still = Join-Path $out "tiny_field_0000.png"Check "the shown frame lands as tiny_field_0000.png (the frame number, padded like a sequence's files)" (WaitFor { Test-Path $still } 20000) ((Find "StatusMessage").Current.Name)Check "and is a PNG, with the status bar reporting one frame" ((IsPng $still) -and (WaitFor { (Find "StatusMessage").Current.Name -like "Exported 1 frames to *tiny_field_0000.png*" } 5000)) ((Find "StatusMessage").Current.Name)++ # File > Examples (2026-10-29): the shipped examples embedded in the app; New, Open, Recent, Examples; Right opens the list+ # on the first one; Enter replaces the project (the edits are discarded through WAVEDUDE_DISCARD_EDITS) with an unsaved one+ Step "F10" 0x79 150; Step "Down" $VK_DOWN 150+ for ($i = 0; $i -lt 3; $i++) { Step "Down" $VK_DOWN 80 }+ Check "'Examples' sits below Recent in the File menu" ((PopupFocusedId) -eq "MenuExamples") (PopupFocusedId)+ Step "Right" $VK_RIGHT 300+ Check "the list opens on the first example" ((PopupFocusedId) -eq "MenuExample01") (PopupFocusedId)+ Check "whose entry reads '1. Simple source'" (PopupItemVisible "1. Simple source")+ Step "Enter" $VK_RETURN 500+ Check "the example replaces the project: frames 0 to 1249, its file name in the title (2026-10-29)" ((WaitFor { (Frame) -like "* / 1249" } 5000) -and ($win.Current.Name -like "*Example01_Simple_source.wdproj")) ("{0}; title '{1}'" -f (Frame), $win.Current.Name)Check "the app never took the foreground" ((Foreground) -ne "APP") (Foreground)}finally {@@ -141,7 +152,7 @@ finally {Start-App $Exe (Join-Path $PSScriptRoot "tiny_probes.wdproj")try {Step "F10" 0x79 150; Step "Down" $VK_DOWN 150- for ($i = 0; $i -lt 5; $i++) { Step "Down" $VK_DOWN 80 }+ for ($i = 0; $i -lt 6; $i++) { Step "Down" $VK_DOWN 80 }Step "Right" $VK_RIGHT 150; Step "Enter" $VK_RETURN 200$probes = Join-Path $out "tiny_probes_field"Check "the probes project exports its field with the graph boxes drawn" (WaitFor { (Find "StatusMessage").Current.Name -like "Exported * frames to *tiny_probes_field*" } 60000) ((Find "StatusMessage").Current.Name)@@ -157,7 +168,7 @@ $env:WAVEDUDE_EXPORT_PATH = Join-Path $out "{name}.mp4"Start-App $Exe (Join-Path $PSScriptRoot "tiny_probes.wdproj")try {Step "F10" 0x79 150; Step "Down" $VK_DOWN 150- for ($i = 0; $i -lt 5; $i++) { Step "Down" $VK_DOWN 80 }+ for ($i = 0; $i -lt 6; $i++) { Step "Down" $VK_DOWN 80 }Step "Right" $VK_RIGHT 150; Step "Enter" $VK_RETURN 200$mp4 = Join-Path $out "tiny_probes_field.mp4"Check "the same export as an MP4 completes" (WaitFor { (Find "StatusMessage").Current.Name -like "Exported 50 frames to *tiny_probes_field.mp4*" } 60000) ((Find "StatusMessage").Current.Name)@@ -175,7 +186,7 @@ $env:WAVEDUDE_EXPORT_PATH = Join-Path $out "{name}.jpg"Start-App $Exe (Join-Path $PSScriptRoot "tiny_probes.wdproj")try {Step "F10" 0x79 150; Step "Down" $VK_DOWN 150- for ($i = 0; $i -lt 5; $i++) { Step "Down" $VK_DOWN 80 }+ for ($i = 0; $i -lt 6; $i++) { Step "Down" $VK_DOWN 80 }Step "Right" $VK_RIGHT 150; Step "Enter" $VK_RETURN 200$jpgs = Join-Path $out "tiny_probes_field"Check "the same export as a JPEG sequence completes" (WaitFor { (Find "StatusMessage").Current.Name -like "Exported 50 frames to *tiny_probes_field*" } 60000) ((Find "StatusMessage").Current.Name)diff --git a/_tools/ui_check/ImportCheck.ps1 b/_tools/ui_check/ImportCheck.ps1index 88dd281..ab44205 100644--- a/_tools/ui_check/ImportCheck.ps1+++ b/_tools/ui_check/ImportCheck.ps1@@ -32,7 +32,7 @@ param(Start-App $Exe (Join-Path $PSScriptRoot "..\..\Wave_Dude_Examples\Example12_Dispersion\configuration.json")try {- Check "the imported project is unsaved: the title is the bare application name" ($win.Current.Name -eq "WaveDude Next") $win.Current.Name+ Check "the imported project is unsaved: the title names the file Save As will propose beside the JSON, Example12_Dispersion.wdproj (2026-10-29)" ($win.Current.Name -like "WaveDude Next - *\Example12_Dispersion\Example12_Dispersion.wdproj") $win.Current.Name$sources = @("Source 1", "Source 2", "Source 3", "Source 4") | Where-Object { try { (Find ("Tree:" + $_)) -ne $null } catch { $false } }Check "the tree lists the four sources" ($sources.Count -eq 4) ("found " + $sources.Count)$probes = @("Probe 1", "Probe 2") | Where-Object { try { (Find ("Tree:" + $_)) -ne $null } catch { $false } }