The math itself wasn't so complicated, this is the actual code thats calculating it:
cout << (180 / pi) * acos(dis(vx_1, vy_1, vx_2, vy_1) / dis(vx_1, vy_1, vx_2, vy_2));
Now, as for a 3 dimensional map, it is completely possible. You could flip new york on its side without crashing the game, if you did it properly. Its just tricky to do it properly (also the tradelanes would crash as they cannot go straight up or down).
I tried writing a program that automatically resized systems, but it just corrupted all teh systems it tried to scale =\ I could try having another go at it but i doubt i'd be successful.
Here is my current build of the program:
FLRotCalc (source included)
It works! w00t! I've tested it and it seems to give the exact rotational value needed for the tradelanes. I've reuploaded the file with the corresponding source, the only thing that i changed was the helper text so there is no confusion. As long as you copy the position values into the program as you see them in the INI (minus the spaces, of course), it should work like a charm. If it crashes on you, check the format of the coordinates your feeding it, and make sure there are no spaces, no weird characters, only the coordinates, a comma seperating each of the 3 coordinates, and negative signs where nessacary.
Same goes for rotational value, just copy it in to the INI as you see it in the program. You might want to add spaces in.
Hope this works and proves useful!
Edited by - blackhole on 12/2/2006 12:00:13 AM