- AVS Troubleshooting
- Radians to Degrees
Archive: Radians to Degrees
Deamon
13th October 2003 16:59 UTC
Radians to Degrees
Avs sin() and cos() function are working with radians. However, I want it to work with degrees. For example: cos(60) should result in 0.5 instead of -0.95241.... . The problem is, I don't know where the radians come in. Is it the 60? or is it the result which is Radian? The general way to convert radian to degree is to multiply the radian with (180/$pi). This results in knowing that it is not the result that should just be multiplied, for the number get's quite big then, instead of a value between -1 and 1. Performing it this way "cos(60*(180/$pi))" aint working as well. I'm sure most of the code people around here know how it works, though I can't find it out.
Hope someone can help me.
Deamon
13th October 2003 17:02 UTC
The preset I was working on (a trig demo to the newbies). Here you can see very well where the problem lies. The variable a is the corner (dunno if that's correct english). It's in the most top control superscope.
Also I still have to write the comment, but I'll do that as soon as I got this working :)
UIUC85
13th October 2003 22:33 UTC
If you want to convert you gotta learn how to cancel. So you have your angle of 60 degrees. In order to convert you have to cancel out the degrees. So set it up like this since pi = 180 degrees...
(60 degrees) * (pi/180 degrees)
Now you can cancel the degrees and multiply giving you...
(60pi)/180
cancel 60 from the top and bottom and you get...
pi/3
There you go.
Deamon
13th October 2003 22:36 UTC
Thanks for that one :)
dirkdeftly
14th October 2003 06:36 UTC
Or you could just work in radians. Nobody uses degrees past trig, and by the time you're in trig you should already be used to using radians...It's also a whole lot faster to work in radians cos you don't waste code converting....
Zevensoft
14th October 2003 08:39 UTC
Don't forget that radians are needed in calculus too!
UnConeD
14th October 2003 10:26 UTC
Or everywhere else :P. It's the natural way of expressing angles...
360 degrees is a leftover from the Sumerians if I'm not mistaken. They had a radix-60 or radix-24 counting system (much more divisors than our 10), and left their mark on time-telling and geometry (24 hours, 60 minutes, 360 degrees, ...).
sidd
14th October 2003 11:03 UTC
Degrees came about after a year was divided into 4 cycling seasons and thus into 360 days. This wasnt the sumerians idea tho, it was well before. I think it was eastern. But the sumerians used this idea to create their entire maths system..
or somthing like that.
dirkdeftly
14th October 2003 15:23 UTC
zeven:
Originally posted by Atero
Nobody uses degrees past trig
:P
Zevensoft
15th October 2003 01:28 UTC
Well in the american education system you probably DO use degrees past trig. I mean they still teach imperial!!
UIUC85
15th October 2003 04:12 UTC
Guess that depends on what program you're a part of. I never use degrees anymore in my classes.
anubis2003
15th October 2003 04:53 UTC
I know my physics teacher uses degrees in my Foundations Of Physics class.
Tuggummi
15th October 2003 06:25 UTC
pi2/360 , doesn't that give you like one degree? Isn't it easy to multiply that then with what ever you want?
deg1=acos(-1)*2/360 ; deg57=deg1*57
Uhm... im so confused why something has to be explained so hard... :hang:
UIUC85
15th October 2003 16:23 UTC
2pi/360 gives you the radian equivalent of 1 degree. pi/180, (pi/4)/90, (pi/3)/60, etc...
dirkdeftly
16th October 2003 02:14 UTC
i'll say it again...there's no point in using degrees. computers use radians for a reason. it's faster. mathematicians use radians for a reason. it's easier.
don't expect to get anywhere using degrees :rolleyes:
UIUC85
16th October 2003 02:58 UTC
I realize that, but he asked how so I gave him an answer.
Tuggummi
16th October 2003 06:00 UTC
Well i don't know how to use either one of them if i even wanted... i just gave an "easier" way to use degrees... i guess :weird:
shreyas_potnis
16th October 2003 08:02 UTC
1 degree = pi/180 radians and
pi radians = 180 degree.
Its simple.
UIUC85
16th October 2003 18:29 UTC
pi/180 will give you the radian equivalent of 1 degree, not literally 1 degree. Thats why when you multiply it by the number of degrees you get the full radian value.
13373571
5th November 2003 01:47 UTC
to convert degrees to radians:
x*pi/180
to convert radians to degrees:
x*180/pi
Just plug the numbers in.
why has this discussion lasted so long?
edit: crud i revived a dead post :eek:
UnConeD
5th November 2003 12:29 UTC
You didn't only revive a dead post, you also added exactly 0% extra information.
And in case you were wondering why UIUC85 was explaining it in such a 'weird' way, it's in fact the best way.
Units don't get enough emphasis in mathematics, but they're quite important in science. Plus they can help you remember certain formulas (just check if the units match up).
E.g.
Force = mass * acceleration
[1 newton] = [1 kg] * [1 m/(s^2)]
anubis2003
5th November 2003 15:20 UTC
Yep - I use units all the time. Especially since the TI-89 has them built in. I always use units when I'm working physics problems - that way if I mess up I know I did because the units don't come out right.