ELSE {
B:
PROC [name: Rope.
ROPE]
RETURNS [Controls.Button] ~ {
RETURN[Controls.ClickButton[Rope.Concat[name, ": On"], Button, e]];
};
e: EllipseData ¬ NEW[EllipseDataRep];
nPts: INTEGER ¬ IF nPoints.ok THEN nPoints.int ELSE 40;
e.points ¬ NEW[G2dBasic.PairSequenceRep[nPts]];
e.derivs ¬ NEW[G2dBasic.PairSequenceRep[nPts]];
e.accels ¬ NEW[G2dBasic.PairSequenceRep[nPts]];
e.points.length ¬ e.derivs.length ¬ e.accels.length ¬ nPts;
e.a ¬ Controls.NewControl["a", vSlider, e, 0.0, 1.0, 0.5, EllipseControl];
e.b ¬ Controls.NewControl["b", vSlider, e, 0.0, 1.0, 0.25, EllipseControl];
e.scale ¬ Controls.NewControl["scale", vSlider, e, 0.0, 3.0, 1.0, EllipseControl];
ComputeEllipse[e];
e.viewer ¬ Controls.OuterViewer[
name: "G2d Ellipse",
graphicsHeight: 200,
drawProc: DrawEllipse,
controls: LIST[e.a, e.b, e.scale],
buttons: LIST[B["Ellipse"], B["Focci"], B["Derivs"], B["Accels"]],
clientData: e].parent;
e.graphics ¬ NARROW[e.viewer.data, Controls.OuterData].graphics;
};