SCREEN _NEWIMAGE(640, 480, 32)
WINDOW (-3.2, -2.4)-(3.2, 2.4)
FOR x = -3.2 TO 3.2 STEP .01 'The two arcs
PSET (x, ya(x)), -1
PSET (x, yb(x)), -1
NEXT
LowPoint = 2.4: HighPoint = -2.4
FOR y = 2.4 TO 0 STEP -0.01
FOR x = -3.2 TO 3.2 STEP 0.01
IF POINT(x, y) <> 0 AND y < LowPoint THEN LowPoint = y
NEXT
NEXT
FOR y = -2.4 TO 0 STEP 0.01
FOR x = -3.2 TO 3.2 STEP 0.01
IF POINT(x, y) <> 0 AND y > HighPoint THEN HighPoint = y
NEXT
NEXT
Midpoint = (HighPoint - LowPoint) / 2
CIRCLE (0, LowPoint + Midpoint / 2), Midpoint / 2
CIRCLE (0, HighPoint - Midpoint / 2), Midpoint / 2
CIRCLE (-2, -2), .1, &HFFFF0000 'one point
CIRCLE (1, 1.25), .1, &HFFFF0000 'second point
SLEEP
FUNCTION ya (x)
ya = -x ^ 2 / 4 - 1
END FUNCTION
FUNCTION yb (x)
yb = x ^ 2 / 4 + 1
END FUNCTION
Start at the bottom left, follow the arc to your first point and board the train to the apex and get on the circle. Continue to the next circle and get on it. Exit the circle at the apex of the top arc and continue on to your destination at the second point.