# Math Help - Get the end position of a spherical segment line.

1. ## Get the end position of a spherical segment line.

I just want to say: This is my first time here and I haven't taken trig just yet, so bar with me a bit.

Hey guys, I been trying at this problem for a few days now, but to no luck. I am taking a spherical object that is using a heading, pitch, roll type movement and trying to cast a line segment from it and then get the end point of that line segement. Can anyone show me the math behinde it?

I know it's wrong, but here's what I did try:
Code:
from math import cos, sqrt, tan, sin, radians, degrees
x1 = 0
y1 = 0
z1 = 0
P = 90
H = 0
R = 0
D = 10
print x2, y2, z2