Jump to content

machwave

Member
  • Posts

    3
  • Joined

  • Last visited

    Never

Reputation

1 Neutral
  1. Thanks for the tips. I'll give them a try. I'm an infrequent user and am slowly learning the basics.
  2. 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);
  3. How do I make a pointed 3D cone with an elliptical base, rather than the usual circular base? Since the taper angle varies around the ellipse, the Tapered Extrude function doesn't work.
×
×
  • Create New...