diff --git a/2D_Motion.py b/2D_Motion.py index 94ad941..33c00c3 100644 --- a/2D_Motion.py +++ b/2D_Motion.py @@ -89,7 +89,7 @@ def restart(): # simulation loop while ball.pos.y >= ground.pos.y: - rate(100) # set loop to run 100 times a second + rate(1.0 / dt) # set loop to run 100 times a second keyPress(ballScene) #print(restart(ballScene)) diff --git a/energy.py b/energy.py index d7f60cd..26200f8 100644 --- a/energy.py +++ b/energy.py @@ -66,7 +66,7 @@ while True: - rate(100) + rate(1.0 / dt) keyPress(scene) if block.pos.x < blockWidth / 2: # When block is sliding down the ramp # dt is such a small number that we are calculating the AROC on such a small interval that we are more or less getting instantaneous values (Calculus Application) diff --git a/freefall_basic.py b/freefall_basic.py index d87b3da..e20f928 100644 --- a/freefall_basic.py +++ b/freefall_basic.py @@ -75,7 +75,7 @@ def restart(): # simulation loop while ball.pos.y >= 0: - rate(100) # set loop to run 100 times a second + rate(1.0 / dt) # set loop to run 100 times a second keyPress(ballScene) diff --git a/freefall_complex.py b/freefall_complex.py index 43d6233..8bd6f55 100644 --- a/freefall_complex.py +++ b/freefall_complex.py @@ -72,7 +72,7 @@ def restart(): # simulation loop while ball.pos.y >= ground.pos.y: - rate(100) # set loop to run 100 times a second + rate(1.0 / dt) # set loop to run 100 times a second keyPress(ballScene) diff --git a/momentum.py b/momentum.py index 7446bce..9c7bf72 100644 --- a/momentum.py +++ b/momentum.py @@ -71,6 +71,6 @@ def updatePos(rightInMotion, time): # takes boolean indicating which pendulum st rightInMotion = True # start with the right pendulum in motion while True: - rate(100) + rate(1.0 / dt) rightInMotion = updatePos(rightInMotion, t) t += dt \ No newline at end of file