Hello mate. With the complex work you're doing with rotations, you'll probably want to look into
EZ Rotate. This is a plugin written by Ron Erickson which has a lot of cool features for solving these sort of problems for you, as the actual maths is pretty complex!
Here's a quote from the command list ...
Quote: "
Find Point From Offset
The Find point from offset feature will convert from a coordinate system that is local to your object to the global coordinate system. In other words, if you want to know the position of a point that is always a certain distance above / below / beside / in front / behind your object according to how it is currently rotated, this feature will solve the problem. This is a great replacement for the "glue object" command native to Dark Basic Professional. It is a great way to cut down the usage and overhead of "dummy" objects to track positions.
Find Offset From Point
This command is the polar opposite of the Find Point From Offset feature. Instead, you supply a 3D coordinate and EZrotate will determine the distance to each objects axis relative to how it is rotated (perpendicular distance). This feature makes setting up things such as 3D radars very simple.
"
Sounds like Find Offset From Point is exactly what you need.