Upload
ram-kishor
View
213
Download
0
Embed Size (px)
DESCRIPTION
PPT ON TRIGNOMETRY
Citation preview
*Trigonometry
Instant TrigTrigonometry is math, so many people find it scaryIts usually taught in a one-semester high-school courseHowever, 95% of all the trig youll ever need to know can be covered in 15 minutesAnd thats what were going to do now
Angles add to 180The angles of a triangle always add up to 180
Right trianglesWe only care about right trianglesA right triangle is one in which one of the angles is 90Heres a right triangle:We call the longest side the hypotenuseWe pick one of the other angles--not the right angleWe name the other two sides relative to that angleHeres theright anglehypotenuseadjacentopposite
The Pythagorean TheoremIf you square the length of the two shorter sides and add them, you get the square of the length of the hypotenuse adj2 + opp2 = hyp232 + 42 = 52, or 9 + 16 = 25 hyp = sqrt(adj2 + opp2)5 = sqrt(9 + 16)
5-12-13There are few triangles with integer sides that satisfy the Pythagorean formula3-4-5 and its multiples (6-8-10, etc.) are the best known5-12-13 and its multiples form another set25 + 144 = 169
RatiosSince a triangle has three sides, there are six ways to divide the lengths of the sidesEach of these six ratios has a name (and an abbreviation)Three ratios are most used:sine = sin = opp / hypcosine = cos = adj / hyptangent = tan = opp / adjThe other three ratios are redundant with these and can be ignoredThe ratios depend on the shape of the triangle (the angles) but not on the size
Using the ratiosWith these functions, if you know an angle (in addition to the right angle) and the length of a side, you can compute all other angles and lengths of sidesIf you know the angle marked in red (call it A) and you know the length of the adjacent side, thentan A = opp / adj, so length of opposite side is given by opp = adj * tan Acos A = adj / hyp, so length of hypotenuse is given by hyp = adj / cos A
Java methods in java.lang.Mathpublic static double sin(double a)If a is zero, the result is zeropublic static double cos(double a)public static double sin(double a)If a is zero, the result is zero However: The angle a must be measured in radiansFortunately, Java has these additional methods: public static double toRadians(double degrees)public static double toDegrees(double radians)
The hard partIf you understood this lecture, youre in great shape for doing all kinds of things with basic graphicsHeres the part Ive always found the hardest:Memorizing the names of the ratios sin = opp / hypcos = adj / hyptan = opp / adj
Mnemonics from wikiquoteThe formulas for right-triangle trigonometric functions are:Sine = Opposite / HypotenuseCosine = Adjacent / HypotenuseTangent = Opposite / AdjacentMnemonics for those formulas are:Some Old Horse Caught Another Horse Taking Oats AwaySaints On High Can Always Have Tea Or Alcohol
You are at: (x, y)You want to move h units in the angle direction, to (x1, y1):So you make a right triangle...And you label it...And you compute: x1 = x + adj = x + hyp * (adj/hyp) = x + hyp * cos y1 = y - opp = y - hyp * (opp/hyp) = y - hyp * sin
This is the first point in your Turtle triangleFind the other points similarly...Drawing a Turtle
The End
*************