ANath Physics Final Project
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
This model shows how the conservation of energy can come into play when dealing with a kinematics problem, and how a multide of factors can affect the distance a mass travels.
HOW IT WORKS
To create the path of the mass falling off the cliff, I used a quadratic equation, which later became a problem when trying to use angles of inclination other than 0 degrees.That is why there is only the generic horizontal cliff.
HOW TO USE IT
All the math is done within the program, but it is up to the user to use the numbers given to calculate what the initial velocity needs to be. If properly calculated, the mass should land within the green area. Otherwise, there is an option to reset the same scenario and the user can change the initial velocity.
There is also an option to change the height of the hill and of the cliff, if the user wants to play around with how those individually affect the distance the mass travels. The reset button can then be used to change the set up of the hill-cliff scenario.
NOTE: The height of the entire hill-cliff must be 12 units or greater, so if the user is inputting their own heights, they must be aware of that.
THINGS TO TRY
(suggested things for the user to try to do (move sliders, switches, etc.) with the model)
Comments and Questions
Globals [ hillHeight cliffHeight finalVelocity pathEndX pathEndY hillBottomX hillBottomY target distanceTravelled ] breed [ masses mass ] to setup ca make-world show-target make-mass calculate-finalVelocity end to make-world ask patches [ set pcolor white ] set hillHeight (random 10) set cliffHeight (random 10) while [ hillheight + cliffHeight < 12 ] [ set hillHeight (random 10) set cliffHeight (random 10) ] change-hill-height change-cliff-height make-hill-cliff end to change-hill-height if changeHillHeight? [ set hillHeight userHillHeight ] end to change-cliff-height if changeCliffHeight? [ set cliffHeight userCliffHeight ] end to make-hill-cliff create-turtles 1 [ set color black setxy -18 (hillHeight + cliffHeight - 10) pen-down create-path die ] create-turtles 1 [ set color white setxy -18 (hillHeight + cliffHeight - 10) facexy xcor 11 pen-down while [ xcor = -18 and ycor < (hillHeight * cos(abs(xcor) * 10) * -1)] [ fd 1 set ycor (ycor + 1) ] die ] end to create-path while [ xcor < 0 and ycor > 1 ] [ set ycor (hillHeight * cos(abs(xcor) * 10) * -1) set xcor (xcor + .01) ] facexy 0 ycor fd 3 rt 90 fd cliffHeight lt 90 fd 26 set pathEndX xcor set pathEndY ycor end to show-target set target (random (pathEndX - 2)) ask patches [ if pxcor >= target and pxcor <= (target + 2) and pycor < pathEndY + 1 and pycor > pathEndY [ set pcolor green ] ] end to make-mass set-default-shape masses "circle" create-masses 1 [ set color red set size 1 setxy -18 (hillHeight * cos(180) * -1 + .5) ] end to calculate-finalVelocity set finalVelocity sqrt (2 * 9.8 * hillHeight + (initialVelocity) ^ 2) end to go ask masses [ go-down-hill travel determine-result ] end to go-down-hill while [ xcor < 0 and ycor > 1.5 ] [ set ycor (hillHeight * cos(abs(xcor) * 10) * -1 + .5) set xcor (xcor + .01) wait .001 ] facexy 1 ycor set hillBottomX xcor set hillBottomY ycor while [ xcor < (hillBottomX + 3)] [ fd .01 wait .001 ] end to travel while [ xcor < 20 and ycor >= pathEndY ] [ set distanceTravelled (finalVelocity * sqrt (2 * (hillBottomY - pathEndY) / 9.8)) set ycor (abs(1 / (distanceTravelled + 7))) * (- ((xcor - hillBottomX - 3) ^ 2)) + 1.5 set xcor (xcor + .01) wait .001 ] end to determine-result ifelse pcolor = green [ output-print "You Win!!" ] [ output-print "Try Again!" ] end to reset ask masses [ die ] ask patches [ set pcolor white ] create-turtles 1 [ set color white setxy -18 (hillHeight + cliffHeight - 10) pen-down create-path die ] change-hill-height change-cliff-height make-hill-cliff ask patches [ if pxcor >= target and pxcor <= (target + 2) and pycor < pathEndY + 1 and pycor > pathEndY [ set pcolor green ] ] make-mass ask masses [ set hillBottomX xcor set hillBottomY ycor ] calculate-finalVelocity end
There is only one version of this model, created about 6 years ago by Anusua Nath.
Attached files
No files
This model does not have any ancestors.
This model does not have any descendants.