References: Wikipedia PHYSICS + VECTORS.  Why physics?  Good for every game developer to know.  Physics formulae are often vector-based  A good chance.

Slides:



Advertisements
Similar presentations
The four kinematic equations which describe an object's motion are:
Advertisements

PHYSICAL SCIENCE MOTION
Projectile Motion with Wind and Air Resistance
5. Using Newton’s Laws. Newton’s Third Law 3 Law of Action and Reaction Forces always occur in equal and opposite pairs A B A acts on B B acts on A.
© 2013 Pearson Education, Inc. Chapter Goal: To learn how to solve problems about motion in a straight line. Chapter 2 Kinematics in One Dimension Slide.
Motion Notes Speed Momentum Acceleration and Force Friction and Air Resistance Newton’s Laws of Motion.
Distance The length an object actually travels. How far you go. Scalar Displacement The change in position of an object. Length between start and finish.
Circular Motion and Other Applications of Newton’s Laws
WHAT IS SPEED? Speed is how fast an object is moving relative to another object. A frame of reference is necessary to calculate speed. Speed depends on.
Motion of mass on a parachute  Falling objects increase their speed as they fall.  This is due to their weight (the force of gravity) that pulls them.
Mrs. Border’s Science Class. Essential question The size of air resistance force depends on what two variables?
Speed Potpourri FrictionForce Acceleration
Motion occurs when an object changes position.
WHAT IS POSITION? LOCATION RELATIVE TO A REFERENCE POINT (FRAME OF REFERENCE)
Game Physics – Part I Dan Fleck Coming up: Rigid Body Dynamics.
Physics 521 Section 2.4 and Chapter 3.  Acceleration is the rate at which the velocity of an object changes.  When the velocity changes ( ) during some.
10 extra topic: Projectile Motion Greg Kelly, Hanford High School, Richland, Washington Photo by Vickie Kelly, 2002 Fort Pulaski, GA.
Forces. Force = A push or a pull Push PuLL What things produce forces? PUSH PULL.
Gravity, Weight and Mass
Game Board Let’s Play Jeopardy Game Board Force and Motion Jeopardy Go to the next slide by clicking mouse. Choose a category and number value clicking.
Kinematics Velocity and Acceleration. Motion Change in position of object in relation to things that are considered stationary Usually earth is considered.
Motion in One Direction Chapter : Displacement and Velocity Main Objectives:  Describe motion in terms of frame of reference, displacement, time,
10.4 Projectile Motion Greg Kelly, Hanford High School, Richland, Washington Photo by Vickie Kelly, 2002 Fort Pulaski, GA.
Laws of Motion Vocab2 8 th grade Science - Fremont.
Falling Objects. All objects, regardless of their mass, fall at 9.8 m/s 2 near the surface of the earth. (This law excludes the effects of air resistance.)
Motion Forces Practice Test. Directions Multiple Choice Section Choose the choice which best completes the following statements or answers the following.
10.4 Projectile Motion Fort Pulaski, GA. One early use of calculus was to study projectile motion. In this section we assume ideal projectile motion:
Chapter 2 Motion in One Dimension. Kinematics Describes motion while ignoring the external agents that might have caused or modified the motion For now,
Motion I Kinematics and Newton’s Laws. Basic Quantities to Describe Motion Space (where are you) Space (where are you) Time (when are you there) Time.
What is Newton’s 2 nd Law?. Force = mass x acceleration (F=ma)
Chapter 12: Forces and Motion
4-4: Everyday Forces Objectives: Explain the difference between mass and weight Find the direction and magnitude of the normal force Describe air resistance.
Forces Types of Forces Effects of Forces Gravity, Mass and Weight Newton’s Laws Freefall.
Types of Motion Topic 4 – Movement Analysis
Physics The study of physical forces and qualities: the scientific study of matter, energy, force, and motion, and the way they relate to each other The.
SPH3U – Unit 2 Gravitational Force Near the Earth.
Chapter 2.2 Objectives and Vocabulary acceleration deceleration Newton's second law Define and calculate acceleration. Explain the relationship between.
Physics the study of the relationship between matter and energy
Physics + Vectors References: xyz. Variable frame rates (review) Two options for handling it: – Option1: Cap frame rates When moving / rotating express.
Chapter 2 Describing Motion: Kinematics in One Dimension.
In chapter 1, we talked about parametric equations. Parametric equations can be used to describe motion that is not a function. If f and g have derivatives.
Force, Motion, Dynamics, and Fluids.  A system of objects that are not moving with respect to one another. Used to determine the motion of an object.
FORCES OF MOTION Georgia Shared Resources. STANDARDS.
Motion I Kinematics and Newton’s Laws Basic Quantities to Describe Motion Motion is about Space (position) and Time (duration) and how we change position.
Kinematics Kinematics is the branch of physics that describes the motion of points, bodies (objects) and systems of bodies (groups of objects) without.
Inertia! Kinematics- Study of motion of objects –How objects move Dynamics- Study of motion of objects WITH FORCES –Why objects move Mass- Amount of Matter.
Trigonometry and Applications References: xyz. Review (?) from ETGG1801 Angles – As a measure of rotation and/or orientation – Radians & Degrees (and.
Chapter 2: Describing Motion in 1-D. Frame of Reference Whether or not you are moving depends on your point-of-view. From inside the box car, the woman.
Force and Motion. Prior Concepts Related to Forces PreK-2 Forces are pushes and pulls that change the motion of an object. Forces are required to change.
Section 2.3 Gravity and Free Fall. Acceleration due to Gravity ► ► An object is in free fall if it is accelerating due to the force of gravity and no.
Topic: Gravity and Motion PSSA: C/S8.C.1.1.
Welcome to Weber Physics Online This power point will help give you a basic start to understanding the laws of physics and it will also list the Utah State.
STAAR Review – Day 4 Speed, Velocity and Acceleration
Physics: Forces and Motion
Gravity and Projectile Motion
Test Review Hand in day Work/power
Kinematics and Newton’s Laws
WHAT IS POSITION?. WHAT IS POSITION? WHAT IS POSITION? LOCATION RELATIVE TO A REFERENCE POINT (FRAME OF REFERENCE)
Section 1 Describing Motion
FORCE and MOTION Unit 1.
9.2 Calculating Acceleration
Basics of Linear Motion
LAW OF FALLING BODIES.
Newton’s 2nd Law Physical science ppt #
Step 1: Get Organized Draw a picture.
Motion and force.
Learn: To be able to distinguish between the different types of AP Problems (Kinematics) Do: Apply Kinematics concepts to practice AP Kinematic Problems.
Speed Velocity Acceleration Freefall
The Nature of Force.
Free Fall October 21, 2015.
Presentation transcript:

References: Wikipedia PHYSICS + VECTORS

 Why physics?  Good for every game developer to know.  Physics formulae are often vector-based  A good chance to try out math3d!  Often thinking "backwards" (from pictures to symbolic algorithms)  To show you how math3d is usable in pygame  Some cherry-picked topics we'll explore:  velocity + acceleration (w/ variable frame-rate)  Newton's laws of motion  Friction  Terminal velocity OVERVIEW

 Suppose you are moving at 50mph for 3 hours. How far are you from your original position?  A: 150 miles  50 * 3  Express this as a graph  We're really calculating the area of this rectangle. VELOCITY AND ACCELERATION Speed (mph) Time (hours) 50 3

 What about (abruptly) changing velocity? VELOCITY AND ACCELERATION, CONT. Speed (mph) Time (hours) 50 3 Q: How far have we travelled after these 5 hours? Q (rephrased): In other words, what is the area of the pink area? A: 0.5*(50x1) + (50x3) + 0.5*(50x1) = 200 miles

 Two options for handling it:  Option1: Cap frame rates  When moving / rotating express in units / update  Bad: Slow machines can't reach the frame-rate  Bad: *Very* painful to modify our fps-cap.  Option2: Let computer run as fast as possible  When moving / rotating express in units / second  The multiply by the time since the last frame  Good: Runs on any speed machine  Bad: Have an extra multiplication VARIABLE FRAME RATES (REVIEW)

 we can approximate the area of this curve using (small) discreet time intervals VELOCITY AND ACCELERATION, CONT. Speed (mph) Time (hours) 50 3 A dT value for one iteration of the game loop. import pygame # … clock = pygame.time.Clock() #... (inside the game loop) dT = clock.tick() /

VELOCITY AND ACCELERATION, CONT.

VELOCITY AND ACCELERATION change in position due to velocity

ACCELERATION

ACCELERATION AND VECTORS, CONT.

 Gravity produces an acceleration on objects  Assuming we're on the earth, it points downwards GRAVITY

 In real life, there's a maximum speed objects can go  Theoretically the speed of light.  On earth, there's wind resistance.  In games, we often impose a terminal velocity  More numerically stable.  More consistent gameplay experience.  A little more like real life.  [Develop the formula] TERMINAL VELOCITY

NEWTON'S LAWS OF MOTION

 Gravity is a force  Proportional to the mass  But…when we apply the force  We divide by the mass (Newton's 2 nd )  So…the acceleration is the same regardless of mass  Unless there is air resistance (drag)  Proved by Gallileo around  In code: 1.Create a Force vector, F 2.Multiply F by mass. 3.Divide F by mass when applying the force 4.Apply acceleration to velocity as normal  (or just skip steps 2 & 3) GRAVITY AS A FORCE

 Friction causes an object to slow down  Air resistance  Contact with ground ……  Implemented as an accleration in the opposite direction of movement  Complication: "flipping direction"  Complication: magnitude (and connection to dt)  [Come up with formula on board] FRICTION