Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
repository:rear-end_collision [2021/02/17 18:25]
porcaro1 [Answer Key]
repository:rear-end_collision [2021/02/17 18:33] (current)
porcaro1
Line 28: Line 28:
 To perform this virtual experiment in real life, constant velocity toy cars can be purchased [[https://​www.arborsci.com/​products/​constant-velocity-car | here]]. To perform this virtual experiment in real life, constant velocity toy cars can be purchased [[https://​www.arborsci.com/​products/​constant-velocity-car | here]].
 ===Code=== ===Code===
-[[https://trinket.io/glowscript/bf8901f2cb ​| Link]]+[[https://www.glowscript.org/#/​user/​porcaro1/​folder/​RepositoryPrograms/​program/​Rear-EndCollision-Incomplete/edit | Link]]
 <code Python [enable_line_numbers="​true"​]>​ <code Python [enable_line_numbers="​true"​]>​
 GlowScript 2.7 VPython GlowScript 2.7 VPython
Line 80: Line 80:
 ====Answer Key==== ====Answer Key====
 ===Handout=== ===Handout===
-  ​- We can solve for where and when the crash will occur by creating a system of equations and solving (much like we did in the [[https://​www.msuperl.org/​wikis/​icsam/​doku.php?​id=repository:​head-on_collision | Head-On Collision]] activity). Let's start by creating a kinematic equation describing the motion of the fast, red buggy: We know the initial position of the red buggy is 5 units to the left of the origin (line 4) and moving to the right with a velocity of 5 units or length per unit of time (line 12). Therefore, the kinematic equation to describe the position of the red buggy is $x=-5+5t$. Now let's do the same for the slower, blue buggy: $x=0+3t$ (lines 5 and 13). Setting these equations equal to each other will allow us to find out how long until the collisions: $-5+5t=0+3t$. However, we aren't quite ready to solve first; We need to remember that these buggies have a physical length of 2 (lines 3 and 4) while their positions in the code represent the centers of the buggies. We don't want to solve for when the cars are intersecting but rather when the front of the red buggy collides with the rear bumper of the blue buggy. We can compensate for this in the equations by adding a length unit for the red buggy equation and subtracting a length unit for the blue buggy equation: $x=-4+5t$ and $x=-1+3t$, respectively. Now we can solve for $t$ by setting the equations equal to one-another:​ $$-4+5t=1+3t$$ Simplifying we get $2t=3$ therefore $t=\dfrac{3}{2}=1.5$. The crash will occur after 1.5 units of time. We can plug this back into any of our two initial kinematic equations to find out where the crash will occur: $x=-4+5*1.5=-1+3*1.5=3.5$. The buggies will collide 3.5 units to the right of the origin; in other words (accounting for the length of each vehicle), the position of the center of the red buggy at the crash site will be at 2.5 units to the right of the orign and the the center of the blue buggy will be at 4.5 units. +{{ :​repository:​rear-end_collision_2.png?​nolink&​600|}} 
-  ​- ​See highlighted lines below to see important code modifications. ​+We can solve for where and when the crash will occur by creating a system of equations and solving (much like we did in the [[https://​www.msuperl.org/​wikis/​icsam/​doku.php?​id=repository:​head-on_collision | Head-On Collision]] activity). Let's start by creating a kinematic equation describing the motion of the fast, red buggy: We know the initial position of the red buggy is 5 units to the left of the origin (line 4) and moving to the right with a velocity of 5 units or length per unit of time (line 12). Therefore, the kinematic equation to describe the position of the red buggy is $x=-5+5t$. Now let's do the same for the slower, blue buggy: $x=0+3t$ (lines 5 and 13). Setting these equations equal to each other will allow us to find out how long until the collisions: $-5+5t=0+3t$. However, we aren't quite ready to solve first; We need to remember that these buggies have a physical length of 2 (lines 3 and 4) while their positions in the code represent the centers of the buggies. We don't want to solve for when the cars are intersecting but rather when the front of the red buggy collides with the rear bumper of the blue buggy. We can compensate for this in the equations by adding a length unit for the red buggy equation and subtracting a length unit for the blue buggy equation: $x=-4+5t$ and $x=-1+3t$, respectively. Now we can solve for $t$ by setting the equations equal to one-another:​ $$-4+5t=1+3t$$ Simplifying we get $2t=3$ therefore $t=\dfrac{3}{2}=1.5$. The crash will occur after 1.5 units of time. We can plug this back into any of our two initial kinematic equations to find out where the crash will occur: $x=-4+5*1.5=-1+3*1.5=3.5$. The buggies will collide 3.5 units to the right of the origin; in other words (accounting for the length of each vehicle), the position of the center of the red buggy at the crash site will be at 2.5 units to the right of the orign and the the center of the blue buggy will be at 4.5 units. 
 + 
 +See highlighted lines below to see important code modifications. ​
 ===Code=== ===Code===
 <code Python [enable_line_numbers="​true",​ highlight_lines_extra="​12,​13,​39,​40,​41,​42"​]>​ <code Python [enable_line_numbers="​true",​ highlight_lines_extra="​12,​13,​39,​40,​41,​42"​]>​
  • repository/rear-end_collision.1613586347.txt.gz
  • Last modified: 2021/02/17 18:25
  • by porcaro1