Jump to content
Sign in to follow this  
Rommel

Trigonometry

Recommended Posts

Why is it: atan2 = 63.435 degrees, yet: tan(20/10) = -2.18... which would be the regular trigonometric way. (tan (angle) = opposite / adjacent.)... something to do with Vector?

A really weird discovery here, if you could shed some light I'd be very thankful.

83499971ch8.jpg

ArmA Values were determined by:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

nil = player spawn {_pos = getPos player; waitUntil {player distance _pos > 10}; hint format ["%1",[((getpos player select 0) - (_pos select 0)),((getpos player select 1) - (_pos select 1)),((getpos player select 2) - (_pos select 2))]]}

Moving on a 45 degree bearing through the compass.

So why the degree divided by 3.3.

trigiz5.jpg

FYI, I came to this conclusion on multiple evidence, it was discovered via a 10 degree angle not equalling the math, I then noticed a pattern in the values, and noticed 33 degrees produced the values for 10, I then tried this for 45, then divided by 3 (rounded) and got the above values (close, but the rounded is obvious in the results).

I have since tried this for many different angles, with similiar results. crazy_o.gif

Share this post


Link to post
Share on other sites

Make sure you are not confusing radians and degrees in your calculations. It can really mess you up if you don't notice this little error. From your description it is not clear to me if you know this already.

Calculating with TI-89 which is set to use degrees from "Mode->Angle":

sin(45)*10=7.07107

cos(45)*10=7.07107

You calculated in radians but gave the angle in degrees in your "correct math" results in the picture. You should of course get the same result for both sides of the triangle with an angle of 45 degrees.

Let's convert the 45 degrees into radians:

(Pi/180)*45 --> 0.785398 radians

Calculating with TI-89 which is set to use radians from "Mode->Angle":

sin(0.785398)*10 = 7.07107

cos(0.785398)*10 = 7.07107

The "ArmA values" have been calculated by giving the angle in radians

Calculating with TI-89 which is set to use radians from "Mode->Angle":

sin(15)*10 = 6.50288

cos(15)*10 = -7.59688

Because, as I think, your description isn't very clear, I do not know if this actually solves your problem or not. Maybe you already knew this all and I just didn't understand your description of the problem.

Share this post


Link to post
Share on other sites

...

that explains a lot. explains interesting math grades too... only got the working out right... whistle.gif

thanks mate!

(getting the right answers now...)

bloody radians... explains something I screwed up in physics too.. FKKKKKKKK

Share this post


Link to post
Share on other sites

Good to hear that the problem was that simple. Because it was so simple, I wasn't sure if that was the problem at all smile_o.gif

The same mistake is made in levels of higher education too so there is no need for you to put your head down in shame over this.

It's so easy mistake to make, but usually you notice it soon when you get weird results, like having a right-angled triangle which has its catheti not equal length when the angle is 45 degrees... which is of course impossible.

Share this post


Link to post
Share on other sites

So by any chance was the 3.3 multiplication thing actually multiplying it by Pi (around) which was giving me false impression? tounge2.gif

Share this post


Link to post
Share on other sites

Well I had a feeling that it's probably Pi when I first read what you wrote about "3.3".

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×