'Programmer's notes: Run this in full screen mode if you are in windows. 'You more then likely will need to adjust the length of the delay loop 'depending on the speed of your computer. 1000 works well for 'a K6-2 300 Mhz computer. Adjust the following value as necessary. delay = 10000 '********************* GLIDER SIMULATOR ********************** ' ' by: Marten Beels ' Ulises Martinez ' Matthew Nyce ' '************************************************************* SCREEN 12 PRINT "Welcome to Marten's glider simulator" PRINT "please enter the following initial conditions:" INPUT "angle of attack in radians = "; theta INPUT "velocity (must be greater then 0 to 3 approx)= "; v INPUT "drag to lift ratio (0 to 4, but 0 to 1 is most interesting)= "; a 'INPUT "increment = "; incr 'INPUT "iterations (300 to 600 works well) = "; iter 'theta = .1 'v = 1 'a = 1 incr = .01 'iter = 200 CLS PRINT "The length of the line is proportional to the speed of the glider." PRINT "Press any key to quit" PRINT "theta = "; theta PRINT "v = "; v PRINT "A = "; a count = 0 WHILE a$ = "" a$ = INKEY$ count = count + 1 dtheta = (v ^ 2 - COS(theta)) / v dv = -SIN(theta) - a * v ^ 2 oldtheta = theta oldv = v theta = dtheta * incr + theta v = dv * incr + v 'slow down loop to pause the screen FOR x = 0 TO delay NEXT x 'cls 'PRINT oldtheta, oldv, theta, v LINE (300, 200)-(oldv * 100 * COS(oldtheta) + 300, oldv * 100 * -SIN(oldtheta) + 200), 2 LINE (300, 200)-(v * 100 * COS(theta) + 300, v * 100 * -SIN(theta) + 200), 4 WEND