Important Message

You are browsing the archived Lancers Reactor forums. You cannot register or login.
The content may be outdated and links may not be functional.


To get the latest in Freelancer news, mods, modding and downloads, go to
The-Starport

3D maths !????

The general place to discuss MOD''ing Freelancer!

Post Thu Sep 29, 2005 3:36 pm

3D maths !????

My problem is working out the rotational values for patrols that run +/- on the y-axis , as an example how do you workout the rotation for "67071, 0, 66549" so that it points at "12840, -10000, 23106". I can work out the distance between two points in a 3D environment,I just can't get to grips with the rotation.

Before anybody suggests it FLE is of no use as it only works in 2D.

Rebalance 3.5 Dev. Team
rebalance.blue-ion.net

Post Thu Sep 29, 2005 9:29 pm

this looks interesting 3DMath Explorer

Post Thu Sep 29, 2005 11:59 pm

No idea how to do it officially, but I would plot it straight (using FLE if you want) to get a straight line from A - B.



That is one straight line vector or whatever they call it. Now you have one "side" to a pythag triangle. You know the diff in X and Y coords on a straight plane (so no "altitude at this point" - you can use the old sin, cos, tan methodology to find the angle between the two points (which FLE should have done).

Now you just have to factor in the altitude - which is a "side" of yet anothe triangle - one where you already know the dist between the two points. You can work out the length of the actual path now.

For the angle, well - sin, cos, tan on your new values. You already know one angle - the one between the X/Y coords on a level plane, now you need the one between verticle plane and horizontal.

Once you got that, find the mid point and plot.
Should work I think. Someone else may whack down a load of forumlas for you to use - but I just search the net when I cannot remember my maths for the forumulas, and then work it out.

Post Fri Sep 30, 2005 2:25 am

ohh, that could take a while,
i havent actually looked ar paths before, though you would need 3 points and an angle to work out another point on a triangle, or 3 points and you can use the cosine / sine rule to find out angles and stuff

Post Sat Oct 01, 2005 7:06 pm

Try searching for "Euler angle to Quaternion" sites. Using quaternions (x,y,z,w) you don't end up with Gimbal lock or anything unhelpful like that, and it's a good way of computing the overall rotation - they're used in the THN files for this very reason. Otherwise you could always just rotate through the x-axis, calculate the heading, then do the same for the y-axis and then the z-axis.

Post Sun Oct 02, 2005 7:30 am

I should have added that I am clueless when it comes to anything other than very basic maths, I flunked it at high school 25 years ago, just couldn't get to grips with it, and I still can't.
I was hoping someone would know of an idiots guide or write the formula in a way that this idiot (ME) might understand.

Return to Freelancer General Editing Forum