Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8972795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:18:12+00:00 2026-06-15T18:18:12+00:00

This is going to be a rather complicated explanation so bear with me. In

  • 0

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).

enter image description here

  • ‘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)

enter image description here

  • ‘(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).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T18:18:13+00:00Added an answer on June 15, 2026 at 6:18 pm

    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:

    X2 = cos(rot.Y) * view_distance - 
         (tan(22.5) * WIDTH * view_distance * sin(rot.Y))/HEIGHT
    Y2 = tan(22.5) * cos(rot.X) * view_distance + 
         (tan(22.5) * WIDTH * cos(rot.Y) * view_distance * sin(rot.X))/HEIGHT +
          view_distance * sin(rot.X) * sin(rot.Y)
    Z2 = (tan(22.5) * WIDTH * cos(rot.X) * cos(rot.Y) * view_distance)/HEIGHT - 
         tan(22.5) * view_distance * sin(rot.X) +
         cos(rot.X) * view_distance * sin(rot.Y)
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is going to sound too silly / too basic - sorry about that,
This question is going to be rather long, so I apologize preemptively. In Python
I understand this is going to be fairly subjective, but I am looking for
I've read all about this online but everything else was just overly complicated and
I have already thought about how I'm going to solve this by rolling my
This is going to be a bit difficult to explain. I'm usually fine with
This is going to be a stupid question but I have spent an inordinate
This is going to be a long post and just for fun, so if
This is going to be a quick discussion, but I just wanted some feedback
Hey this is going to be one of those dumb questions. I am trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.