The rotating cam example mentioned above is pretty intricate. I think I've extracted the core of the method in the procedure below. It puts a box on the display and spins it around an origin. Hope it helps someone get started. I spent a couple days trying to figure it out.
****************************************
Procedure Rotate_a_box;
VAR
angle: REAL; { angle rotation per REPEAT cycle }
recH: HANDLE; { rectangle handle }
Xcenter,Ycenter : REAL; { rotation origin }
xM,yM : REAL; {required for MouseDown function}
cCode : INTEGER ; {required for keyDown function}
BEGIN
angle:=.2; { set rotation angle; size sets percieved speed of rotation }
Xcenter := 0 ; {set an arbitrary rotation origin}
Ycenter := 0 ;
UnDoOff; { turn off UNDO, not sure why, maybe for faster operation? }
Rect(0,0,.5,1); {draw an arbitrary size rectangle and get its handle}
recH := LNewObj;
DSelectAll; { Unselect the rectangle to remove the screen markers }
REPEAT {rotate rectangle by 'angle' degrees until press key or mouse button}
HRotate(recH , Xcenter , Ycenter , angle );
ReDraw; { refresh screen }
UNTIL KeyDown( cCode ) | MouseDown(xM,yM); { check for key or mouse button }
END;
RUN(Rotate_a_Box);