.geometry "version 0.51";
.l0; 
v1 = .free(-0.595808, -0.0748503, "B");
v2 = .free(-0.670718, 0.54491, "P");
v3 = .free(-0.317365, -0.437126, "O");
l1 = .l.vv(v1, v2, .green);
l2 = .l.vv(v1, v3, .blue);
l3 = .l.vlperp(v2, l1, .in);
l4 = .l.vlperp(v3, l2, .in);
c1 = .c.vv(v2, v1, .in);
c2 = .c.vv(v3, v1, .in);
v4 = .v.lc(l4, c2, 1, "P\sub{1}");
v5 = .v.lc(l3, c1, 2, "P\sub{2}");
v6 = .v.vvmid(v4, v5, [.in, .magenta], "T");
l5 = .l.vv(v2, v5, .green);
l6 = .l.vv(v4, v3, .blue);
.text("Pirates bury treasure with these instructions:
Start at the beech tree, walk to the oak, turn 90\degrees left
and walk the same distance to P\sub{1}.  Start at the
beech, walk to the pine, turn 90\degrees right and walk the
same distance to P\sub{2}.  The treasure is at the midpoint
of P\sub{1} and P\sub{2}.  But when you get there, the beech is
missing (the oak and pine are there).  What to do?", .l0);
.text("Let P and O be fixed and let B be any point.
Draw 2 isosceles right triangles with BP and BO as
legs with the 90\degrees angles facing each other having third
points P\sub{1} and P\sub{2}.  Show that the midpoint T of P\sub{1}P\sub{2}
is independent of B.", .l1);
l8 = .l.vv(v4, v1, .blue);
l9 = .l.vv(v5, v1, .green);
v8 = .v.ll(l9, l1, [.white, .in], "Beech");
v9 = .v.ll(l6, l2, [.white, .in], "Oak");
v10 = .v.ll(l5, l1, [.white, .in], "Pine");
v11 = .v.vvmid(v5, v4, [.magenta, .in], "Treasure");
l10 = .l.vv(v11, v4, [.blink, .white], .line1slash);
l11 = .l.vv(v5, v11, [.blink, .white], .line1slash);
l18 = .l.vlpar(v5, l8, .in, .longline);
l19 = .l.vlpar(v4, l9, .in, .longline);
v13 = .v.ll(l18, l19, [2 .in, .cyan]);
l20 = .l.vv(v5, v13, [2 .in, .blue]);
l21 = .l.vv(v13, v4, [2 .in, .green]);
l22 = .l.vlpar(v5, l6, .in);
l23 = .l.vlpar(v13, l2, .in);
v14 = .v.ll(l22, l23, [2 .in, .white]);
l24 = .l.vv(v5, v14, [2 .in, .blue]);
l25 = .l.vv(v14, v13, [2 .in, .blue]);
l28 = .l.vlpar(v4, l5, .in);
l29 = .l.vlpar(v13, l1, .in);
v15 = .v.ll(l28, l29, [2 .in, .white]);
l30 = .l.vv(v13, v15, [2 .in, .green]);
l31 = .l.vv(v4, v15, [2 .in, .green]);
.text("Press 'Next' to continue ...", .red);
