IMPORT PS, Math, Anim; CONST Duration = 2; PROC Mess(a, b, c, d) IS IF PS.SetWidth(5); Curve(a, b, c, d); Curve(d, b, c, a); Curve(a, b, d, c); Curve(c, a, b, d); Curve(d, c, a, b); Curve(b, d, a, c); Curve(c, d, a, b); Curve(b, d, c, a); Line(a, b); Line(b, d); Line(d, c); Line(c, a); Line(a, d) FI END; PROC Line(a, b) IS PS.MoveTo(a); PS.LineTo(b); PS.Stroke() END; PROC PatT(a, b, c, d, e, t) IS VAR theta = 2 * Math.Pi * t, p = (COS(theta), SIN(theta)) IN Mess(a, b, c, p REL (e, d)) END END; PROC Go(a, b, c, d, e) IS Anim.Play((CLOSE(PatT, a, b, c, d, e), Duration)) END; UI PointTool(Go); PROC Curve(a, b, c, d) IS IF PS.MoveTo(a); PS.CurveTo(b, c, d); PS.Stroke() FI END; UI PointTool(Curve); PROC Cmd0() IS IF VAR a = (59.83, 438.4), b = (222.7, 439.9), c = (59.08, 256.4), d = (234.8, 241.2), e = (241.6, 188.1) IN Go(a, b, c, d, e); PS.Reset() END FI END;