REM ==comet3xx Basic Source File ===== REM REM REM console 1 SCREEN 88, 0 REM REM ==inputation for some parameters===== pxs0# = 1 pys0# = 0 REM ======================================= REM firstspeed-vector cerestron's REM speedtheta# INPUT "vector speed degree -180 to +180"; speedtheta# REM speedbigth# INPUT "speed-bigth 0 to 10 Unit is EarthSpeed"; speedbigth# REM V0(vx0,vy0) speedearth# = 2 * 3.141592 / 365.251 vx0# = speedearth# * speedbigth# * COS(2 * 3.141592 * (speedtheta# + 90) / 360) vy0# = speedearth# * speedbigth# * SIN(2 * 3.141592 * (speedtheta# + 90) / 360) REM ========================================= REM time parameters. REM input deltatimedays REM deltatimedays first:1/4 days of earth. deltatimedays = 1 / 4 PRINT deltatimedays INPUT "HOWLONG by years"; howlong howlong = howlong * 365.251 REM PRINT howlong ''''''''''' REM ==Constant parameter======== REM 62:the local number in this machines.envilonment. gconst = 5.2 * 10 ^ (-8) sungrv = 3.3 * 10 ^ 5 * gconst * speedearth# REM ==graphics sclae======== howauperhalfxmoni = 5 REM =========================================================== REM =================== main core ============================= REM =========================================================== REM counterstep is 0 then next. REM s:sigma mean. pxs# = pxs0#: pys# = pys0# vxs# = vx0#: vys# = vy0# REM axs# = 0#: ays# = 0# REM rem REM REM ============== counter = 0 CIRCLE (320, 200), (320 / howauperhalfxmoni) stepagain: REM ==important core!!========E d# = pxs# ^ 2 + pys# ^ 2 ax# = -sungrv * pxs# / (d# ^ (3 / 2)) ay# = -sungrv * pys# / (d# ^ (3 / 2)) REM ===== REM ===== axs# = ax# ays# = ay# vxs# = vxs# + axs# * deltatimedays vys# = vys# + ays# * deltatimedays pxs# = pxs# + vxs# * deltatimedays pys# = pys# + vys# * deltatimedays REM ========== main core's end ================================ REM ========== Grafic drawing ================================= REM grafic for EGA:640*400 xmoni = 640: ymoni = 400 ktemp = (640 / 2) * (1 / howauperhalfxmoni) 'left -5 AU, right +5A. dotx = xmoni / 2 + ktemp * pxs# doty = ymoni / 2 - ktemp * pys# REM PRINT pxs#; pys# REM PRINT dotx; doty PSET (dotx, doty), 2 REM IF howlong < counter THEN INPUT "HIT ANY KEY"; end$: END counter = counter + deltatimedays GOTO stepagain REM ===========================================================