RE: [Algorithms] portal engines in outdoor environments
Brought to you by:
vexxed72
From: Tom F. <to...@mu...> - 2000-08-21 20:49:13
|
You can find it perfectly of course, but if you can't be bothered, or you're doing lots of these (a common case), then a good conservative approximation of the real size is to find the radius of a circle that is r units closer to the viewer than S, i.e. just move P closer by r. It's virtually the same thing for sensible-distance-away spheres, it's only as the sphere gets really very close that it starts to give poor results, and this is usually acceptable in things like hierachial culling. Tom Forsyth - Muckyfoot bloke. Whizzing and pasting and pooting through the day. > -----Original Message----- > From: Jamie Fowlston [mailto:j.f...@re...] > Sent: 21 August 2000 12:05 > To: gda...@li... > Subject: Re: [Algorithms] portal engines in outdoor environments > > > > 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 > > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > |