#### Archived

This topic is now archived and is closed to further replies.

# What exactly is Sin, Cosine, and tangent and what are they used for?

This topic is 5932 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I know this may sound very stupid but in all honesty i have no idea what these things are and how and why they are used in games can someone plz enlighten me ty "Those who serve no purpose, have no purpose."- SSC the Super Saiyan Cat Edited By - SonShadowCat on Your Girlfriends Birthday

##### Share on other sites
They are trigonometric functions that you can use to find missing parts of a triangle. So if you have 2 sides of a triangle and one angle, you can figure out the other 2 angles and the other side.

##### Share on other sites
Those are transcendental functions used for relating the various angles and sides of a triangle - aka Trigonometry. For best results consult on online math web site. Sorry, don''t have a link handy, but I''m sure someone else will provide one here soon.

##### Share on other sites
but why are they used in games...
i mean when would you ever need to use this in a game, ive seen cos being used for wavy effects(nehe tuts) but wouldnt you know everything you need to know about the triangles you created

"Those who serve no purpose, have no purpose."- SSC the Super Saiyan Cat

##### Share on other sites
I tend to find them most useful when dealing with a game that involves a player or object like the ship in asteroids. The ship has some angle "a" expressed in radians. But when you accelerate, you need to know how much velocity to add to the x and y components of the velocity. That''s where sin and cos come in.

dx=dx + cos(a)dy=dy - sin(a)

(I use "-sin" instead of "+sin" because computers'' coordinate systems are upside-down compared to mathematical coordinate systems.)

It''s also handy in drawing a circle
begin loop a from 0 to pi*2 (in small steps)   draw point at (CenterX + cos(a) * radius,                  CenterY - sin(a) * radius)Next a

"All you need to do to learn circular logic is learn circular logic"

##### Share on other sites
This site may be able to help you. It explains most of the trigonometric functions you need.

##### Share on other sites
that site lost me on the fourth of fifth page ><

this paragraph especially confused me:

The other common measurement for angles is radians. For this measurement, consider the unit circle (a circle of radius 1) whose center is the vertex of the angle in question. Then the angle cuts off an arc of the circle, and the length of that arc is the radian measure of the angle. It is easy to convert between degree measurement and radian measurement. The circumference of the entire circle is 2 ( is about 3.14159), so it follows that 360° equals 2 radians. Hence, 1° equals /180 radians, and 1 radian equals 180/ degrees.

what in blazes is this dude talking about?

"Those who serve no purpose, have no purpose."- SSC the Super Saiyan Cat

##### Share on other sites
Wait until your high school trig course. This will all be understandable then.

If you don''t know why you need cosine, chances are you aren''t doing anything that requires it.

##### Share on other sites
well in the nehe tuts ive seen sin and cos and i would like to know what they are for and when and how to use them

i mean isnt trigonometry just for triangles???

"Those who serve no purpose, have no purpose."- SSC the Super Saiyan Cat

##### Share on other sites
what is meant by an arc of a circle and arc length?
maybe if i knew these things i would be better able to understand the site that was given

"Those who serve no purpose, have no purpose."- SSC the Super Saiyan Cat

• 9
• 13
• 41
• 15
• 14