Re: [Algorithms] portal engines in outdoor environments
Brought to you by:
vexxed72
From: Jamie F. <j.f...@re...> - 2000-08-21 11:05:08
|
> Spheres are particularly nice because the sphere radius is the same as the > circles radius after projection Careful. There's a common misconception here (which you may or may not have made :). Let the sphere have radius r. Let S be the centre of the sphere. Let V be some vector perpendicular to the view vector of length r. Let P = S + V Some people claim that projecting point P gives you a point on the edge of the circle which is the rasterisation of the sphere. This is not true. Demonstration that this is so (in 2D, so hopefully it's clearer :) : Take a circle with centre C. Place an arbitrary point P outside the circle. The closer it is to the circle, the clearer my point (unintentional... sorry:) should be. Let the 2 tangents to the circle passing through P be T1, T2. Let P1 be the point of intersection between T1 and C. Define P2 similarly. It should be clear that the projections of P1 and P2 are equivalent to points on the edge of the rasterisation. But (P - C) is not perpendicular to (T1 - C) or (T2 - C). Although as | P - C | approaches infinity, they approach perpendicular. If you can be sure you'll never be close enough to appreciate the error, then you'll be fine :) Back to the sphere: this means that the true rasterisation of the sphere is larger than the circle calculated by projecting P. I'll expand more if anybody needs it... or gives a monkey's :) Jamie |