All my students were able to create a bouncy ball that moved at constant velocity and bounced off at least a single wall.
The students did not really feel comfortable incorporating kinematics into the problem. This is completely understandable. They hadn't consistently seen the formulas since September. So what I decided to do is exactly what my masters thesis in advisor in physics did when undergraduates were stuck on code. I gave them partially functional code, made them explain it to me and them had them modify it to obey the physics of the real bouncy ball:
from visual import *
ball = sphere(pos=(-5,10,0), radius=0.5, color=color.cyan)
wallB = box(pos=(0,0,0), size=(12,0.2,12), color=color.green)
ball.velocity = vector(1,0,0)
ball.trail = curve(color=ball.color)
deltat = 0.005
t=0
while t < 12:
rate(100)
if ball.pos.y < wallB.pos.y:
ball.velocity.y = -ball.velocity.y
ball.velocity.y = ball.velocity.y - 9.8 * deltat
ball.pos = ball.pos + ball.velocity*deltat
ball.trail.append(pos=ball.pos)
t = t + deltat
ball = sphere(pos=(-5,10,0), radius=0.5, color=color.cyan)
wallB = box(pos=(0,0,0), size=(12,0.2,12), color=color.green)
ball.velocity = vector(1,0,0)
ball.trail = curve(color=ball.color)
deltat = 0.005
t=0
while t < 12:
rate(100)
if ball.pos.y < wallB.pos.y:
ball.velocity.y = -ball.velocity.y
ball.velocity.y = ball.velocity.y - 9.8 * deltat
ball.pos = ball.pos + ball.velocity*deltat
ball.trail.append(pos=ball.pos)
t = t + deltat
My students were able to look at their basic kinematics formulas and intuit that the formula :
ball.velocity.y = ball.velocity.y - 9.8 * deltat
is python for v = -gt + v0 .
(Of course we physics teachers realize that this is a lie. What we are actually calculating are average velocities over very small time intervals and then calculating position changes over said intervals as well. I think this detail might be beyond sophomores and juniors who are in algebra. I know many of my colleagues would argue against eliminating this rigor from discussion. Personally I think this is a high school class and I don't want to avoid the cognitive overload that comes from making subtle mathematical arguments that don't really help the kids see the physics)
Here is what the code does
Students then had to do was modify this code to make the ball bounce realistically. This lead to interesting discussions of how to make this happen. Students shared ideas and code.
When the students had too many ideas to be useful I told them not to change gravity or introduce any kind of air resistance.
Finally when they still seemed stuck, I told them that what we want to alter is the rebound velocity and then let ordinary gravity "take over".
They were finally able to modify the following line of their code:
if ball.pos.y < wallB.pos.y:
ball.velocity.y = -ball.velocity.y
to read:
if ball.pos.y < wallB.pos.y:
ball.velocity.y = - C * ball.velocity.y
where C (≤ 1) is a crude coefficient or restitution adequate enough for basic high school physics.
They also (at my request) found out how to print data by going online.
print (t,ball.pos.y)
At this point, the students were ready to see a real bouncy ball. We took 5 crude eyeball bounces, and concluded that a bouncy ball dropped from 1 meter should rebound to a height of 80 cm.
It turns out that the correct value for C that yields this result to was around 0.9. The students were really engaged at this point and tuned their coefficient out to 3 or so decimal places.
I then asked them why this coefficient would work in terms of kinematics they studied.
I then asked them why this coefficient would work in terms of kinematics they studied. After about playing with the equations for 10 minutes one group came up with this elegant solution:
The challenge was two-fold for me at this point as an instructor:
1. having the students language out the conclusion: "The coefficient should be the square root of the percentage of height we want to rebound to" or some such language. This was something they were able to calculate but not really explain.
2. Of the students who struggled, I was just not sure how much to give away, and how much to let them figure out. This I think is the challenge of teaching. Once they all saw the explanation though, it did seem to make sense to them, and they enjoyed the coding.
What I decided to do the next day was really based on what the students were doing themselves. That will be part 2 of this post...
No comments:
Post a Comment