con & sin
Could someone refresh my memory on what con and sin are used for in mathematical terms?
if you loop from 0 to pi*2, you can draw a circle by plotting points at sin(x),cos(y).
You use them to rotate objects around a point mostly.
E:cb woof!
You use them to rotate objects around a point mostly.
E:cb woof!
E:cb woof!
in a circle with radius 1 (unit circle) draw a line from origin that makes theta angle with the positive x terminal, when it intercepts the circle (x,y) has the coordinates of [cos(theta),sin(theta)]
mathematics: you have the point (a,b) and you wanna move R units in theta degrees, so that you end up at (x,y)
x=a+r*cos(theta); y=b+r*sin(theta);
hope that helped you
btw: it''s COS not CON
- pouya
--------------
The trick to flight is to throw yourself at the ground and miss!!!
mathematics: you have the point (a,b) and you wanna move R units in theta degrees, so that you end up at (x,y)
x=a+r*cos(theta); y=b+r*sin(theta);
hope that helped you
btw: it''s COS not CON
- pouya
--------------
The trick to flight is to throw yourself at the ground and miss!!!
Hmmmmm, so lets see.
If I was going to define a triangle, ABC.
C----------B
\ /
\ /
\ /
\ /
\/
A
And I knew the X,Y value of A, and the Y value of C and B and the angle of corner A....I could solve for C.x using,
C.x = (A.x+ C.y)*(cos(AngleOfCornerA)) or something along the lines of that....I''ll have to sit down and figure it out.
If I was going to define a triangle, ABC.
C----------B
\ /
\ /
\ /
\ /
\/
A
And I knew the X,Y value of A, and the Y value of C and B and the angle of corner A....I could solve for C.x using,
C.x = (A.x+ C.y)*(cos(AngleOfCornerA)) or something along the lines of that....I''ll have to sit down and figure it out.
if you have
(btw: use the < pre > and < /pre > tags to do this)
BC = sqrt( AC^2 + AB^2 - 2*AB*AC*cos(A) )
AC = sqrt( BC^2 + AB^2 - 2*AB*BC*cos(B) )
AB = sqrt( AC^2 + BC^2 - 2*BC*AC*cos(C) )
and also
( AB / sin(C) ) = ( BC / sin(A) ) = ( AC / sin(B) )
- pouya
--------------
The trick to flight is to throw yourself at the ground and miss!!!
Edited by - pouya on June 1, 2000 4:03:29 PM
C----------B \ / \ / \ / \ / \/ A
(btw: use the < pre > and < /pre > tags to do this)
BC = sqrt( AC^2 + AB^2 - 2*AB*AC*cos(A) )
AC = sqrt( BC^2 + AB^2 - 2*AB*BC*cos(B) )
AB = sqrt( AC^2 + BC^2 - 2*BC*AC*cos(C) )
and also
( AB / sin(C) ) = ( BC / sin(A) ) = ( AC / sin(B) )
- pouya
--------------
The trick to flight is to throw yourself at the ground and miss!!!
Edited by - pouya on June 1, 2000 4:03:29 PM
This math shortcut only works with a right triangle. This could cause problems. I''m sure you guys already know this, but from your crude pictures I just wanted to make sure.
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
quote: Original post by Julio
This math shortcut only works with a right triangle. This could cause problems. I''m sure you guys already know this, but from your crude pictures I just wanted to make sure.
the cosine law and sine law apply to ANY kind of trianlge
the formula''s that''s you''re thinking about it different. i know what you mean, but this is the general formula for all triangles
p.s. if you dont know this, i stronlgy suggest you go back to high school
- pouya
--------------
The trick to flight is to throw yourself at the ground and miss!!!
*Packs his bags and goes back to high school*
Im from the UK its not my fault
Im from the UK its not my fault
To calculate sin and cos:
cos(x) = x^0/0! - x^2/2! + x^4/4! - x^6/6! + x^8/8! - .....
sin(x) = x^1/1! - x^3/3! + x^5/5! - x^7/7! + x^9/9! - .....
where 0! = 1 and n! = n*((n-1)!)
Visit our homepage: www.rarebyte.de.st
GA
cos(x) = x^0/0! - x^2/2! + x^4/4! - x^6/6! + x^8/8! - .....
sin(x) = x^1/1! - x^3/3! + x^5/5! - x^7/7! + x^9/9! - .....
where 0! = 1 and n! = n*((n-1)!)
Visit our homepage: www.rarebyte.de.st
GA
Visit our homepage: www.rarebyte.de.stGA
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement