Trigonometry bouncing_ball.py

Slides:



Advertisements
Similar presentations
1 7.2 Right Triangle Trigonometry In this section, we will study the following topics: Evaluating trig functions of acute angles using right triangles.
Advertisements

Trigonometry Review of Pythagorean Theorem Sine, Cosine, & Tangent Functions Laws of Cosines & Sines.
Trigonometric Ratios Consider the triangle given below. 1.The box in the bottom right corner tells us that this is a right triangle. 2.The acute angle.
TRIGONOMETRY Find trigonometric ratios using right triangles Solve problems using trigonometric ratios Sextant.
Where you see the picture below copy the information on the slide into your bound reference.
Notes - Trigonometry *I can solve right triangles in real world situations using sine, cosine and tangent. *I can solve right triangles in real world situations.
Trigonometry functions and Right Triangles First of all, think of a trigonometry function as you would any general function. That is, a value goes in and.
Review of Trig Ratios 1. Review Triangle Key Terms A right triangle is any triangle with a right angle The longest and diagonal side is the hypotenuse.
Vector components and motion. There are many different variables that are important in physics. These variables are either vectors or scalars. What makes.
Holt McDougal Algebra 2 Right-Angle Trigonometry Holt Algebra 2Holt McDougal Algebra 2 How do we understand and use trigonometric relationships of acute.
Geometry Trigonometry. Learning Outcomes I will be able to set up all trigonometric ratios for a right triangle. I will be able to set up all trigonometric.
Introduction to Trigonometry Part 1
Find the missing measures (go in alphabetical order) 60° 30° 10 y z Warm – up 3 45  y 60  30  x 45 
Trigonometric Ratios In Trigonometry, the comparison is between sides of a triangle. Used to find a side of a right triangle given 1 side and 1 acute angle.
Ratios for Right Angle Triangles.  Sine = opposite hypotenuse  Cosine = opposite hypotenuse  Tangent = opposite adjacent Sin = OCos = ATan = O H H.
Introduction to Trigonometry Right Triangle Trigonometry.
TRIGONOMETRY is a branch of Geometry that deals with TRIANGLES Trigonometry can be used to figure out unknown measurements of parts of triangles Why should.
Date: Topic: Trigonometric Ratios (9.5). Sides and Angles x The hypotenuse is always the longest side of the right triangle and is across from the right.
Trigonometry 25-Dec-17.
Vectors and Scalars Physics 1 - L.
TRIG – THE EASY WAY.
Lesson: Introduction to Trigonometry - Sine, Cosine, & Tangent
Tangent Ratio.
TRIGONOMETRY.
A triangle in which one angle is a right angle is called a right triangle. The side opposite the right angle is called the hypotenuse, and the remaining.
Trigonometry Computer Integrated Manufacturing
Right Triangle Trigonometry
Lesson Objectives SWKOL how to use trigonometry to obtain values of sides and angles of right triangles.
Trigonometric Functions
Vectors Vector: a quantity that has both magnitude (size) and direction Examples: displacement, velocity, acceleration Scalar: a quantity that has no.
…there are three trig ratios
Force Vectors Principles of Engineering
Objectives Find the sine, cosine, and tangent of an acute angle.
Vectors- Motion in Two Dimensions
Right Triangle Trigonometry
Right Triangle Trigonometry
Trigonometry (4103).
Right Triangle Trigonometry
Trigonometry Obj: I can to use trigonometry to find unknown sides and unknown angles in a triangle. Trigonometry is concerned with the connection between.
UNIT QUESTION: What patterns can I find in right triangles?
A little pick-me-up.
Trigonometric Ratios A RATIO is a comparison of two numbers. For example; boys to girls cats : dogs right : wrong. In Trigonometry, the comparison.
…there are three trig ratios
Lesson 15: Trigonometric Ratios
Bell Ringer ( 5 mins in notebook)
Trigonometry 23-Nov-18.
Basic Trigonometry.
Trigonometry Review.
Warm Up Solve for each missing side length. x ° 8 x
Force Vectors Principles of Engineering
Right Triangle Trigonometry
Basic Trigonometry.
Test Review.
7-5 and 7-6: Apply Trigonometric Ratios
Lesson: Introduction to Trigonometry - Sine, Cosine, & Tangent
Review of Essential Skills:
Right Triangle 3 Tangent, Sine and Cosine
Warm-up.
Trigonometry Survival Manual
Trigonometry.
Right Triangle Trigonometry
RIGHT OPPOSITE HYPOTENUSE ADJACENT HYPOTENUSE OPPOSITE ADJACENT
Force Vectors Principles of Engineering
Right Triangle Trigonometry
Vectors.
Find the missing measures. Write all answers in radical form.
Right Triangle Trigonometry
Trigonometric Ratios Geometry.
Force Vectors Principles of Engineering
…there are three trig ratios
Presentation transcript:

Trigonometry bouncing_ball.py Computer Science and Software Engineering © 2014 Project Lead The Way, Inc.

Resolving a Vector into Components Animation: Resolving a Vector into Components Presentation Name Course Name Unit # – Lesson #.# – Lesson Name Knowing a little about trig will help you in two ways in this problem. First, it will help figure out how much an object’s x and y coordinates change when the object is moving at an angle. Notice the sine and cosine functions being used in lines 51 and 52.

Animation: Using Radians Presentation Name Course Name Unit # – Lesson #.# – Lesson Name The second place we use trig in the starter code is in lines 61 and 64. It’s not really trig per se, but we are using angles measured in radians and thinking about angles in “standard position”. This is typically taught in math classes alongside trig. The pi in line 61 is actually an angle: it is 180 degrees. The negative 1 in line 64 changes the angle too, because angles in “standard position” can be negative!

c Vectors Vectors = magnitude and direction Scalar vs. Vector Presentation Name Course Name Unit # – Lesson #.# – Lesson Name Vectors = magnitude and direction Scalar vs. Vector Speed vs. Velocity c The animated, moving ball has a speed and a direction. Together, those are called “velocity” in physics. Velocity is a *vector* because it has a direction, while speed is only a *scalar*. A scalar is just a magnitude, an amount, while a vector has both magnitude and direction. In this picture the ball is moving up and to the right on the screen. Its velocity is represented by an arrow, labeled c.

c b q a Vector Components Resolving a vector into components Presentation Name Course Name Unit # – Lesson #.# – Lesson Name Resolving a vector into components c b It is often useful to separate these two parts of the vector. This is called resolving a vector into components. The vector has a rightward component, labeled “a” here. The vector also has an upward component, labeled “b” here. Trig allows you to determine how long a and b are if you know c and the angle theta. Vector a + vector b = vector c. Because vectors have BOTH direction and magnitude, you have to take the direction into account when you add them together. Notice that following vector a to the right and then following vector b up moves the ball to the same place as just following c. Vector “a” is called the x-component of vector c. Vector b is the y-component of vector c. How do we find out how much the ball moves in just the x direction? Or just the y direction? We use right triangle trig. q a

hypotenuse opposite q adjacent Right Triangle Trigonometry Presentation Name Course Name Unit # – Lesson #.# – Lesson Name Hypotenuse and two legs hypotenuse opposite q Looking at this right triangle, we know that the hypotenuse is the longest side, the one that is not part of the right angle. There are two legs to the right triangle, though. We pick one of the acute angles to work with. Here we’ve labeled one angle, measured theta. That’s a Greek letter frequently used to represent angle measurements. The triangle leg that forms that angle theta is the adjacent leg. The opposite leg is across the triangle from theta. adjacent

hypotenuse opposite q adjacent Right Triangle Trigonometry Presentation Name Course Name Unit # – Lesson #.# – Lesson Name sine (sin), cosine (cos), and tangent (tan) SOH-CAH-TOA hypotenuse opposite q There are three primary trig functions: sine, cosine, and tangent, abbreviated with three letters as shown here. They are each a ratio of two side lengths. An acronym SOH-CAH-TOA is useful for remembering what these three ratios are. adjacent

Right Triangle Trigonometry Trigonometry Review Trigonometric Functions sin θ = opp / hyp SOH cos θ = adj / hyp CAH tan θ = opp / adj TOA Hypotenuse (hyp) 90° Opposite Side (opp) Adjacent Side (adj) The sine of an angle is the ratio of the opposite side to the hypotenuse. SOH reminds us of that: sine is opposite over hypotenuse. θ

Applying the Right Triangle Trig sin θ° = vy / v cos θ° = vx / v tan θ° = vy / vx vy= v sin θ° vx= v cos θ° speed = v 90° y component = vy x component = vx Applying this to the ball’s motion, we can figure out the x and y components of the velocity. Vx and vy will tell us how much the x and y coordinates of the ball change per unit of time (per millisecond in our code since after() is using 1 millisecond as its argument). The sin is opposite over hypotenuse. That’s vy over v. To solve for vy, we multiply both sides by v. Then we do the same thing with cosine. These two equations in blue solve our problem! They tell us how much the ball moves in the x and y directions when it is moving at an angle. q

Resolving a Vector into Components Animation: Resolving a Vector into Components Presentation Name Course Name Unit # – Lesson #.# – Lesson Name vx = v cos θ° In line 51, speed_intvar.get() returns the speed of the ball from the Scale’s variable. That’s v in the equation below. We multiply by cosine of the angle to get the x component. The angle is the variable “direction”. So line 51 finds the x component of the ball’s motion, and line 54 change the x-coordinate by that amount. Now practice by explaining how line 52 and line 54 change the ball’s y coordinate. So now you see how we used sin and cos. The sin() and cos() function from the math library require the angle to be measured in radians. This brings us to the second topic. vy = v sin θ°

c b q a Standard Position for an Angle Presentation Name Course Name Unit # – Lesson #.# – Lesson Name Counter clockwise from the positive x axis c b A vector points in a direction. If it points to the right, we call that 0 degrees. Straight up is 90 degrees. Left is 180 degrees. Down is 270 degrees. And 360 degrees is back to pointing to the right. q a

q c Standard Position for an Angle Presentation Name Course Name Unit # – Lesson #.# – Lesson Name Counter clockwise from the positive x axis q c Another unit for measuring angles is the radian. It’s used more than the degree by mathematicians because it makes it makes it easier to find distances along curves.

0.5p ~0.2p? q c p 0 or 2p 1.5p Radians Presentation Name Course Name Unit # – Lesson #.# – Lesson Name 0.5p ~0.2p? q c p 0 or 2p Pi radians is 180 degrees. You can practice with your teacher or a friend. One person calls out pi, 7pi, 6.5 pi, etc., and the other person points in the correct direction with their arm fully extended from their body. This works well as a whole class exercise. 1.5p

0.2p 0.8p q p Applying the Angle Measures Presentation Name Course Name Unit # – Lesson #.# – Lesson Name 0.2p 0.8p q p The ball shown here is bouncing off the left wall. The two directions are shown on the circle. These will always add up to 180 degrees, the same as pi radians. So whatever the ball’s angle is, we subtract the angle from pi to bounce off the left wall. Try a few angles to convince yourself that it also works on the right wall.

1.1p q p -1.1p Applying the Angle Measures Presentation Name Course Name Unit # – Lesson #.# – Lesson Name 1.1p q p When the ball bounces off the bottom wall, the +/- sign of the angle just switches. Try a few angles to convince yourself that this also works for bouncing off the top. -1.1p

What about wrapping? Presentation Name Course Name Unit # – Lesson #.# – Lesson Name What happens to the direction of the ball when it wraps around the screen? What happens to its x coordinate? Its y coordinate?

Animation: Using Radians Presentation Name Course Name Unit # – Lesson #.# – Lesson Name Can you make sense of lines 61 through 64 now? Notice that math.pi is just a number from the math module: 3.1415…