# Connexions

You are here: Home » Content » Brief Trigonometry Tutorial for Blind Students

### Recently Viewed

This feature requires Javascript to be enabled.

### Tags

(What is a tag?)

These tags come from the endorsement, affiliation, and other lenses that include this content.

# Brief Trigonometry Tutorial for Blind Students

Module by: R.G. (Dick) Baldwin. E-mail the author

Summary: Many of the computational requirements for an introductory physics course involve trigonometry. This module provides a brief tutorial on trigonometry fundamentals that is designed to be accessible to blind students.

Note: You are viewing an old version of this document. The latest version is available here.

## Preface

### General

This module is part of a collection (see http://cnx.org/content/col11294/latest/ ) of modules designed to make physics concepts accessible to blind students. The collection is intended to supplement but not to replace the textbook in an introductory course in high school or college physics.

Many of the computational requirements for an introductory physics course involve trigonometry. This module provides a brief tutorial on trigonometry fundamentals that is designed to be accessible to blind students.

### Prerequisites

In addition to an Internet connection and a browser, you will need the following tools (as a minimum) to work through the exercises in these modules:

The minimum prerequisites for understanding the material in these modules include:

### Viewing tip

I recommend that you open another copy of this document in a separate browser window and use the following links to easily find and view the figures and listings while you are reading about them.

### Supplemental material

I recommend that you also study the other lessons in my extensive collection of online programming tutorials. You will find a consolidated index at www.DickBaldwin.com .

## General background information

Many of the computational requirements for an introductory physics course involve trigonometry. This module provides a brief tutorial on trigonometry fundamentals that is designed to be accessible to blind students.

Sine, cosine, and tangent

There are many topics, such as identities, that are covered in an introductory trigonometry course that won't be covered in this module. Instead, this module will concentrate mainly on performing computations on right angles using the sine, cosine, and tangent of an angle.

## Discussion

Graph board and protractor

You will need your graph board and your protractor to perform the exercises in this module. Please prepare your graph board with perpendicular horizontal and vertical axes with the origin located near the center of the graph board.

The most common unit of angular measurement used by the general public is the degree. As you are hopefully aware, there are 360 degrees in a circle.

The most common unit of angular measurement used by scientists and engineers is the radian.

(If you would like more background on radians, go to http://www.clarku.edu/~djoyce/trig/ .)

You may or may not be aware that one radian is equal to approximately 57.3 degrees. It is easier to remember, however, that 180 degrees is equal to PI radians where PI is the mathematical constant having an approximate value of 3.14159. We will use this latter relationship extensively to convert from degrees to radians and to convert from radians to degrees while working through the exercises in these modules.

An exercise involving degrees and radians

Let's do a short exercise involving degrees and radians. Please create an html file containing the code shown in Listing 1 and open it in your browser.

#### Listing 1: Conversions between radians and degrees.

<!-- File JavaScript01.html -->
<html><body>
<script language="JavaScript1.3">

return degrees*Math.PI/180
//============================================//

}//end function toDegrees
//============================================//

var degrees = 90
document.write("degrees = " + degrees +
" : degrees = " + degrees + "</br>")

" : degrees = " + degrees)

</script>
</body></html>


Output for script in Listing 1

When you open the file in your browser, the text shown in Figure 1 should be displayed in the browser window.

Figure 1: Output for script in Listing 1.
Output for script in Listing 1.
 degrees = 90 : radians = 1.5707963267948965 radians = 1 : degrees = 57.29577951308232 radians = 3.141592653589793 : degrees = 180

Because it will frequently be necessary for us to convert between degrees and radians, I decided to write two functions that we will use to make those conversions. That will eliminate the need for us to stop and think about the conversion (and possibly get it backwards) when writing code. We will simply call the function that performs the conversion in the required direction.

The toRadians function expects to receive an input parameter describing an angle in degrees and returns the value for that same angle in radians.

The toDegrees function expects to receive an input parameter describing an angle in radians and returns the value for that same angle in degrees.

Global variables named degrees and radians

The code in Listing 1 begins by declaring global variables named degrees and radians . The variable named degrees is initialized to 90 degrees.

The toRadians function is called to convert that value of degrees to radians. The returned value in radians is stored in the variable named radians .

Display contents of both variables

Then the document.write method is called to display the values contained in both variables, producing the first line of output text shown in Figure 1 .

Modify variable contents, convert, and display again

Following that, a value of 1 is assigned to the variable named radians . The toDegrees function is called to convert that value to degrees, and the result is stored in the variable named degrees .

Once again, the document.write method is called to display the current contents of both variables, producing the second line of output text shown in Figure 1 .

One more time

Finally, the mathematical constant, PI, is stored in the variable named radians . Then that value is converted to degrees and stored in the variable named degrees . The current values in both variables are displayed, producing the last line of output text shown in Figure 1.

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 be particularly useful when we write scripts that use JavaScript's built-in trigonometric methods. Those methods deal with angles almost exclusively in radians while we tend to think of angles in degrees. We will use these two functions to perform conversions between degrees and radians when required.

### Sine, cosine, and tangent

An exercise involving a right triangle

For the next exercise, I would like for you to create a right triangle on your graph board by placing pushpins at the follow coordinates:

• The origin
• x=3, y=0
• x=3, y=4

The vertices of a right triangle

Each pushpin represents a vertex of a right triangle. If you enclose all three pushpins with a rubber band, you will have "drawn" a right triangle with its base on the horizontal axis.

One side of the triangle will have a length of three units. Another side of the right triangle will have a length of four units. The hypotenuse of the right 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 horizontal axis. 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 some names for the three sides of the right triangle when located on the graph board 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 .

The length of the hypotenuse

Now that you have your right triangle on the graph board and you know the lengths of the adjacent and opposite sides, do you remember how to calculate the length of the hypotenuse?

The Pythagorean theorem

Hopefully you learned somewhere along the way that for a right triangle, the square of the hypotenuse is equal to the sum of the squares of the two other sides. 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.)

The square of the adjacent side is 9. The square of the opposite side is 16. The sum of the squares is 25, and the square root of 25 is 5. Thus, the length of the hypotenuse is 5.

A 3-4-5 triangle

You have created a rather unique triangle. You have created a right triangle in which the sides are either equal to, or proportional to the integer values 3, 4, and 5.

I chose this triangle on purpose for its simplicity. We will use it to investigate some aspects of trigonometry.

#### The sine and arcsine of an angle

You will often hear people talk about the sine of an angle or the cosine of an angle. Just what is the sine of an angle anyway?

Although the sine of an angle is based on very specific geometric considerations involving circles (see http://www.clarku.edu/~djoyce/trig/ ), for our purposes, the sine of an angle is simply a ratio between the lengths of two different sides of a right triangle.

A ratio of two sides

For our purposes, we will say that the sine of an angle is equal to the ratio of the opposite side and the hypotenuse. Therefore, in the case of the 3-4-5 triangle that you have on your graph board, the sine of the angle at the origin is equal to 4/5 or 0.8.

If we know the lengths of the hypotenuse and the opposite side, we can compute the sine and use it for other purposes later without having to know the value of the angle.

Conversely, if we know the value of the angle but don't know the lengths of the hypotenuse and/or the opposite side, we can obtain the sine value using a scientific calculator or lookup table and use it for other purposes later.

The arcsine (inverse sine) of an angle

The arcsine of an angle is the value of the angle having a given sine value. In other words, if you know the value of the sine of an unknown angle, you can use a scientific calculator or lookup table to find the value of the angle.

For example, we know that the sine of the angle at the origin on your graph board is 0.8. From that, we can determine the value of the angle. However, we probably can't do this calculation in our heads so we will write a JavaScript script to perform the calculation.

Getting the angle for a known sine value

Please use your protractor to measure and record the angle at the origin on your graph board. Then create an html file containing the code shown in Listing 2 and open it in your browser.

##### Listing 2: Arcsin of 3-4-5 triangle.
<!-- File JavaScript02.html -->
<html><body>
<script language="JavaScript1.3">

return degrees*Math.PI/180
//============================================//

}//end function toDegrees
//============================================//

var opp = 4
var hyp = 5
var ratio = opp/hyp

document.write("degrees = " + angDeg)

</script>
</body></html>


The output for the angle

When you open your html file in your browser, the output shown in Figure 2 should appear in the browser window.

Figure 2: Output for script in Listing 2.
Output for script in Listing 2.
 radians = 0.9272952180016123 degrees = 53.13010235415598 

Did you measure the angle to be 53 degrees with your protractor. If so, congratulations. If not, you should probably take another look at it.

Define conversion functions

The code in Listing 2 begins by defining the functions named toRadians and toDegrees that we developed earlier in Listing 1 . (In this case, we will only need the function named toDegrees so I could have omitted the code for the function named toRadians .)

Declare and initialize variables

Then the code in Listing 2 declares and initializes variables to represent the lengths of the opposite side and the hypotenuse for the triangle on your graph board ( opp and hyp ). Then it computes and saves the ratio of the two. (We learned earlier that the ratio is the value of the sine of the angle at the origin even though we don't know the value of the angle.)

The built-in Math.asin method

JavaScript has a built-in method named Math.asin that receives the sine value for an unknown angle and returns the value of the corresponding angle in radians.

Listing 2 calls the Math.asin method, passing the ratio (sine of the angle) as a parameter, and stores the returned value in a variable named angRad .

Then Listing 2 calls the toDegrees method, passing the value of angRad as a parameter and stores the returned value in a variable named angDeg .

Finally, Listing 2 calls the document.write method twice in success to display the angle values shown in Figure 2 .

Another exercise with a different viewpoint

Now let's approach things from a different viewpoint. Assume that

• You know the value of the angle in degrees.
• You know the length of the hypotenuse.
• You need to find the length of the opposite side.

Assume also that for some reason you can't simply measure the length of the opposite side. Therefore, you must calculate it. This is a common situation in physics, so let's see if we can write a script that will perform that calculation for us.

Please create an html file containing the code shown in Listing 3 and open the file in your browser.

##### Listing 3: Finding length of the opposite side.
<!-- File JavaScript03.html -->
<html><body>
<script language="JavaScript1.3">

return degrees*Math.PI/180
//============================================//

}//end function toDegrees
//============================================//

var hyp = 5
var angDeg = 53.13

var opp = hyp * sine

document.write("opposite = " + opp + "</br>")

hyp = opp/sine

document.write("hypotenuse = " + hyp + "</br>")

</script>
</body></html>


The output for the opposite side

When you open your html file in your browser, the output shown in Figure 3 should appear in your browser window.

Figure 3: Output for script in Listing 3.
Output for script in Listing 3.
  opposite = 3.999994640742543 hypotenuse = 5 

Interesting equations

We learned earlier that the sine of the angle is equal to the ratio of the opposite side and the hypotenuse. We also learned that the angle is the arcsine of that ratio.

If we know any two of those values ( angle , opp , hyp ), we can find the third (with a little algebraic manipulation) as shown in Figure 4 .

Figure 4: Interesting sine equations.
Interesting sine equations.
  sine(angle) = opp/hyp angle = arcsine(opp/hyp) opp = hyp * sine(angle) hyp = opp/sine(angle) 

Getting back to Listing 3

After defining the radian/degree conversion functions, Listing 3 declares and initializes variables representing the length of the hypotenuse and the angle in degrees. (Note that the angle in degrees was truncated to four significant digits, which may introduce a slight inaccuracy into the computations.)

Get and use the sine of the angle

That angle is converted to radians and passed as a parameter to the Math.sin method, which returns the value of the sine of the angle.

The value for the sine of the angle is then used in an algebraic equation to compute the length of the opposite side, which is displayed in Figure 3 . (This equation is one of the equations shown in Figure 4 .)

Looks very close to me

As you can see, the computed value for the opposite side shown in Figure 3 is extremely close to the known value of 4 units.

Re-compute the length of the hypotenuse

After that, the value of the hypotenuse is re-computed (as though it were the unknown in the problem) using the value of the sine and the recently computed value of the opposite side. (Once again, one of the equations from Figure 4 is used to perform the computation.) The output length for the hypotenuse is shown in Figure 3 , and it matches the known value.

Example usage of Math.asin and Math.sin methods

Listing 2 and Listing 3 provide examples of how to use the JavaScript Math.asin and Math.sin methods to find the angle, the opposite side, or the hypotenuse of a right triangle when the other two are known as shown by the equations in Figure 4 .

#### The cosine and arccosine of an angle

You are going to find the discussion in this section to be very similar to the discussion in the previous section on the sine and the arcsine of an angle.

Once again, although the cosine of an angle is based on very specific geometric considerations involving circles (see http://www.clarku.edu/~djoyce/trig/ ), for our purposes, the cosine of an angle is simply a ratio between the lengths of two different sides of a right triangle.

A ratio of two sides

For our purposes, we will say that the cosine of an angle is equal to the ratio of the adjacent side and the hypotenuse. Therefore, in the case of the 3-4-5 triangle that you have on your graph board, the cosine of the angle at the origin is equal to 3/5 or 0.6.

As before, if we know the lengths of the hypotenuse and the adjacent side, we can compute the cosine and use it for other purposes later without knowing the value of the angle.

Conversely, if we know the value of the angle but don't know the lengths of the hypotenuse and/or the adjacent side, we can obtain the cosine value using a scientific calculator or lookup table and use it for other purposes later.

The arccosine (inverse cosine) of an angle

The arccosine of an angle is the value of the angle having a given cosine value. In other words, if you know the value of the cosine of an unknown angle, you can use a scientific calculator or lookup table to find the value of the angle.

For example, we know that the cosine of the angle at the origin on your graph board is 0.6. From that, we can determine the value of the angle (but once again, we probably can't do the arithmetic in our heads).

Getting the angle for a known cosine value

Please create an html file containing the code shown in Listing 4 and open it in your browser.

##### Listing 4: Arccosine of 3-4-5 triangle.
<!-- File JavaScript04.html -->
<html><body>
<script language="JavaScript1.3">

return degrees*Math.PI/180
//============================================//

}//end function toDegrees
//============================================//

var hyp = 5

document.write("degrees = " + angDeg)

</script>
</body></html>


Similar to a previous script

If you examine the code in Listing 4 carefully, you will see that it is very similar to the code in Listing 2 with a couple of exceptions:

• The variable opp having a value of 4 was replaced by the variable adj having a value of 3.
• The call to the Math.asin method was replaced by a call to the Math.acos method.

The output

When you load your html file into your browser, it should produce the output shown earlier in Figure 2 . In other words, we know that the angle at the origin didn't change. What changed was the manner in which we computed the value of that angle.

Different approaches to the same solution

In Listing 2 , we used the length of the hypotenuse and the length of the opposite side, along with the arcsine method to compute the angle.

In Listing 4 , we used the length of the hypotenuse and the length of the adjacent side, along with the arccosine method to compute the angle.

Which approach should you use?

As would be expected, since the angle didn't change, both approaches produced the same result. Deciding which approach to use often depends on the values that are available to use in the computation.

Sometimes you only have the lengths of the hypotenuse and the opposite side available, in which case you could use the arcsine. Sometimes you only have the lengths of the hypotenuse and the adjacent side available, in which case you could use the arccosine. Sometimes you have the lengths of both the opposite side and the adjacent side in addition to the length of the hypotenuse, in which case you can use either approach.

Both approaches use the length of the hypotenuse

It is important to note however that both of these approaches require you to have the length of the hypotenuse. Later in this module we will discuss the tangent and arctangent for an angle, which allows us to work with the opposite side and the adjacent side devoid of the length of the hypotenuse. Of course, if you have the lengths of the opposite side and the adjacent side, you can always find the length of the hypotenuse using the Pythagorean theorem.

Interesting cosine eauations

The equations in Figure 5 are similar to equations in Figure 4 . The difference is that the equations in Figure 4 are based on the use of the sine of the angle and the opposite side whereas the equations in Figure 5 are based on the use of the cosine of the angle and the adjacent side.

As you can see in Figure 5 , if you know any two of the values for angle , adj , and hyp , you can find the other value. This is illustrated in the script shown in Listing 5 , which produces the output shown in Figure 6 .

Figure 5: Interesting cosine equations.
Interesting cosine equations.
  cosine(angle) = adj/hyp angle = arccosine(adj/hyp) adj = hyp * cosine(angle) hyp = adj/cosine(angle)

Finding the length of the adjacent side

The code in Listing 5 is very similar to the code in Listing 2 . The main difference is that Listing 2 is based on the use of the sine of the angle and the length of the opposite side whereas Listing 5 is based on the use of the cosine of the angle and the length of the adjacent side.

##### Listing 5: Finding the length of the adjacent side.
<!-- File JavaScript05.html -->
<html><body>
<script language="JavaScript1.3">

return degrees*Math.PI/180
//============================================//

}//end function toDegrees
//============================================//

var hyp = 5
var angDeg = 53.13

var adj = hyp * cosine

document.write("hypotenuse = " + hyp + "</br>")

</script>
</body></html>


No further explanation needed

Because of the similarity of Listing 5 and Listing 2 , no further explanation of the code in Listing 5 should be needed. As you can see from Figure 6 , the output values match the known lengths for the hypotenuse and the adjacent side for the triangle on your plot board.

Figure 6: Output for script in Listing 5.
Output for script in Listing 5.
  adjacent = 3.0000071456633126 hypotenuse = 5 

Two very important equations

From an introductory physics viewpoint, two of the most important and perhaps most frequently used equations from Figure 4 and Figure 5 are shown in Figure 7 .

Figure 7: Two very important equations.
Two very important equations.
  opp = hyp * sine(angle) adj = hyp * cosine(angle)

These two equations are so important that it might be worth your while to memorize them. Of course, you will occasionally need most of the equations in Figure 4 and Figure 5 , so you should try to remember them, or at least know where to find them when you need them.

Vectors

As you will see later in the module that deals with vectors, you are often presented with something that resembles the hypotenuse of a right triangle whose adjacent side is on the horizontal axis and whose opposite side is parallel to the vertical axis.

The thing that looks like the hypotenuse of a right triangle is called a vector . It has a length and it has a direction. Typically, the direction is stated as the angle between the vector and the horizontal axis. Thus, the direction is analogous to the angle at the origin in the triangle on your graph board.

Horizontal and vertical components

For reasons that I won't explain until we get to that module, you will often be called upon to compute the horizontal and vertical components of the vector. The horizontal component is essentially the adjacent side of our current right triangle. Thus, the value of the horizontal component can be computed using the second equation in Figure 7 .

The vertical component is essentially the opposite side of our current right triangle, and its value can be computed using the first equation in Figure 7 .

#### The tangent and arctangent of an angle

Once again, although the tangent of an angle is based on very specific geometric considerations involving circles (see http://www.clarku.edu/~djoyce/trig/ ), for our purposes, the tangent of an angle is simply a ratio between the lengths of two different sides of a right triangle.

A ratio of two sides

For our purposes, we will say that the tangent of an angle is equal to the ratio of the opposite side and the adjacent side. Therefore, in the case of the 3-4-5 triangle that you have on your graph board, the tangent of the angle at the origin is equal to 4/3 or 1.333.

Not limited to 1.0

Note that the value for the sine and the cosine of an angle is limited to a maximum value of 1.0. However, the tangent of an angle is not so limited. In fact, the tangent of 45 degrees is 1.0 and the tangent of 90 degrees is infinity. This results from the length of the adjacent side, which is the denominator in the ratio, going to zero at 90 degrees.

Dividing by zero in a script is usually not a good thing. This is a pitfall that you must watch out for when working with tangents.

Computing the tangent

If we know the lengths of the opposite side and the adjacent side, we can compute the tangent and use it for other purposes later without having to know the value of the angle.

Conversely, if we know the value of the angle but don't know the lengths of the adjacent side and/or the opposite side, we can obtain the tangent value using a scientific calculator or lookup table and use it for other purposes later.

The arctangent (inverse tangent) of an angle

The arctangent of an angle is the value of the angle having a given tangent value. (For example, as mentioned above, the arctangent of infinity is 90 degrees and the arctangent of 1.0 is 45 degrees.) In other words, if you know the value of the tangent of an unknown angle, you can use a scientific calculator or lookup table to find the value of the angle.

For example, we know that the tangent of the angle at the origin on your graph board is 1.333. From that, we can determine the value of the angle.

Getting the angle for a known tangent value

Please create an html file containing the code shown in Listing 6 and open it in your browser.

##### Listing 6: Arctan of 3-4-5 triangle.
<!-- File JavaScript06.html -->
<html><body>
<script language="JavaScript1.3">

return degrees*Math.PI/180
//============================================//

}//end function toDegrees
//============================================//

var opp = 4

document.write("degrees = " + angDeg)

</script>
</body></html>


The output from the script

Once again, when you open this file in your browser, the output shown in Figure 2 should appear in your browser window.

The code in Listing 6 is very similar to the code in Listing 2 . They both describe the same right triangle and the same angle, so the output should be the same in both cases.

The code in Listing 2 uses the opposite side and the hypotenuse along with the arcsine to compute the angle. The code in Listing 6 uses the opposite side and the adjacent side along with the arctangent to compute the angle. Otherwise, no further explanation should be required.

Interesting tangent equations

In the spirit of Figure 4 and Figure 5 , Figure 8 provides some interesting equations that deal with the angle, the opposite side, and the adjacent side. Given any two, you can find the third using either the tangent or arctangent.

Figure 8: Interesting tangent equations.
Interesting tangent equations.
  tangent(angle) = opp/adj angle = arctangent(opp/adj) opp = tangent(angle) * adj adj = opp/tangent(angle)

An exercise involving the tangent

Please copy the code from Listing 7 into an html file and open it in your browser.

##### Listing 7: Finding the length of the opposite side.
<!-- File JavaScript07.html -->
<html><body>
<script language="JavaScript1.3">

return degrees*Math.PI/180
//============================================//

}//end function toDegrees
//============================================//

var angDeg = 53.13

var opp = adj * tangent

document.write("opposite = " + opp + "</br>")

</script>
</body></html>


When you open your html file in your browser, the output shown in Figure 9 should appear in your browser window. We can see that the values in Figure 9 are correct for our 3-4-5 triangle.

Figure 9: Output for script in Listing 7.
Output for script in Listing 7.
 opposite = 3.9999851132269173 adjacent = 3 

Very similar code

The code in Listing 7 is very similar to the code in Listing 3 and Listing 5 . The essential differences are that

• Listing 3 uses the sine along with the opposite side and the hypotenuse.
• Listing 5 uses the cosine along with the adjacent side and the hypotenuse.
• Listing 7 uses the tangent along with the opposite side and the adjacent side.

You should be able to work through those differences without further explanation from me.

Up to this point, we have dealt exclusively with angles in the range of 0 to 90 degrees (the first quadrant). As long as you stay in the first quadrant, things are relatively straightforward.

As you are probably aware, however, angles can range anywhere from 0 to 360 degrees (or more). Once you begin working with angles that are greater then 90 degrees, things become a little less straightforward.

Another graph board exercise

At this point I would like for you to work through an exercise with me using your graph board in a different way. In particular, we will plot a graph of the amplitude of the sine of an angle on the vertical versus the angle itself on the horizontal.

We will also do the same thing for the cosine. It would be very good if you could plot one curve on the top half of your graph board and the other curve on the bottom half of your graph board so that you can easily compare the two.

Interpreting gridline values

Since I don't know how many tactile grid lines there are on your graph board, I can't tell you exactly how to interpret the grid lines so as to make maximum use of the space on the board. All that I can tell you is that the vertical amplitude values for each curve will range from -1.0 to +1.0. We would like to plot values from -360 degrees to + 360 degrees on the horizontal. You should interpret the values of the gridlines on your graph board accordingly.

Sinusoidal amplitude versus angle

Please copy the code from Listing 8 into an html file and open the file in your browser.

#### Listing 8: Sinusoidal amplitude versus angle.

<;!-- File JavaScriptZZ.html -->
<;html><;body>
<;script language="JavaScript1.3">

return degrees*Math.PI/180
//============================================//

}//end function toDegrees
//============================================//

var angInc = 90
var angStart = -360
var ang = angStart
var angEnd = 360
var sine
var cosine

while(ang <;= angEnd){
//Compute sine and cosine of angle

//Reduce the number of digits in the output
sine = (Math.round(100*sine))/100
cosine = (Math.round(100*cosine))/100

//Display the results
document.write("Angle: " + ang +
" Sine: " + sine +
" Cosine: " + cosine +
"<;/br>")

//Increase the angle for nex iteration
ang = ang + angInc
}//end while loop

<;/script>
<;/body><;/html>


Output from the script

When you open your html file in your browser, the output shown in Figure 10 should appear in your browser window.

Figure 10: Sinusoidal values at 90-degree increments.
Sinusoidal values at 90-degree increments.
 Angle: -360 Sine: 0 Cosine: 1 Angle: -270 Sine: 1 Cosine: 0 Angle: -180 Sine: 0 Cosine: -1 Angle: -90 Sine: -1 Cosine: 0 Angle: 0 Sine: 0 Cosine: 1 Angle: 90 Sine: 1 Cosine: 0 Angle: 180 Sine: 0 Cosine: -1 Angle: 270 Sine: -1 Cosine: 0 Angle: 360 Sine: 0 Cosine: 1 

Figure 10 contains the data for two different curves. One is a sine curve and the other is a cosine curve.

Plot the points using pushpins

You should be able to plots these data values as two separate curves on your graph board by inserting pushpins at the coordinate values shown and then connecting the pushpins with rubber bands, pipe cleaners, yarn, flexible wire, or something similar. (Rubber bands might not work if you are using a homemade plot board constructed from Styrofoam, because the pins pull too easily.)

Remember, the angle values from -360 degrees (-2*PI radians) to +360 degrees (+2*PI radians) are horizontal coordinates while the corresponding values for the sine and cosine are vertical coordinates.

Sawtooth curves

Once you have plotted the points, you should be able to discern two curves, each of which is a sawtooth.

The two curves have exactly the same shape, but one is shifted horizontally relative to the other. For example, the sine curve has a value of zero at an angle of zero (the origin) and it is asymmetric about the vertical axis.

The cosine curve, on the other hand has a value of 1 at an angle of zero and it is symmetric about the vertical axis.

Periodic curves

These are periodic curves. For example, the shape of the sine curve between -360 and 0 is the same as the shape of the sine curve between 0 and +360. Each of those ranges represents one cycle of the periodic curve.

We only computed the values from -360 to +360. However, if we had computed the values from -3600 to + 3600, the overall shape of the curve would not differ from what we have here. The shape of each cycle of the curve would be identical to the shape of the cycle to the left and the cycle to the right.

Not really a sawtooth

The sine and cosine curves don't really have a sawtooth shape. That is an artifact of the fact that we didn't compute enough points to reliably describe the shape of the curves. Let's improve on that.

Modify the script

Modify the code in your script to initialize the value of the variable named angInc to 45 degrees instead of 90 degrees and then load the revised version into your browser. This will cause the script to fill in data points between the points that we already have producing the output shown in Figure 11 .

Figure 11: Sinusoidal values at 45-degree increments.
Sinusoidal values at 45-degree increments.
 Angle: -360 Sine: 0 Cosine: 1 Angle: -315 Sine: 0.71 Cosine: 0.71 Angle: -270 Sine: 1 Cosine: 0 Angle: -225 Sine: 0.71 Cosine: -0.71 Angle: -180 Sine: 0 Cosine: -1 Angle: -135 Sine: -0.71 Cosine: -0.71 Angle: -90 Sine: -1 Cosine: 0 Angle: -45 Sine: -0.71 Cosine: 0.71 Angle: 0 Sine: 0 Cosine: 1 Angle: 45 Sine: 0.71 Cosine: 0.71 Angle: 90 Sine: 1 Cosine: 0 Angle: 135 Sine: 0.71 Cosine: -0.71 Angle: 180 Sine: 0 Cosine: -1 Angle: 225 Sine: -0.71 Cosine: -0.71 Angle: 270 Sine: -1 Cosine: 0 Angle: 315 Sine: -0.71 Cosine: 0.71 Angle: 360 Sine: 0 Cosine: 1 

Plot the new points

Every other line of text in Figure 11 should contain sine and cosine values for angles that are half way between the points that you already have plotted. Use pushpins to plot the new points and connect all of the points in each curve using rubber bands, pipe cleaners, or whatever you find most useful for this purpose.

Same shape but shifted horizontally

The two curves still have the same shape, although shifted horizontally relative to one another and they are still periodic. However, they no longer have a sawtooth shape. They tend to be a little more rounded near the peaks and they are beginning to provide a better representation of the actual shapes of the sine and cosine curves.

Let's do it again

Change the value of the variable named angInc from 45 degrees to 22.5 degrees and load the new version of the html file into your browser. Now the output should look like Figure 12 .

Figure 12: Sinusoidal values at 22.5-degree increments.
Sinusoidal values at 22.5-degree increments.
 Angle: -360 Sine: 0 Cosine: 1 Angle: -337.5 Sine: 0.38 Cosine: 0.92 Angle: -315 Sine: 0.71 Cosine: 0.71 Angle: -292.5 Sine: 0.92 Cosine: 0.38 Angle: -270 Sine: 1 Cosine: 0 Angle: -247.5 Sine: 0.92 Cosine: -0.38 Angle: -225 Sine: 0.71 Cosine: -0.71 Angle: -202.5 Sine: 0.38 Cosine: -0.92 Angle: -180 Sine: 0 Cosine: -1 Angle: -157.5 Sine: -0.38 Cosine: -0.92 Angle: -135 Sine: -0.71 Cosine: -0.71 Angle: -112.5 Sine: -0.92 Cosine: -0.38 Angle: -90 Sine: -1 Cosine: 0 Angle: -67.5 Sine: -0.92 Cosine: 0.38 Angle: -45 Sine: -0.71 Cosine: 0.71 Angle: -22.5 Sine: -0.38 Cosine: 0.92 Angle: 0 Sine: 0 Cosine: 1 Angle: 22.5 Sine: 0.38 Cosine: 0.92 Angle: 45 Sine: 0.71 Cosine: 0.71 Angle: 67.5 Sine: 0.92 Cosine: 0.38 Angle: 90 Sine: 1 Cosine: 0 Angle: 112.5 Sine: 0.92 Cosine: -0.38 Angle: 135 Sine: 0.71 Cosine: -0.71 Angle: 157.5 Sine: 0.38 Cosine: -0.92 Angle: 180 Sine: 0 Cosine: -1 Angle: 202.5 Sine: -0.38 Cosine: -0.92 Angle: 225 Sine: -0.71 Cosine: -0.71 Angle: 247.5 Sine: -0.92 Cosine: -0.38 Angle: 270 Sine: -1 Cosine: 0 Angle: 292.5 Sine: -0.92 Cosine: 0.38 Angle: 315 Sine: -0.71 Cosine: 0.71 Angle: 337.5 Sine: -0.38 Cosine: 0.92 Angle: 360 Sine: 0 Cosine: 1 

A lot of data points

Once again, every other line of text in Figure 12 contains new sine and cosine values for angles that you don't have plotted yet.

Plotting all of these point is going to require a lot of pushpins and a lot of effort. Before you do that, let's think about it.

Two full cycles

You should have been able to discern by now that your plots for the the sine and cosine graphs each contain two full cycles. An important thing about periodic functions is that once you know the shape of the curve for any one cycle, you know the shape of the curve for every cycle from -infinity to infinity. The shape of every cycle is exactly the same as the shape of every other cycle.

Saving pushpins and effort

If you are running out of pins or running out of patience, you might consider updating your plots for only one cycle.

You should be able to discern that your curves no longer have a sawtooth shape. Each time we have run the script, we have sampled the amplitude values of each curve at twice as many points as before. Therefore, the curves should be taking on a smoother rounded shape that is better representation of the actual shape of the curves.

Continue the process

You can continue this process of improving the curves for as long as you have the graph board space, pushpins, and patience to do so. Just divide the value of the variable named angInc by a factor of two and rerun the script. That will produce twice as many data points that are only half as far apart on the horizontal axis.

If you want to do so, you can plot only the new points in one-half of a cycle to get an idea of the shape. Each half of a cycle have the same shape, only one half is above the horizontal axis and the other half is a mirror image below the axis.

Plot of cosine and sine curves

Figure 13 shows a cosine curve plotted above a sine curve very similar to the curves that you have plotted on your graph board.

I know that you can't see the curves

My thinking is that there are at least two things that you can do with these curves.

Grid lines

The image in Figure 13 contains 7 vertical grid lines. The vertical grid line in the center represents an angle of zero degrees. The space between each grid line on either side of the center represents an angle of 90 degrees or PI/2 radians.

There are two horizontal grid lines. One is one-fourth of the way down from the top. The other is one-fourth of the way up from the bottom.

The curves

A cosine curve is plotted with vertical values relative to the top grid line. It extends from -360 degrees on the left to +360 degrees on the right.

A sine curve is plotted with vertical values relative to the bottom grid line. It also extends from -360 degrees on the left to +360 degrees on the right.

Return values for the Math.asin, Math.acos, and Math.atan methods

I told you earlier that the Math.asin method returns a value between -PI/2 and PI/2. However, I didn't tell you that the Math.acos method returns a value between 0 and PI, or that the Math.atan method returns a value between -PI/2 and PI/2. You now have enough information to understand why this is true.

Smooth curves

If you examine the two curves that you have just plotted, you can surmise that the sine and cosine functions are smooth curves whose values range between -1 and +1 inclusive. For every possible value between -1 and +1, there is an angle in the range -PI/2 and PI/2 whose sine value matches that value. There is also an angle in the range 0 and PI whose cosine value matches that value.

(Although you haven't plotted the curve for the tangent, a similar situation holds there also.)

An infinite number of angles

Therefore, given a specific numeric value between -1 and +1, there are an infinite number of angles whose sine and cosine values match that numeric value and the method has no way of distinguishing between them. Therefore, the Math.asin method returns the matching angle that is closest to zero and the Math.acos method returns the matching positive angle that is closest to zero.

What can we learn from this?

One important thing that we can learn is there is no difference between the sine or cosine of an angle and the sine or cosine of a different angle that differs from the original angle by 360 degrees. Thus, the Math.asin and Math.acos methods cannot be used to distinguish between angles that differ by 360 degrees. (As you learned above, the situation involving the Math.asin and Math.acos methods is even more stringent than that.)

One-quarter cycle contains all of the information

Another thing that we can learn is that once you know the shape of the cosine curve from 0 degrees to 90 degrees, you have enough information to construct the entire cosine curve and the entire sine curve across any range of angles. Every possible value or the negative of every possible value that can occur in a sine or cosine curve occurs in the cosine curve between 0 degrees and 90 degrees. Furthermore, the order of those values is also well defined.

You should think about these kinds of relationships. As I mentioned earlier, as long as we are working with angles between 0 and 90 degrees, everything is relatively straightforward. However, once we start working with angles between 90 degrees and 360 degrees (or greater), things become a little less straightforward.

If you have a good picture in your mind of the shape of the two curves between -360 degrees and +360 degrees, you may be able to avoid errors once you start working on physics problems that involve angles outside the range of 0 to 90 degrees.

We often think of a two-dimensional space with horizontal and vertical axes and the orgin at the center in quadrants. Each quadrant is bounded by half the horizontal axis and half the vertical axis.

If you measure the angle between the positive horizontal axis and a line that emanates from the origin, quadrant 1 contains angles between 0 and PI/2, quadrant 2 contains the angles between PI/2 and PI, quadrant 3 contains the angles between PI and 3*PI/2, and quadrant 4 contains the angles between 3*PI/2 and 2*PI (or zero). (Note that I didn't attempt to reconcile the inclusion of each axis in the two quadrants on either side of the axis.)

In any event, it is sometimes useful to consider how the algebraic sign of the sine, cosine, and tangent values varies among the four quadrants. Figure 14 contains a table that shows the sign of the sine, cosine, and tangent values for each of the four quadrants

Figure 14: Algebraic signs versus quadrants.
  1 2 3 4 sine + + - - cosine + - - + tangent + - + -

## Run the scripts

I encourage you to run the scripts that I have presented in this lesson to confirm that you get the same results. Copy the code for each script into a text file with an extension of html. Then open that file in your browser. Experiment with the code, making changes, and observing the results of your changes. Make certain that you can explain why your changes behave as they do.

## Resources

I will publish a module containing consolidated links to resources on my Connexions web page and will update and add to the list as additional modules in this collection are published.

## Miscellaneous

This section contains a variety of miscellaneous information.

### Note:

Housekeeping material
• Module name: Brief Trigonometry Tutorial for Blind Students
• File: Phy1020.htm
• Keywords:
• physics
• accessible
• blind
• graph board
• protractor
• refreshable Braille display
• JavaScript
• trigonometry
• angle
• sine
• cosine
• tangent
• arcsine
• arccosine
• arctangent

### Note:

Disclaimers:

Financial : Although the Connexions site makes it possible for you to download a PDF file for this module at no charge, and also makes it possible for you to purchase a pre-printed version of the PDF file, you should be aware that some of the HTML elements in this module may not translate well into PDF.

I also want you to know that I receive no financial compensation from the Connexions website even if you purchase the PDF version of the module.

Affiliation : I am a professor of Computer Information Technology at Austin Community College in Austin, TX.

-end-

## Content actions

### Give feedback:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

#### Definition of a lens

##### Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

##### What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

##### Who can create a lens?

Any individual member, a community, or a respected organization.

##### What are tags?

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks