Jump to content

Non-centered vertical FOV camera to window offset calculation (trig question)


Recommended Posts

 

I posted this on the official forum too, but what the heck...

Given a camera that is 2048x1536, 0.971 pixel aspect, I need to set the screen window offset so that the FOV is -45.62 - +45.62 degrees horizontal and -35.67 - +40.72 degrees vertical.

What's the trig to calculate the screen window offset, given that the vertical FOV is off-center as described above?

Any “teach me how to fish” advice would be very helpful…

Cheers,
Jon

 

Link to comment
Share on other sites

This appears to be the answer:

sin(-35.67 + 40.72) / 2. / sin(abs(40.72) + abs(-35.67))

Generalized to:

sin(neg_vfov + pos_vfov) * 0.5 / sin(abs(neg_fov) + abs(pos_vfov))

 

Edited by jonp
Some minor errors in the typed code above
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...