<< Chapter < Page Chapter >> Page >

And the results were...

As you can see from Figure 1 ,

  • Ninety degrees is equal to 1.57 radians
  • One radian is equal to 57.296 degrees
  • 3.14 (PI) radians is equal to 180 degrees

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.

Sine, cosine, and tangent

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 origin
  • x=3, y=0
  • x=3, y=4

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.

Missing image

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.)

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Game 2302 - mathematical applications for game development. OpenStax CNX. Jan 09, 2016 Download for free at https://legacy.cnx.org/content/col11450/1.33
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Game 2302 - mathematical applications for game development' conversation and receive update notifications?

Ask