From: Wagner, Chad B <chad.b.wagner@Boeing.com>  20011005 18:28:58

Hi, Stephen Baker once wrote: >If so, then you might want to consider rendering the more distant >spheres using "imposters"  which in this case would each be a single >quadrilateral drawn parallel to the plane of the screen with a texture >map containing a picture of a sphere with alphatexture cutting out >the circular shape. You can arrange to have the quads be parallel >to the screen just by overwriting the first twelve elements of >the GL_MODELVIEW matrix with 1,0,0,0, 0,1,0,0, 0,0,1,0. I have a similar problem...I want to draw polygons oriented on a plane tangent to a large sphere at the center point of the polygon. The technique above appears to orient the quads on a plane (presumably toward the eye, if you don't move the eyepoint). How can I set the Modelview Matrix to put them on other planes? This would be like laying chips on the Earth. I know the radius of the sphere, the coordinates of the point I want to place the polygon at. How can I express the tangent plane at this point, and stuff it in to the MODELVIEW matrix? This would be a great help! Thanks, Chad Wagner 
From: Marcelo E. Magallon <marcelo.magallon@bi...>  20011005 20:52:22

>> "Wagner, Chad B" <chad.b.wagner@...> writes: > I have a similar problem...I want to draw polygons oriented on a > plane tangent to a large sphere at the center point of the polygon. You want to use basis vectors in spherical coordinates. e_r is the normal to the sphere (and therefore the normal to your plane), e_theta and e_phi would help you define the orientation of your quad or polygon. A quick search on google reveals this page: http://www.uwm.edu/~norbury/em/node26.html It has the transformation matrix you need (alas, this isn't your modelview matrix)  Marcelo 
From: Stephen J Baker <sjbaker@li...>  20011008 13:00:21

On Fri, 5 Oct 2001, Wagner, Chad B wrote: > Hi, > > Stephen Baker once wrote: > >If so, then you might want to consider rendering the more distant > >spheres using "imposters"  which in this case would each be a single > >quadrilateral drawn parallel to the plane of the screen with a texture > >map containing a picture of a sphere with alphatexture cutting out > >the circular shape. You can arrange to have the quads be parallel > >to the screen just by overwriting the first twelve elements of > >the GL_MODELVIEW matrix with 1,0,0,0, 0,1,0,0, 0,0,1,0. > > I have a similar problem...I want to draw polygons oriented on a plane > tangent to a large sphere at the center point of the polygon. The technique > above appears to orient the quads on a plane (presumably toward the eye, if > you don't move the eyepoint). It orients the polygon such that it is parallel to the screen. That's not quite the same thing as 'toward the eye'  but it's a heck of a lot faster to compute and looks virtually identical for reasonable fields of view. However, set the field of view out to 160 degrees and they don't look so good! > How can I set the Modelview Matrix to put > them on other planes? This would be like laying chips on the Earth. I know > the radius of the sphere, the coordinates of the point I want to place the > polygon at. How can I express the tangent plane at this point, and stuff it > in to the MODELVIEW matrix? Well, there isn't a quick hack like the 'keep facing the screen' trick. However, if your matrix math is up to scratch, you can figure it out. Try reading my matrix FAQ: http://web2.airmail.net/sjbaker1/matrices_can_be_your_friends.html  Steve Baker (817)6192657 (Vox/VoxMail) L3Com/Link Simulation & Training (817)6192466 (Fax) Work: sjbaker@... http://www.link.com Home: sjbaker1@... http://web2.airmail.net/sjbaker1 