Poll: How hard was it to *learn* SIN COS and TAN?
You do not have permission to vote in this poll.
Easy
100.00%
7 100.00%
Medium
0%
0 0%
Hard
0%
0 0%
Total 7 vote(s) 100%
* You voted for this item. [Show Results]

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sin Cos and Tan (again)
#6
okay, sine/cosine/tangent are all part of a type of math called TRIGONOMETRY (tuh... nitpickers), which is pretty much angles and curves and junk. it's often taught with right triangles because they have special properties.

por ejemple:
[Image: righttri.gif]
your hypotenuse is the long side.
the other two sides are called your legs.

from now on, when we refer to angles, we use cap letters. when referring to sides we use lowercase. i didnt invent this, sorry Tongue

when we say sine of angle A [aka sin(A)] we're referring the leg facing that angle divided by the hypotenuse. or:

sin(A) = a / c (or sin(A) = opp / hyp)

for cosine, we divide the other leg (adjacent) by the hypotenuse:

cos(A) = b / c (cos(A) = adj / hyp)

for tangent, we are basically getting the slope of hypotenuse by saying

tan(A) = a / b (tan(A) = opp / adj)

WHAT THIS MEANS FOR YOU AS AN PROGRAMMER WHO ISNT DOING HEAVY MATHEMATICAL APPLICATIONS OF TRIGONOMETRY:

when you use qb's sin and cos, it basically gives you the length of the opposite and adjacent sides of the triangle if the hypotenenuse is 1. so if i want to say "okay! i want to draw this pixel 10 pixels away 30 degrees from here":

Code:
x = 160 ' coordinate
y = 160

degrees = 30
radians = degrees * pi / 180 'will explain later
length = 10

x2 = cos(radians) * length + x
y2 = sin(radians) * length + y

pset (x2, y2) ' will plot 10 pixels away from center at 30 degrees

obviously, this comes very much in handy when rotating things, or calculating positions, which is why you'll see it so much as a programmer. any time you're dealing with converting angles to coordinates, it'll come in handy as well.

you wont be dealing with this in depth until precalculus in high school, though you will grace the basics in geometry and algebra 2, so it's okay if you dont get all of it. i hope i explained the very, very, very simple basics of trigonometry to you well enough.
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply


Messages In This Thread
Sin Cos and Tan (again) - by Rokkuman - 03-02-2003, 08:41 AM
Sin Cos and Tan (again) - by Agamemnus - 03-02-2003, 09:08 AM
Sin Cos and Tan (again) - by Rokkuman - 03-02-2003, 09:14 AM
Sin Cos and Tan (again) - by Agamemnus - 03-02-2003, 09:19 AM
Sin Cos and Tan (again) - by toonski84 - 03-02-2003, 09:53 AM
"Trigonomics"? Oh boy. Let me guess... - by Glenn - 03-02-2003, 10:11 AM
Sin Cos and Tan (again) - by Rokkuman - 03-02-2003, 11:04 AM
Sin Cos and Tan (again) - by toonski84 - 03-02-2003, 07:10 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)