Main

'' Forms definitions:
     Define FORM.PTR as a pointer variable

'' Set up the world view and view port
     Let VXFORM.V = 1                                    
     Call SETWORLD.R (-1000.0, 1000.0,-1000.0, 1000.0)  


'' Presentation graphics:
     Let TIMESYNC.V = 'CLOCK'
     show CLOCK.TIME with "image.grf"

'' Display the form and get model parameters
       Show FORM.PTR with "image.frm"
       If ACCEPT.F(FORM.PTR, 0) eq "OK"

         '' Set timescale and speed:
         '' timescale is the number of 1/100ths seconds 
         '' that will pass for every simulation time unit. 
         '' The speed is in real world units / second.

         Let TIMESCALE.V = DDVAL.A(DFIELD.F("TIMESCALE", FORM.PTR))
         Let SPEED = DDVAL.A(DFIELD.F("SPEED", FORM.PTR))
         Let NUM.ROTATIONS = DDVAL.A(DFIELD.F("NUM ROTATIONS", FORM.PTR))

         

         '' Accept icon name for graphics entity IMAGE,
         '' show it with that name and   
         '' activate an 'image.motion' process.

          Activate an IMAGE.MOTION now
          Show IMAGE with DTVAL.A(DFIELD.F("ICON NAME",FORM.PTR)) at(0.0,0.0)
        
          Start simulation

      Always
End ''Main
