This is going to be a rather complicated explanation so bear with me. In 3D space, a player has 2 rotation values for looking around them, the rotation about the x and y axis. Given a view distance, I have calculated the point in the center of the players view port which is the view distance away (as show below).

- ‘vd’ is the view distance
- ‘c’ is a value holder
- ‘(x,y,z)’ is the point to be calculated
- ‘rot.x’ and ‘rot.y’ are the rotations about the x and y axis, respectively.
Given this point (x,y,z), I need to calculate four points relative to this position (as shown below)

- ‘(x2,y2,z2)’, ‘(x3,y3,z3)’, etc. are the points I need to calculate.
- The width and height of the green plane is known. Let’s call each one ‘w’ and ‘h’ respectively.
Now given I still have access to all the values in the first graph (such as rotations, etc), how can I calculate the each of the four points?
A little background.. I am doing this for a culling method called frustum culling. I am trying to do this with LWJGL in order to speed up rendering and reduce the toll on the GPU. I haven’t been able to figure out the trigonometry for this calculation, and I have been trying for the past few hours. Any help is appreciated. If any more explanation/clarification is needed, just let me know. Thanks.
EDIT: Also, the points have to be on the same plane and rotate about the x and y axis with the point (x,y,z).
Assuming rotation order is X first then Y rotation then the matrix calculation would be:
V*Ry*Rx
Since the V vector was established being.
V = [view_distance, tan(22.5)*view_distance, tan(22.5)*view_distance*(WIDTH/HEIGHT)]
Then that means:
The expressions could be simplified a bit more, since for example view distance can be factored out of all the expressions. Since calculating this was a bit pointless and error prone id prefer to use the matrix functions with numeric values as its much easier stuff.
PS: The matrix notation is much easier on your eyes and your programming experience.