I am not sure if this is the right board for my question. I though also of the Processing board but not sure.

I am obtaining the x, y and z angular positions from a L3G4200D gyroscope with values between 0 and 359 degrees.

With that information, I am rotating a line about the origin in a 3D space (using Processing).

If I set the distance of the line to a value d, is it possible to calculate the x,y an z coordinates of the second point with only the 3 angles and the distance? If so, I'd really appreciate any help or reference about how to do it. Thank you.