Universal Gravitation with Stop  

[Diagram Level | Equations Level | Graphs ]




position_1(t) = position_1(t - dt) + (rate_of_change_of_pos_1) * dt
INIT position_1 = initial_pos_1
rate_of_change_of_pos_1 = velocity_1

position_2(t) = position_2(t - dt) + (rate_of_change_of_pos_2) * dt
INIT position_2 = initial_pos_2
rate_of_change_of_pos_2 = velocity_2

velocity_1(t) = velocity_1(t - dt) + (rate_of_change_of_vel_1) * dt
INIT velocity_1 = 0
rate_of_change_of_vel_1 = accel_1

velocity_2(t) = velocity_2(t - dt) + (rate_of_change_of_vel_2) * dt
INIT velocity_2 = 0
rate_of_change_of_vel_2 = accel_2

accel_1 = net_force/mass_1
accel_2 = -net_force/mass_2

collision = if (distance_between<(radius1+radius2+ .005)) 
            then pause else 0 
distance_between = abs(position_2-position_1)

initial_pos_1 = 0
initial_pos_2 = .2

mass_1 = 6E6
mass_2 = 6E6

net_force = 6.67E-11*(mass_1*mass_2)/(Distance_between)^2
Time Specs Settings
Range: 0-2; dt = 0.001; Integration Method = Runge-Kutta 4



Home | Contact | Site Map | Search