|
|
View Full Version : Sinus calculation
I am not sure if it is even possible, but I just wondered if any of you guys know if there is a way to easy calculate the sinus value of an angle. I know how to easy calculate sinus for 0, 30, 45, 60 and 90 degrees, but all the others. I would really apprichiate an answer, even if it tells me it is not possible. I would really appriciate it. Thank you in advance.
Andreas.
Assuming you mean sine, your question is fairly vague. I hope this (http://www.cwru.edu/cse/eeap/282/22_sine_func.html) answers your question.
Thank you very much. I will have to study it for a while to understand it though. I just completed secondary school this year you see. But still... Very thank you. :D
Correction, I didn't understand a bit of it. I'll just go on searching, but thanks anyway... :/
Specialist 06-11-03, 04:52 PM There is a sine formula (infinite series) that they use
http://www.chembio.uoguelph.ca/educmat/chm386/rudiment/mathbas/sin6.gif
Also inverse sine
http://www.math.duke.edu/education/ccp/materials/intcalc/inverse/eq2.gif
If you want the actual value all neatly wrapped up in fraction form, then you need to do alot of manipulation using values of know radians.
Like I earlier said. I just completed secondary school this year. I don't understand all the characters you use and stuff. But thanks anyway. I'm sure I can get someone else to help me read that function or what ever you call it. I appriciate your help, I really do.
Specialist 06-11-03, 05:20 PM Originally posted by Loco
Like I earlier said. I just completed secondary school this year. I don't understand all the characters you use and stuff. But thanks anyway. I'm sure I can get someone else to help me read that function or what ever you call it. I appriciate your help, I really do.
What could you not understand!
sin(Pi/4) = 1/sqrt(2)
Pi/4 = A, angle
sin A, is the function
sin A = A - A^3/3! + A^5/5!...
N! means N factorial = N(N-1)(N-2)(N-3)...3*2*1, also 0!=1
3!=3*2*1=6
4!=4*3*2*1=24
5!=5*4*3*2*1=120
so just continue the fuction sin A = A+(A^n/n!)(-1)^n till infinite, as n increase by 1.
Originally posted by Loco
I am not sure if it is even possible, but I just wondered if any of you guys know if there is a way to easy calculate the sinus value of an angle. I know how to easy calculate sinus for 0, 30, 45, 60 and 90 degrees, but all the others. I would really apprichiate an answer, even if it tells me it is not possible. I would really appriciate it. Thank you in advance.
Andreas.
andreas-
actually, for the vast majority of angles, there is no way to exactly calculate the value of the sinus. as you mentioned, you know how to get 0,30,45, etc. well there is also a formula to get half angles, so you can use what you know to get 15, 15/2, 15/4 etc.
there are some more formulas, for e.g. 1/3 of known angles, but the formulas quickly get very difficult, involving solutions to higher order polynomials.
and if i ask for the sinus of say √2, there is simply no way to get it. the sine function is what is known as a transcendental function. that means that most of its values are not arrivable from any finite combination of integers.
those formulas that loco gave you are only good for approximation.
so the simple answer is, there is no way, so forget about it: use your calculator.
In fact, I am Loco. Sowhen you said the answers I gave me was nice, I think you ment someone else ;) I know I can use my calculator, but I need a way to calculate sinus if I am to use it in for example a 3D game. And C++ does not ahave a built-in sinus calculation function, as far as I know that is, so that's my problem.
Andreas
Originally posted by Specialist
What could you not understand!
I just completed secondary school. The most advanced maths I have ever learnt is matrix multiplication, and I've learnt it from a book on 3D game programing, the most advanced I have learnt from school is probably how to use =summer() in Microsoft Excel or something like that, and I had to teach my teatcher how to do it before he could teach us :bugeye:
James R 06-12-03, 03:20 AM In C (and, presumably C++), if you include <math.h>, then the sin() and cos() functions are available.
edit: fixed HTML mistake. Oops!
Yeah... pretty sure it's in math.h (?)
If for some odd reason you want the prgoram to do it 'manually', that first link should help you. You'll need to make some kind of matrix first though. You're probably safer going james's route unless you want to sacrifice accuracy for speed.
I know how to calculate wih matrices, so I'll just have to create the matrix, and that's the hard part, but if there excists a sin() and a cos() function in C++, then all my problems are solved, I did just need a way to calculate sinus and cosinus so that I could use it in rotation matrices...
Andreas.
Originally posted by James R
In C (and, presumably C++), if you include <math.h>, then the sin() and cos() functions are available.
i assume that you meant to write < include math.h >, but without the spaces. if you do that, then sinus and cosinus should be available.
I thought a sinus was one of the cavities either behind your cheek bone or behind your forehead, connected to the nasal passages?
Ive never heard it called sinus and cosinus either. Ive always heard it called sine and cosine. Is it also tangetus? haha
-AntonK
Originally posted by AntonK
Ive never heard it called sinus and cosinus either. Ive always heard it called sine and cosine. Is it also tangetus? haha
-AntonK
they are latin words. for a long time, that s what everyone called them. in america, however, the call them sine and cosine.
You learn something new everyday! I figured it was just a bad babblefish translation:)
Originally posted by Persol
You learn something new everyday! I figured it was just a bad babblefish translation:)
in german, for example, they are still called sinus cosinus, etc. i don t know, maybe they use sinus in england too? or australia? i dunno
In Australia we use kanginus (cosine) and koalasinus (sine).
We also have the bushmangent function and the so called hyperbolic functions are another caper all together.
Originally posted by ryans
In Australia we use kanginus (cosine) and koalasinus (sine).
We also have the bushmangent function and the so called hyperbolic functions are another caper all together.
hehhehea. nice.
but really Loco, what country are you from?
Originally posted by lethe
i assume that you meant to write < include math.h >, but without the spaces. if you do that, then sinus and cosinus should be available.
Actually, what you should write is:
#include < math.h > (isn't it?:bugeye: )
And, in Norway where I come from, it's called sinus and cosinus, and even though you all wrote sine and cosine, I figured that sinus and cosinus would also be correct, 'cause the English language often changes words if for eksample they are to hard to pronounce, so I'm going to continue call it sinus and cosinus.
Andreas, Norge
Originally posted by Loco
Actually, what you should write is:
#include < math.h > (isn't it?:bugeye: )
yeah, that s correct. whoops, my mistake, thanks.
And, in Norway where I come from, it's called sinus and cosinus, and even though you all wrote sine and cosine, I figured that sinus and cosinus would also be correct, 'cause the English language often changes words if for eksample they are to hard to pronounce, so I'm going to continue call it sinus and cosinus.
Andreas, Norge
yeah, i wouldn t say it s incorrect to say sinus/cosinus. i believe that if you look in really old books, you can find it in english, even. but noone calls it that anymore in english. just sine/cosine.
cheers
In english, how would you write plural of sinus and cosinus?
Is it sinuses and cosinuses, or sinii and cosinii? The last one would be logical... wouldn'y it? :bugeye:
Andreas
Originally posted by Loco
In english, how would you write plural of sinus and cosinus?
Is it sinuses and cosinuses, or sinii and cosinii? The last one would be logical... wouldn'y it? :bugeye:
Andreas
since, in english, we don t say sinus, we also don t say the plural of sinus, so it doesn t come up.
On Radioactive Waves 06-14-03, 01:29 AM Originally posted by Persol
sines/cosines
tangents ;)
hehe... i should've seen that coming
Well, I know you don't write sinus and cosinus, but if you read my post properly, you would find me writing; how would you write it?
Andreas
Originally posted by Loco
Well, I know you don't write sinus and cosinus, but if you read my post properly, you would find me writing; how would you write it?
Andreas
you re right. well, i suppose in english we would write sini (only one "i"). we generally tend to stick to the classical plurals, especially for mathematical terms. confer radius/radii, momentum/momenta, vacuum/vacua, etc.. i ve never seen this in any book though, so don t quote me on it.
how do you write the plural in norwegian?
In Modern English, sinus is not a mathematical term. It is used in medicine and anatomy and other natural sciences, however. The plural is generally written sinuses.
We occasionally use correct Latin plurals in English. For example, genii and virii are acceptable, albeit infrequently used, plurals to genius and virus, respectively. There are also many words where the Latin plural is the most widely used.
Lethe also mentioned some above.
Originally posted by AD1
In Modern English, sinus is not a mathematical term. It is used in medicine and anatomy and other natural sciences, however. The plural is generally written sinuses.
you re talking about an entirely different word. the sinus behind your nose is a different word from the trigonometric sinus. my dictionary shows that they have the same root, but i don t think that matters.
my dictionary shows that they have the same root, but i don t think that matters.
You're the sole arbiter of that, I bet.
Originally posted by lethe
how do you write the plural in norwegian?
In norwegian we write plural usually by adding "er".
Eks: Stol - Stoler. We say "virus" (virus), and "virii" (plural virus), but when it comes to "sinus" and "cosinus", I have no idéa. I have to look it up.
|