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#
The selected item over the pictures in a bright yellow, the rest in a light grey
Alexander Graefc1ab9871e5e9
diff --git a/CLAUDE.md b/CLAUDE.mdindex 9714798..ebbb847 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -173,7 +173,9 @@ FrameStore: native memory up to the budget, the rest in a temp file (%LOCALAPPDAat the corner went unnoticed inside the rim); the model's parameterless adders take the scene's size, the window passesthe shown canvas's centre, which an image scene sizes; a new probe's line end lies 100 px to the right.- **Handles and overlays**: sources, probes, emitter dots and the rotation handle are drawn over the pictures in- canvas pixels, over a dark halo, clipped to the picture; a probe's handles and line appear only on the picture of+ canvas pixels, over a dark halo, clipped to the picture, in a light grey, the selected item's in a bright yellow+ (`PictureHandle`, `PictureSelection` in `Controls.xaml`, 2026-10-26, Jeroen's tester: the accent blue was duller than+ the rest and lost on a blue scheme and to colour-blind eyes; the keyboard focus keeps the accent); a probe's handles and line appear only on the picture ofthe layer it measures (2026-10-18), sources on both; graph boxes lie over every handle and dot, the selecteditem is drawn last among its kind, except the handles themselves (Panel.ZIndex breaks the Tab cycle, 2026-10-18);arrows nudge, selection syncs with the tree, a click ondiff --git a/WaveDudeNext.WPF/Panes/PreviewPane.xaml b/WaveDudeNext.WPF/Panes/PreviewPane.xamlindex 2c7b784..f667070 100644--- a/WaveDudeNext.WPF/Panes/PreviewPane.xaml+++ b/WaveDudeNext.WPF/Panes/PreviewPane.xaml@@ -166,7 +166,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<!-- the handles of the sources, parts and probes on the pictures: a ring for a source, a ring with an inner ring for apart (a lens-shaped glyph read as squashed, 2026-10-18), a square for a probe point, each with four crosshair ticksoutside it and a gap around the exact pixel; every stroke is drawn twice, a dark halo first, so the glyph reads on- any picture. The selected item's handle and the focused handle show the accent. Glyphs are 20 x 20 with the point+ any picture. The selected item's handle shows the selection yellow, the focused handle the accent fill. Glyphs are 20 x 20 with the pointat (10, 10); the tree's 16 px icons (Themes/Controls.xaml) are drawn after them --><StreamGeometry x:Key="SourceGlyph">M4,10 A6,6 0 1 1 16,10 A6,6 0 1 1 4,10 M10,0 L10,2.5 M10,17.5 L10,20 M0,10 L2.5,10 M17.5,10 L20,10</StreamGeometry><StreamGeometry x:Key="ProbeGlyph">M4.5,4.5 L15.5,4.5 L15.5,15.5 L4.5,15.5 Z M10,0 L10,2.5 M10,17.5 L10,20 M0,10 L2.5,10 M17.5,10 L20,10</StreamGeometry>@@ -176,14 +176,14 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<Setter Property="Height" Value="20" /><Setter Property="Cursor" Value="SizeAll" /><Setter Property="FocusVisualStyle" Value="{x:Null}" />- <Setter Property="Foreground" Value="White" />+ <Setter Property="Foreground" Value="{DynamicResource PictureHandle}" /><Setter Property="Background" Value="#60000000" />- <Setter Property="BorderBrush" Value="White" />+ <Setter Property="BorderBrush" Value="{DynamicResource PictureHandle}" /><Setter Property="StrokeThickness" Value="1.5" /><Style.Triggers><Trigger Property="IsSelectedMarker" Value="True">- <Setter Property="BorderBrush" Value="{DynamicResource Accent}" />- <Setter Property="Foreground" Value="{DynamicResource Accent}" />+ <Setter Property="BorderBrush" Value="{DynamicResource PictureSelection}" />+ <Setter Property="Foreground" Value="{DynamicResource PictureSelection}" /></Trigger><Trigger Property="IsKeyboardFocused" Value="True"><Setter Property="Background" Value="{DynamicResource DropPreviewFill}" />@@ -603,7 +603,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<!-- the handles: sources, emitter dots, probe points and lines. Styled here, not implicitly: WPF appliesimplicit styles inside a template only to Controls, and the overlay is a Panel --><controls:SceneOverlay SourceStyle="{StaticResource SourceMarker}" PartStyle="{StaticResource PartMarker}" GripStyle="{StaticResource PartGripMarker}" PointStyle="{StaticResource PartPointMarker}" HandleStyle="{StaticResource FiberHandleMarker}" ProbeStyle="{StaticResource ProbeMarker}" AngleStyle="{StaticResource AngleMarker}"- LineBrush="White" LabelBrush="White" AccentBrush="{DynamicResource Accent}"+ LineBrush="{DynamicResource PictureHandle}" LabelBrush="{DynamicResource PictureHandle}" AccentBrush="{DynamicResource PictureSelection}"Project="{Binding Project, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}"CanvasWidth="{Binding CanvasWidth, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}"CanvasHeight="{Binding CanvasHeight, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}"@@ -615,7 +615,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file ora handle under a box is reached by Tab or the tree instead); which probes depends on the cell's layer(the attached PreviewPane.Layer) --><controls:ProbeGraphOverlay BoxStyle="{StaticResource ProbeBoxThumb}" CornerStyle="{StaticResource ProbeBoxCornerThumb}"- AccentBrush="{DynamicResource Accent}"+ AccentBrush="{DynamicResource PictureSelection}"Layer="{Binding Path=(local:PreviewPane.Layer), RelativeSource={RelativeSource TemplatedParent}}"Project="{Binding Project, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}"Run="{Binding Run, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}"diff --git a/WaveDudeNext.WPF/Themes/Controls.xaml b/WaveDudeNext.WPF/Themes/Controls.xamlindex cf54489..782799c 100644--- a/WaveDudeNext.WPF/Themes/Controls.xaml+++ b/WaveDudeNext.WPF/Themes/Controls.xaml@@ -27,6 +27,13 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<BooleanToVisibilityConverter x:Key="BoolToVisibility" />+ <!-- over the pictures (2026-10-26, Jeroen's tester: the selected item's accent blue was duller than the rest, lost on a blue+ scheme and to colour-blind eyes): the handles, labels, lines, outlines and graph boxes in a light grey, the selected+ item's in a bright yellow, both over the dark halo, so luminance tells them apart; the same in both themes, the+ pictures being data, not chrome. The keyboard focus keeps the accent, as everywhere -->+ <SolidColorBrush x:Key="PictureHandle" Color="#FFC8C8C8" />+ <SolidColorBrush x:Key="PictureSelection" Color="#FFFFE000" />+<!-- glyphs --><StreamGeometry x:Key="ArrowUpGeometry">M0,4 L4,0 L8,4 Z</StreamGeometry><StreamGeometry x:Key="ArrowDownGeometry">M0,0 L8,0 L4,4 Z</StreamGeometry>