'Parabola.bas 2 Jun 2007 'par65100.bas 12 Jun 2007 'Robert Fritzius 'Shade Tree Physics 'This program calculates x any y positions for two gravitationally 'interacting bodies. Its arbitrary constants have been adjusted to 'produce a parabola-like curve for each interacting body. G=.004 'Gravitational Constant Xp=0 'X position object(1) Yp=0 'Y position object(1) Xc=1 'X position object(2) Yc=0 'Y position object(2) Mp=1 'Mass object(1) Mc=1 'Mass object(2) Vpx=0 'Vx object(1) Vpy=-.06 'Vy object(1) Vcx=0 'Vx object(2) Vcy=.06 'Vy object(2) t=0 'time dx=0 'delta x dy=0 'delty y Rsq=0 'Distance squared object(1) to (2) R=0 'Distance object(1) to (2) F=0 'Gravitational force A\$="##.## ##.### ###.### ##.### ###.###" LPrint " t Xp Yp Xc Yc" lprint using A\$;t;Xp;Yp;Xc;Yc for t=.1 to 6 step .1 dx=Xc-Xp dy=Yc-Yp Rsq=(dx^2+dy^2) R=(Rsq)^.5 F=G*Mc*Mp/Rsq Vpx=Vpx+F*dx/R Vpy=Vpy+F*dy/R Vcx=Vcx-F*dx/R Vcy=Vcy-F*dy/R Xp=Xp+Vpx Yp=Yp+Vpy Xc=Xc+Vcx Yc=Yc+Vcy lprint using A\$;t;Xp;Yp;Xc;Yc next t lprint chr\$(12)