I have a cylinder of 2f length, and the data for RotX and RotZ, given by user. I also know that the "bottom" of my cylinder is at (0,0,0) (the center of the circle forming the "bottom")
What I need is to calculate the "top" point (the center of the circle at the other end) having the data exposed in the upper lines.
In my second image, the A point is calculated as follows (sin(zAngle),cos(zAngle),sin(xAngle) with zAngle=PI/4 (alpha angle) and xAngle=0.
Point B is calculated as (sin(xAngle),cos(xAngle),sin(zAngle)) with xAngle=PI/4 (beta angle) and zAngle=0;
C point is the "top" of a cylinder with xAngle=PI/4 and zAngle=PI/4.
I need to find an algorithm to determine the "top" point for any given xAngle and zAngle.
I'd be extremly thankful if anyone could help me.