For a given set of Cartesian coordinates (x1,y1,z1) in degrees I have found I can find a 2-dimensional (i.e. looking from the top view down) set of coordinates D distance away (x2,y2,z2) by doing the following...

Code:

```
Given Distance D = 10:
x2 = x1 + (D * Cosine( DegreesToRadians(x1) ) * Cosine( DegreesToRadians( y1 ) ) )
y2 = y1 + (D * Cosine( DegreesToRadians(x1) ) * Sine( DegreesToRadians( y1) ) )
z2 = z1 + (D * Sine( DegreesToRadians(x1) )
```

Code:

```
Given:
LengthCannon = 10 (i.e. cannon shaft length in units).
Angles (a1,b1,c1) in degrees
Cannon butt origin (x1,y1,z1) in degrees
Calculate by...
a2 = (a1 / 360) * 2 * pi
b2 = (b1 / 360) * 2 * pi
(c1/c2 doesn't really matter in this case since I do not care about spin/orientation of the object which will be assumed as self-righted)
tip of barrel = LengthCannon * sin(b2)
projection = LengthCannon * cos(b2)
x = projection * cos(a2)
z = projection * sin(a2)
The x component of the cannon shaft in space:
x2 = (x1 - 0) / LengthCannon
y2 = (y1 - 0) / LengthCannon
z2 = (z1 - 0) / LengthCannon
```

Am I on the right track? Can someone help correct this formula or perhaps give me a better one?