Advertisement

help me understand this

Started by November 13, 2000 02:01 PM
4 comments, last by overlord 24 years, 1 month ago
please, help me understand the mathematical functions sin and cos... are there any documents that i can read to understand them?
It is normally taught early, when you learn trigonomitry(spelling?? how imbarassing). I couldn't tell you the definitions of these functions, because i haven't looked at them for so long, but most people know it. They are used to calculate angles and lengths in a triangle, and is essential for anything concerning...just about anything. I suggest you try a search engine(any will do), and try the word sine or cosine, and i am sure you will find a lot of maths pages which will tell you what you need.

I will show you an example of how it is used...
this methosd only works on 'right angle triangle'(triangles with 90 degrees for on of the sides)
                        /|                   /C|                   /  |                 /   |                /    |             5 /     |              /      | 4             /       |            /        |           /         |          /A_______B_|                3    


This diagram shows a triangle, with the side length 3,4, and 5. The 3 angles are represented with the letters A, B, and C. The use of sine, and cosine(as well as Tangent), is to work out the angle, with the use of two of the lengths of the sides(in this case).

The use of sine(or sin for short), goes like this.

Sin (angle ) = opposite/hypotonuse

Where angle represents(in this case) A, B, or C.

You may be wondering what opposite or hypotonuse mean.
Well in relation to the angle, the side which comes opposite the angle is the opposite .
The side which is the longest of all the tree sides, is the hypotonuse .
And we haven't come across this yet, but the adjacent is the side actually 'touching' the angle you want, but isn't the hypotonuse(sounds confusing, but i'm sure you will get a better explanation from somehwere else). Or the side which isn't the other two to think it simply.

So to work out 'A'

Sin A= opposite/hypotonuse = 4/5

If you rearrange the equation(i hope you have learnt algabra), we get:

A=Sin^-1 (4/5)

You can think of 'sin^-1' as being the oppsoite of 'sin'. If you multiply them both together, they cancell each othe rout, and become 1.
If you type it into your caluculator, you will get the angle of A .(if you want degrees, make sure your calculator is set to dgrees rather than radians)

Knowing how it works for Sine, Cosine is very similar.

Cos (angle ) = adjacent/hypotonuse

Like before if you follow the rules,

cos A = 4/5

Although we are useing the same valuse '4' and '5', the angle is different.


Hope this helps a bit to understand it all. I hope even more that i haven't made a mistake, which might bear with me for the rest of my life.

As i said before, get a proper book, or online help with this, because this is only the tip of the iceberg.

Dong

Edited by - Dong on November 13, 2000 4:37:06 PM

Edited by - Dong on November 13, 2000 4:38:00 PM
Advertisement
It often helps to graph out various equations to understand them. A useful tool for doing this is available free for download from MathCAD 8 Explorer. Although you can''t create a new document you can use all the features with an existing document. The only real problem I have run into is that it processes the page from left to right, top to bottom so if you are doing something in the margins you may pick up something from the original document like a variable or formula. It also performs other useful functions like solving an equation for a variable and simplifying equations.

There do seem to be some bugs in the software. This may just be a problem under Windows 2000, but it screws up my fonts for one. When I use it I generally get a lot of display problems after exiting and end up rebooting. I don''t know if this is a problem with just the demo version, the full package or just on my PC. Since I do have these problems I''ve not made the decision to buy, but free it is well worth the price inspite of the problems I have had with it.
Keys to success: Ability, ambition and opportunity.
Remember this: SOHCAHTOA. SOH is S in is O pposite over H ypotenuse. C osine is A djacent over H ypotenuse. and T angent is O pposite over A djacent.


"We are the music makers, and we are the dreamers of the dreams."
- Willy Wonka

Edited by - BitBlt on November 13, 2000 8:39:34 PM
thanks for the explanation, but, how can i use all that in a 3d engine?... i have seen the examples of d3d and opengl, and every program use it to draw shapes... do i really have to learn it to use it to make a 3d game?
Hey Overloard...
Look. I have done mathematics up to when i was 18. I am not the best at it, but i am competant. Up to the age i was learning it, they taught trig alot, but only basic vectors and matrices. You need a lot of different maths skills tho learn to build a ''3d engine''. It is not as easy as some may think. There are two ways to it. Either put in a lot of your own free time to learn it.(and i mean not just trig, but a lot different stuff as well). Or learn it slowly, and thoroughly at school. You won''t learn any of the maths you need specifically unless you go to a university that specifies in games programming. But all the skills you learn at schools, like algebra, trig, and vectors, will help you learn and understand all there is to know. There is no short cuts through this i am afraid...
Best of luck to you.

Dong

btw, i do computer science and i don''t (and won''t) learn any maths involved in ''3d graphics''. I''ll have to free up some spare time i suppose...

This topic is closed to new replies.

Advertisement