If you look at a right angled triangle, if you look at the corner with the red dot, you can name the sides of the triangle as the side opposite the angle, the side adjacent (next to) the angle, and the hypotenuse (the long side). The sine and cosine are defined as the ratios of the different sides, as shown on the project. As you change the triangle, the sides change and so do the ratios. That's all there is to it!
Your idea of a tutorial of trig applications is a good one. I think Archmage actually did something like that on the forum...if I can find it I will send you the link.
Lazy? Actually, it's because there is limited space on the screen and Sin and Cos are used so much more by games programmers. I figured if people could figure out Sin and Cos then Tan wouldn't present much of a problem.
law of cosines is: a^2=b^2+c^2-2bc(cosA)
it is also: b^2=a^2+c^2-2ac(cosB)
and: c^2=a^2+b^2-2ab(cosC)
The rules for law of cosines are: SSS SAS and most others, law of sines is: ASA and SSA
SOHCAHTOA!!!!!!!!!!!!! another few ways to do this are the law of sines and the law of cosines. Law of sines is sin(A)/a=sin(B)/b, if A and B are angles and a and b are the sides opposite. The same applies for C and c.
I'm not even sure I know what you are asking! A 2 player scroller that can move in both X and Y? How would you keep both players on the screen, zoom in and out? At this point I haven't done anything with 2 players, sorry.
Not exactly...just well educated. I'm trying to come up with a project to explain what the Sin and Cos functions are and why they are handy for programmers.
Explore the Sine and Cosine trigonometric functions of a right triangle. As you drag the dots around, the triangle will change and show you the new lengths of it's sides as well as the angle at the RED dot corner. The sine (Sin) and cosine (Cos) of the angle at the RED dot corner are also calculated.
Hopefully from this diagram, you can see how the Sin and Cos functions are useful for solving for the length of the sides of a right triangle if you have the Hypotenuse and the angle:
Adacent = Hypotenuse * Cosine of Angle
Opposite = Hypotenuse * Sine of Angle
These functions are very handy to programmers who are trying to calculate the X and Y coordinates of a point positioned at a known angle and distance from another point.
Comments
You need to be logged in to post comments
Add a Comment
Uh... Can someone explain this to a fourth grader?
If you look at a right angled triangle, if you look at the corner with the red dot, you can name the sides of the triangle as the side opposite the angle, the side adjacent (next to) the angle, and the hypotenuse (the long side). The sine and cosine are defined as the ratios of the different sides, as shown on the project. As you change the triangle, the sides change and so do the ratios. That's all there is to it!
Wow
Thank you so much, this helps a lot!
:) i made a trig tutorial...it was a little differant than this but similer.
Great minds think alike...again!
(view all replies)I just learned basic trig. And why didn't you include tangent?
Here's all I could find...maybe it will be helpful (link to forums)
Your idea of a tutorial of trig applications is a good one. I think Archmage actually did something like that on the forum...if I can find it I will send you the link.
(view all replies)Lazy? Actually, it's because there is limited space on the screen and Sin and Cos are used so much more by games programmers. I figured if people could figure out Sin and Cos then Tan wouldn't present much of a problem.
(view all replies)I love the way "hypotenuse" stays on the line...this is SINfully awesome **tee-hee**!
Funny! You're COSing me to chuckle!
what a cool sim!
law of cosines is: a^2=b^2+c^2-2bc(cosA) it is also: b^2=a^2+c^2-2ac(cosB) and: c^2=a^2+b^2-2ab(cosC) The rules for law of cosines are: SSS SAS and most others, law of sines is: ASA and SSA
SOHCAHTOA!!!!!!!!!!!!! another few ways to do this are the law of sines and the law of cosines. Law of sines is sin(A)/a=sin(B)/b, if A and B are angles and a and b are the sides opposite. The same applies for C and c.
here's a tutorial for how to program 2 player scrollers if anyone wants to know (link to project)
Hey paddle2seefixit do you know how to make x/y 2 players scrollers.
It sounds like an interesting challenge. You must have a game idea in mind...
(view all replies)I'm not even sure I know what you are asking! A 2 player scroller that can move in both X and Y? How would you keep both players on the screen, zoom in and out? At this point I haven't done anything with 2 players, sorry.
(view all replies)Yeah.......I knew that....
Too bad you can't format your output in the SAY blocks...all those decimal places are distracting.
Perhaps you should try rounding with the decimals. :)
(view all replies)Wow, you must be like a super genius or something.....
Not exactly...just well educated. I'm trying to come up with a project to explain what the Sin and Cos functions are and why they are handy for programmers.