What is Inverse Cosine Wave?
Inverse cosine is also known as arccosine. It is reciprocal of the Cosine wave. Cosine inverse of the same ratio will give the measure of the angle, y= cos -1(x) <=> cos y = x. Here, the cosine function is equal to the Adjacent side divided by the hypotenuse, and Each range value between -1 to 1 is within the limited domain (0,180).
θ = Cos -1(Adjacent side/hypotenuse)
The Inverse Cosine graph, and their degree:
y | 0 | π/6 | π/3 | π/2 | 2π/3 | 5π/6 | π |
---|---|---|---|---|---|---|---|
x=cos-1 y | 1 | √3/2 | √1/2 | 0 | -√1/2 | -√3/2 | -1 |
Cos inverse Waveform:
Example 2: Inverse Cosine
In this example, we will import the required module and set the coordination, after that we will draw vertical and horizontal lines to draw our Inverse cosine wave.
Python3
import math import turtle win = turtle.Screen() win.bgcolor( "white" ) # coordinate setting win.setworldcoordinates( - 1 , - 180 , 1 , 180 ) t = turtle.Turtle() # Draw a Horizontal line t.goto( 1 , 0 ) t.goto( - 1 , 0 ) t.penup() t.goto( 0 , 0 ) t.pendown() # Draw a vertical line t.goto( 0 , 180 ) t.goto( 0 , - 180 ) t.penup() t.goto( 1 , 0 ) t.pendown() t.pencolor( "blue" ) t.pensize( 4 ) # Generate wave form for y in range ( 0 , 180 ): x = math.cos(math.radians(y)) t.goto(x, y) |
Output: