Particle Kinematics: Translation at Constant Acceleration - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

Particle Kinematics: Translation at Constant Acceleration

Description:

This lecture considers rigid body which has: no (or negligible) ... 'Save Dino II' What speed should Dino avoid? Initial motion parameters. position (x, y) data ... – PowerPoint PPT presentation

Number of Views:207
Avg rating:3.0/5.0
Slides: 16
Provided by: claudecch
Category:

less

Transcript and Presenter's Notes

Title: Particle Kinematics: Translation at Constant Acceleration


1
Fac. of Comp., Eng. Tech. Staffordshire
University
Programming Physics Engines for Games
Particle KinematicsTranslation at Constant
Acceleration
Dr. Claude C. Chibelushi
2
Outline
  • Introduction
  • Motion Formulas
  • Problem Solving Procedure
  • Software Implementation
  • Summary

3
Introduction
  • This lecture considers rigid body which has
  • no (or negligible) angular motion
  • only translational motion considered
  • particle model can be used
  • net external force
  • implication of Newtons 2nd law of motion
  • constant net force results in constant
    acceleration
  • hence changing velocity

4
Motion Formulas
Translation at constant acceleration
Displacement in equal time steps
5
Motion Formulas
Summary of formula set
Constant net external force
Special case t1 0
Replace t by (t t1) in formulas above
General case
6
Problem Solving Procedure
  • Same steps as for constant velocity motion
  • but different motion formulas
  • 1D motion example
  • Boy Racer Returns II
  • Stafford to Stoke straight road, length 30 km
  • car
  • initial speed 60 km / h
  • constant acceleration throughout race 5 km / h2
  • Did boy racer break record (20 min)?

7
Problem Solving Procedure
  • 2D motion example
  • Save Dino II
  • What speed should Dino avoid?
  • Initial motion parameters
  • position (x, y) data
  • dinosaur (10 km, 210 km). asteroid (10 km, 10
    km)
  • asteroid speed 100 km / h. acceleration 2 km /
    h2
  • Dinosaur speed constant

8
Software Implementation
  • Define data structures
  • // C structure for particle in 2D space typedef
    struct particle2DTag
  • Point2D pos
  • Vector2D vel
  • Vector2D acc
  • Particle2D

9
Software Implementation
  • Declare variables
  • particle position, velocity, acceleration
  • Particle2D asteroid
  • Point2D initPos
  • simulation time
  • long int relTime, initTime
  • Initialise known quantities
  • asteroid.pos.x 10.0 asteroid.pos.y 100.0
  • asteroid.vel.x 710.7 asteroid.vel.y 10.7
  • asteroid.acc.x 10.2 asteroid.acc.y 40.0

10
Software Implementation
  • Update simulation state (in simulation loop)
  • alternative 1 direct application of position
    update formula
  • relTime readComputerTime() - initTime
  • asteroid.pos.x initPos.x asteroid.vel.x
    relTime asteroid.acc.x relTime relTime / 2
  • asteroid.pos.y initPos.y asteroid.vel.y
    relTime asteroid.acc.y relTime relTime / 2

11
Software Implementation
  • Update simulation state (ctd.)
  • alternative 2 for fixed time step
  • multiplier for acceleration term is constant
    (hence better calculated outside simulation loop)
  • float accMCoef timeStep timeStep / 2

12
Software Implementation
  • Update simulation state alternative 2 (ctd.)
  • at each simulation clock tick
  • update velocity
  • asteroid.vel.x asteroid.acc.x timeStep
  • asteroid.vel.y asteroid.acc.y timeStep
  • update position
  • asteroid.pos.x asteroid.vel.x timeStep
    asteroid.acc.x accMCoef
  • asteroid.pos.y asteroid.vel.y timeStep
    asteroid.acc.y accMCoef

Only addition required if timeStep 1
13
Software Implementation
  • Food for thought
  • Pros and cons of alternatives 1 and 2

14
Suggested Reading
  • Relevant parts of Ch. 2, D.M. Bourg, Physics for
    Game Developers, OReilly Associates, 2002.

15
Summary
  • Constant net external force, hence
  • motion at constant acceleration
  • equation of translational motion
  • velocity update step proportional to time
    interval
  • proportionality factor acceleration
  • position update step has two components
  • component proportional to time interval
    (proportionality factor initial velocity)
  • component proportional to square of time interval
    (proportionality factor half of acceleration)

16
Summary
  • Problem solving procedure
  • same steps as for constant velocity motion
  • but different motion formulas
  • Software implementation
  • same as for constant velocity motion
  • but data structures extension required to cater
    for acceleration
  • repeatedly update simulation state (position and
    (possibly) velocity)
Write a Comment
User Comments (0)
About PowerShow.com