<< Chapter < Page | Chapter >> Page > |
And the results were...
As you can see from Figure 1 ,
A template
You might want to save your html file as a template for use with future exercises that require conversions between radians and degrees. This will beparticularly useful when we write scripts that use JavaScript's built-in trigonometric methods. Those methods deal with angles almost exclusively inradians while we tend to think of angles in degrees. We will use these two functions to perform conversions between degrees and radians whenrequired.
An exercise involving a right triangle
For the next exercise, I would like for you to use pencil and graph paper to draw a right triangle formed by points at the following coordinates:
The vertices of a right triangle
Each point represents a vertex of a right triangle. If you connect the imaginary points with lines, you will have "drawn" a right triangle withits base on the horizontal axis.
The base of the triangle will have a length of three units. Another side of the triangle will have a length of four units. The hypotenuse of the triangle will have still another length.
The angle at the origin
The base and the hypotenuse will form an angle at the origin opening outward to the right. As mentioned before, the base will be on the horizontalaxis. The side that connects the base and the far end of the hypotenuse will be parallel to the vertical axis.
Names for the three sides of the right triangle
Lets establish some names for the three sides of the right triangle when drawn in this manner.
We will continue to refer to the hypotenuse as the hypotenuse and abbreviate it hyp . We will refer to the base as the adjacent side relative to the angle at the origin and abbreviate it adj . We will refer to the third side as the opposite side relative to the angle at the origin and abbreviate it opp .
Figure 2 shows such a 3-4-5 triangle (which may not be drawn to scale) using the notation given above for the three sides.
(Note that this image, and many of the other images in this collection of physics modules were re-purposed from an earlier set of modules. The lower-casecharacters that you will see scattered throughout the images were needed there but will generally have no meaning in these modules. They should be ignored.)
Figure 2 - A 3-4-5 triangle.
The length of the hypotenuse
Now that you have your right triangle and you know the lengths of the adjacent and opposite sides, do you remember how to calculate thelength of the hypotenuse?
The Pythagorean theorem
Hopefully you know that for a right triangle, the square of the hypotenuse is equal to the sum of the squares of the two othersides. Thus, the length of the hypotenuse is equal to the square root of the sum of the squares of the other two sides.
In this case we can do the arithmetic in our heads to compute the length of the hypotenuse. (I planned it that way.)
Notification Switch
Would you like to follow the 'Game 2302 - mathematical applications for game development' conversation and receive update notifications?