Code examples Mechanics: random balls Biology/evolution: flocking Game of tag.

Slides:



Advertisements
Similar presentations
Motion in 2 Dimensions Projectile Motion
Advertisements

Trigonometry Right Angled Triangle. Hypotenuse [H]
1 Special Angle Values. 2 Directions A slide will appear showing a trig function with a special angle. Work out the answer Hit the down arrow to check.
1 Special Angle Values. 2 Directions A slide will appear showing a trig function with a special angle. Work out the answer Hit the down arrow to check.
TRIGONOMETRY. Sign for sin , cos  and tan  Quadrant I 0° <  < 90° Quadrant II 90 ° <  < 180° Quadrant III 180° <  < 270° Quadrant IV 270 ° < 
Physics 218, Lecture V1 Physics 218 Lecture 5 Dr. David Toback.
Chapter 5 Introduction to Trigonometry: 5
Trigonometry Chapters Theorem.
Trigonometry (RIGHT TRIANGLES).
Physics Chapter 4: Forces and the Laws of Motion
Fundamental Concepts and Principles
Chapter 3 Kinematics in Two Dimensions
Unit 5 in four lessons Speed and Motion.
Review Displacement Average Velocity Average Acceleration
Method #2: Resolution into Components. Solving Vector Problems using the Component Method  Each vector is replaced by two perpendicular vectors called.
Trigonometry and Vectors Applied to 2D Kinematics Teacher Excellence Workshop June 19, 2009.
Physics Lesson 5 Two Dimensional Motion and Vectors Eleanor Roosevelt High School Mr. Chin-Sung Lin.
PHYSICS: Vectors and Projectile Motion. Today’s Goals Students will: 1.Be able to describe the difference between a vector and a scalar. 2.Be able to.
Scalar Quantities A scalar quantity (measurement) is one that can be described with a single number (including units) giving its size or magnitude Examples:
 To add vectors you place the base of the second vector on the tip of the first vector  You make a path out of the arrows like you’re drawing a treasure.
Physics Kinematics in 2-D and Vectors 3.1 Vectors and Scalars 3.2 Addition of Vectors - Graphically 3.3 Subtraction and Scalar Multiplication.
VectorsVectors. What is a vector quantity? Vectors Vectors are quantities that possess magnitude and direction. »Force »Velocity »Acceleration.
Chapter 3 – Two Dimensional Motion and Vectors
Kinematics and Dynamics
Vector Basics. OBJECTIVES CONTENT OBJECTIVE: TSWBAT read and discuss in groups the meanings and differences between Vectors and Scalars LANGUAGE OBJECTIVE:
Trigonometry Primer. What is Trigonometry  Trig deals with triangles. Usu. right triangles.  Why is trig useful in physics? Because many kinds of motion.
Chapter 3 Projectile Motion. What does this quote mean? “Pictures are worth a thousand words.”
Trig Review: PRE-AP Trigonometry Review Remember right triangles? hypotenuse θ Opposite side Adjacent side Triangles with a 90º angle.
Ch 3 – Two-Dimensional Motion and Vectors. Scalars vs. Vectors ► Scalar – a measurement that has a magnitude (value or number) only  Ex: # of students,
Physics 101: Lecture 3, Pg 1 Lecture 3: Introduction to Physics 101 Chapter 1 : Scalars and Vectors (1.5) Chapter 2: Distance and Displacement, Speed and.
Projectile Motion. Vectors and Scalars A Vector is a measurement that has both a magnitude and a direction. Ex. Velocity, Force, Pressure, Weight A Scalar.
Applications of Coulomb’s Law Physics 12. Joke of the day/clip of the day:  Minute physics again! 
TRIGONOMETRY BASIC TRIANGLE STUDY: RATIOS: -SINE -COSINE -TANGENT -ANGLES / SIDES SINE LAW: AREA OF A TRIANGLE: - GENERAL -TRIGONOMETRY -HERO’S.
Physics: Problem Solving Chapter 4 Vectors. Physics: Problem Solving Chapter 4 Vectors.
VECTORS. Vectors A person walks 5 meters South, then 6 meters West. How far did he walk?
Vectors. A vector is a quantity and direction of a variable, such as; displacement, velocity, acceleration and force. A vector is represented graphically.
Kinematics in Two Dimensions. Section 1: Adding Vectors Graphically.
Two Dimensional Motion. Vector Diagrams Depict the motion of an object using vectors. Depict the motion of an object using vectors. –Remember all vectors.
Physics VECTORS AND PROJECTILE MOTION
Vectors Chapter 4. Vectors and Scalars  Measured quantities can be of two types  Scalar quantities: only require magnitude (and proper unit) for description.
Pythagorean Theorem What is it and how does it work? a 2 + b 2 = c 2.
6.3 Vectors in a Plane (part 3) I. Using Angled Vectors (put calculator in degree mode). A) The vector must be in Component form (standard position) B)
Vectors.
Motion in Two Dimensions
CP Vector Components Scalars and Vectors A quantity is something that you measure. Scalar quantities have only size, or amounts. Ex: mass, temperature,
Mathematical Vector Addition. Mathematical Addition of Vectors The process of adding vectors can be accurately done using basic trigonometry. If you.
Advanced Physics Chapter 3 Kinematics in Two Dimensions; Vectors.
Vectors Physics Book Sections Two Types of Quantities SCALAR Number with Units (MAGNITUDE or size) Quantities such as time, mass, temperature.
Resolution and Composition of Vectors. Working with Vectors Mathematically Given a single vector, you may need to break it down into its x and y components.
End-of-the-Year Project Vectors and Forces in Two Dimensions.
Trigonometry Chapters Theorem.
(1) Sin, Cos or Tan? x 7 35 o S H O C H A T A O Answer: Tan You know the adjacent and want the opposite.
Forces Chapter 12, Section 1. Forces Force – a push or a pull that acts on an object Force – a push or a pull that acts on an object A force can cause.
Vectors Vectors or Scalars ?  What is a scalar?  A physical quantity with magnitude ONLY  Examples: time, temperature, mass, distance, speed  What.
8.5 Vectors!. So, this is a conversation I’m anticipating: You: What in the world is a vector, Ms T? Me: I’m glad you asked. Me: A vector is any quantity.
Force is a vector quantity Its units are newton's N
Basic Trigonometry We will be covering Trigonometry only as it pertains to the right triangle: Basic Trig functions:  Hypotenuse (H) Opposite (O) Adjacent.
Triquarterly Review.
Vectors.
Introduction to Vectors
Vectors and Scalars Chapter 2.
Physics VECTORS AND PROJECTILE MOTION
Enduring Understanding: Modeling is widely used to represent physical and kinematic information. Essential Question: What are the practical applications.
Find the velocity of a particle with the given position function
Forces in Two Dimensions
Vectors.
Physics VECTORS AND PROJECTILE MOTION
Vectors.
Introduction to Vectors
Vector Resolution and Projectile Motion
Presentation transcript:

Code examples Mechanics: random balls Biology/evolution: flocking Game of tag

Intro to bodies interactions The attraction between two bodies is given by F= g*m 1 *m 2 /r 2 Where F is force, g is the gravitational constant [aka fudge factor], ms are masses for bodies one and two and r is the distance between them.

r the distance between two bodies Using the Pythagorean theorem we can find the distance between two points x hypotenuse = r y a 2 + b 2 = c 2 Hence, x 2 + y 2 = r 2 Point 1 Point 2

Trigonometry review cos = x sin = y tan = y/x atan y/x = y x

mmm vectors…. We need to separate the x and y directions of the force. is the angle So F, the force arrow has an x and y part. F x = (cos ) * F F y = (sin ) * F Mass 1 at center Mass 2 out there y x F

Put it all together Lets ignore m 2 [its very very very small], then F= g*m 1 *m 2 /r 2, becomes F = g*m/r 2 But, r 2 = x 2 + y 2, so F = g*m/(x 2 + y 2 ) But, F x = (cos )*F, so F x = (cos )*g*m/(x 2 + y 2 ) Similarly, F y = (sin )*g*m/(x 2 + y 2 )

How does the computer know what's what? x is x and y is y But the computer does not know what is. atan y/x = y x

Using atan y/x = Remember, F x = (cos )*g*m/(x 2 + y 2 ) And,F y = (sin )*g*m/(x 2 + y 2 ) So, F x = (cos [atan y/x])*g*m/(x 2 + y 2 ) And, F y = (sin [atan y/x])*g*m/(x 2 + y 2 )

What does force do? If you hit a tether ball then you are the force and the ball then has a velocity as it flies through the air. Hence we need velocity terms for our bodies: V V x = V x + F x V y = V y + F y The velocity gets added to it self just like with a tether ball: the new velocity adds its old velocity to the new force of hitting it again.

Next step translate into code