'' 
'' COPYRIGHT (C) 1987, CACI, INC. - FEDERAL, LA JOLLA
''
''
'' Model: image   
''
''-----------------------------------------------------------------------

Main
     Define FORM.PTR as a pointer variable

''   Set up the world view and view port
     Let vxform.v = 1                            '' View port number
     Let timesync.v = 'CLOCK'
     Call setworld.r(-1000.0, 1000.0,-1000.0, 1000.0)    '' World dimensions

''   create and display the graph
     show CLOCK.TIME with "image.grf"

''   create a form and get model parameters
     show FORM.PTR with "image.frm"
     if ACCEPT.F(FORM.PTR, 0) eq "OK"

         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))
''       timescale is the number of 1/100ths seconds that will pass for every
''       simulation time unit.  The speed is in real world units / second.
    
         Activate an IMAGE now
         Show IMAGE with DTVAL.A(DFIELD.F("ICON NAME", FORM.PTR))
''       create an 'image' process.  Since a 'image' is also a display entity,
''       we will show it with the icon specified by the user

         Start simulation

      Always
End ''Main

