Source
- URL: https://x.com/pikuma/status/1960444602227269928
- Author: pikuma.com (@pikuma)
- Posted: 2025-08-26 20:49:51
Thread
1/ @pikuma
Assuming the risk of appearing extremely dumb in front of everyone here but, how would you find and explain your rationale for the value of the angle β in the diagram below? Someone told me that my approach is wrong so I just want to check that I’m not going crazy. 😐
2/ @EricLengyel
I see nothing wrong with thinking of β as the angle rotated away from the −x axis as you open the field of view from the z axis by the angle fov/2 = β. But if it’s the normal vector you’re ultimately after, I think it’s best to compute with the aspect ratio s = w/h and focal length g = s / tan(fov/2). The unit-length inward-pointing normal vector of the right frustum plane is then simply (−g, 0, s) / sqrt(g² + s²). The other three side planes have similarly simple forms in terms of g and s. See FGED2, Section 6.1 for more details.
3/ @pikuma
@EricLengyel
Thank you. 💪 This was recorded years ago and I’m thinking of re-designing this module. I’ll definitely consider your take. Even though this is just computed once I salwe the sqrts so I want to think about proper cost tomorrow with a bit more time and with a clear mind.
4/ @KentoAsashima
@pikuma @EricLengyel
Why not the Gribb and Hartmann method as outlined by @rygorous where we use the perspective matrix axes? See https://fgiesen.wordpress.com/2012/08/31/frustum-planes-from-the-projection-matrix/
The extremes of our frustum are where the different axis components will be 1 or -1 thus we can use the corresponding axes directly.
Branches: 2025-08-27-EricLengyel-you-could-but-the-information-needed-to-construct