03-14-2005, 08:11 PM
uh, yeah, i'm trying to figure out how sin and cos work.. i was trying to make a circle move on the screen in a circle..but failed horribly
url=http://www.random-seed.net][/url]
sin and cos help
|
03-14-2005, 08:11 PM
uh, yeah, i'm trying to figure out how sin and cos work.. i was trying to make a circle move on the screen in a circle..but failed horribly
url=http://www.random-seed.net][/url]
03-14-2005, 08:47 PM
I'll try to explain:
Look up trigonometry in a math book for a better explanation. ....................Q ................../| ................/..| ............../....| .....a...../......| ........../........| b ......../..........| ....../............| ..../_______| P.........c The angle alpha is the angle between the sides a and c the angle between the sides b and c is 90 degrees sin(alpha)=b/a cos(alpha)=c/a a*sin(alpha)=b a*cos(alpha)=c that means if point P is at the coordinates (0;0) Point Q will be at the coordinates(a*cos(alpha);a*sin(alpha))
/post]
03-15-2005, 12:37 AM
mybe somthing like this will help
Y = Sin(ang )*M X = Cos(ang)*M M would be the magnatued of the vector oh ya i think freebasic use's rad's for it sin , cos and tan function so you will have to convert degree's to rad which is ang in degreas * (Pi/180)
03-15-2005, 12:39 AM
Try This:
Code: const PI as double = 3.1415926535897932385 What exactly are you having problems with? The graphics? The trig? The Radians?
03-15-2005, 03:10 AM
The best thing you can do, if you really want to understand what's going on, is Google for 2D rotation tutorials...
Here's one for QB, written by by Toshie Horie. It's got everything you need to know, plus a bunch of stuff that's great to know for making games. http://www.ocf.berkeley.edu/~horie/qbrotate.html
03-15-2005, 03:11 AM
trig and radians... and how it all worx
url=http://www.random-seed.net][/url]
03-15-2005, 11:22 AM
A good trig book is all you'll ever need to understand them sine's. :*)
03-15-2005, 01:16 PM
Maths are taught at school Trig is taught when pupils are 13 or 14, I think.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio underBASIC, homegrown musicians [img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
03-15-2005, 05:20 PM
OMFG!!! i'm actually starting to get it!!! :bounce:
Code: screen 13 btw, i'm a highschool dropout, and they didnt teach sin, cos, during the time i was in school
url=http://www.random-seed.net][/url]
|
« Next Oldest | Next Newest »
|