Roll and Fall Playing with the Laws of Motion Games Fundamentals © by Jarek Francik Kingston University, London
Agenda Laws of Motion Inclined Plane Friction Falling and Throwing Demo
Newton’s Laws of Motion
1.If no external force acts on a particle, or all the forces are balanced, then the particle moves without any change in velocity if it was in restif it was in motion it stays at restit stays in motion NEWTON’S LAWS OF MOTION
Notice that the behaviour of objects around us is usually affected by air resistance and friction NEWTON’S LAWS OF MOTION
2.If unbalanced external net force acts upon an object then the object moves with the acceleration directly proportional to the magnitude of this force and in the same direction and inversely proportional to the mass of that object NEWTON’S LAWS OF MOTION
The phenomenon of falling is ruled by the Newton’s second law. The force acting is the gravitational force The acceration is on the surface of Earth always the same: g = 9.81 m/s 2 F g = mg NEWTON’S LAWS OF MOTION
Notice that the behaviour of objects around us is usually affected by air resistance and friction NEWTON’S LAWS OF MOTION
3.Whenever A exerts a force on B, B simultaneously exerts a force on A with the same magnitude and opposite direction NEWTON’S LAWS OF MOTION
Friction Force
INCLINED PLANE F g = mg
INCLINED PLANE F g = mg mg sin mg cos
INCLINED PLANE F g = mg mg sin mg cos F N = mg cos
INCLINED PLANE F g = mg F = mg sin F N = mg cos F = F g + F N
INCLINED PLANE F N = mg cos
INCLINED PLANE F g = mg F = mg sin F N = mg cos F F = fmg cos
INCLINED PLANE
V VhVh VvVv
V h = V cos V v = 0
INCLINED PLANE V h V cos V v = 0
Friction Force
FRICTION FORCE F F = f 1 mgF V F F F = f 2 mg V F F = 0 V = 0
Falling & Throwing
FALL & THROW V mg V uniform velocity F = mg gravitational force PARABOLIC TRAJECTORY
FALL & THROW V VhVh V V h = V cos V V = V sin + at
FALL & THROW If there is no initial horizontal component V h = 0 trajectory is linear Non-zero horizontal component V h ≠ 0 trajectory is parabolic Both horizontal and vertical components are non zero V h ≠ 0 V V ≠ 0 trajectory is also parabolic What if V V < 0 yes, trajectory is also parabolic
Demo
Accelerated Motion double v = m_sprite.GetSpeed(); v += 10; m_sprite.SetSpeed(v);... // code above – before Update! m_sprite.Update(GetTime()); or: m_sprite.SetSpeed(m_sprite.GetSpeed() + 10); DEMO
Free Fall double vx = m_sprite.GetXVelocity(); double vy = m_sprite.GetYVelocity(); vy -= 10; m_sprite.SetVelocity(vx, vy); or: m_sprite.SetVelocity(m_sprite.GetXVelocity(), m_sprite.GetYVelocity()-10); DEMO
Bounce if (m_ball.GetBottom() >= 600 && m_ball.GetYVelocity() < 0) m_ball.SetVelocity(m_ball.GetXVelocity(), -0.8 * m_ball.GetYVelocity()); DEMO