This is a test animation file: two polygons with a rotating viewpoint
Heckbert, August 11, 1988 12:32:51 pm PDT
Bloomenthal, February 15, 1989 9:51:19 pm PST
nframes: NAT ~ 12;
res:  NAT ~ 160;    -- divides into both 640 and 480
shape:  ROPE ~ "3dSqTri.shape";
color:  ImagerColor.OpConstantColor ~ ImagerColor.ColorFromGray[0.1];
Command["Install ColorTrix"];
MessageToLog[NIL];
Command["ct clear"];
G3dInterpret.Op["Background: 0.2, 0.2, 0.2"];
G3dInterpret.Op["AntiAliasing: False"];
G3dInterpret.Op[Rope.Cat["ShapeRead ", shape]];
FOR f: INT IN [0..nframes) DO
sx: INTEGER ← f*res MOD 640;
sy: INTEGER ← Real.Floor[f*res/640]*res;
MessageToLog[IO.PutFR["\nFrame %g at (%g, %g)", [integer[f]], [integer[sx]], [integer[sy]]]];
G3dInterpret.OpInts["DisplayRegion", LIST[sx, sy, res-1, res-1]];
{
rad: REAL ← 4.0;
ang: REAL ← 360.0*f/nframes+5.0;
x: REAL ← rad*RealFns.SinDeg[ang];
y: REAL ← -rad*RealFns.CosDeg[ang];
G3dInterpret.OpReals["ShapePosition", LIST[x, y, 0.0]];
G3dInterpret.Op["Render"];
CtMisc.PrintRope[IO.PutFR["%g", [integer[f]]], [sx+res/2, sy+res-10], color]; -- frame #
};
ENDLOOP;