Spheres under perspective projection

Started by
2 comments, last by JoeJ 6 years, 6 months ago

The main thing I want to accomplish is the quickest way to get a screen space bounding rect of a sphere.  If anyone knows a good fast method I would appreciate it.  But in addition I would like to know more about why a sphere under perspective projection isn't perfectly round?  More specifically I was looking at this: http://www.iquilezles.org/www/articles/sphereproj/sphereproj.htm page and in the first picture one of the spheres appear to tilted and was wondering what exactly causes that?

But like I said the primary thing I would like is a quick screen space bounding rect for a given sphere and a particular MVP matrix.

-potential energy is easily made kinetic-

Advertisement
1 hour ago, Infinisearch said:

But in addition I would like to know more about why a sphere under perspective projection isn't perfectly round?

Same reason that the corners of a cube aren't right angles... Perspective distorts shapes.

iYgxKqC.png

It won't be minimal, but one easy way to get a bounding rect is to first make a 3D bounding box around the sphere, project all those corner points to 2D, and then use the 2D bounding box of those points.

http://research.nvidia.com/publication/2d-polyhedral-bounds-clipped-perspective-projected-3d-sphere

This topic is closed to new replies.

Advertisement