Click twice on a picture to draw a segment: the first click is its start (a dot), the second its end (an arrowhead). Esc cancels a half-drawn segment.
Every segment carries the number of its pair, shown at both ends. Pair k on the left (before) corresponds to pair k on the right (after). A new segment goes to the selected pair if that side of it is empty; otherwise to the pair, among those missing a segment on that side, whose segment on the other picture is closest; otherwise to a new pair. So you can draw all the left segments first, or alternate, in any order. Check the numbers anyway.
Got the numbering wrong? Change a segment's number in the table: the two segments swap. Or click a segment and type its number.
The direction matters: the start of a segment must sit on the same feature in both pictures. "flip" swaps a segment's two ends. A pair whose two segments point in very different directions is flagged.
Drag an end to move it, or drag the middle of a segment to move all of it. Delete or Backspace removes the selected segment. Ctrl+Z (Cmd+Z) undoes.
Only complete pairs go into the C++ code, in pair order. Copy it into your main. "Load from C++" reads such code back in, to edit segments you already have.
Before
After
Pairs
pair
before (P → Q)
after (P → Q)
Check: segments at t
The two pictures cross-dissolved, with each pair's segment interpolated to t. A pair that
does not correspond shows up as a segment that swings or flips as t moves.
C++ code
Paste lines such as segsBefore.push_back(Segment(Vec2f(85, 102), Vec2f(119, 108)));
and the matching segsAfter lines. The k-th segsBefore line pairs with the k-th segsAfter line. This replaces the current segments.
(Fall 2017) Improved UI courtesy of Czarina A Lao for the overall approach,
color selection, highlighting segments and delete segment features, Ari Green
for different segment start/end markers, and the TAs for combining the features.
(Fall 2026) Rewritten without libraries: numbered pairs that can be renumbered, editable
endpoints, direction checks and an interpolation preview.