hoberoi@eagle.wesleyan.edu (08/17/90)
Hi, 1). Has someone written a routine that renders spheres using tmesh routines ? something of the sort initsphere( npoly ); /* npoly = number of polygns used to approximate the sphere */ makesphere( x, y, z, radius ); At the moment I generate a unit sphere using adaptive subdivision of an icoashedron/octahedron, and use a series bgnpoly() endpoly() commands to make an object ie. initsphere( npoly ). then translate and scale this unit sphere but since there are > 1000 spheres the drawing speed is sloooow. The idea of course is to make space filled drawings of molecules and hopefully (!) rotate a low res ie. initsphere( 32 ) and switch to hi res. gouard shaded object when done. Himanshu.
kurt@cashew.asd.sgi.com (Kurt Akeley) (08/17/90)
In article <1990Aug16.163109.32446@eagle.wesleyan.edu>, hoberoi@eagle.wesleyan.edu writes: |> Hi, |> 1). Has someone written a routine that renders spheres using tmesh routines ? |> something of the sort |> initsphere( npoly ); /* npoly = number of polygns used to approximate |> the sphere */ |> makesphere( x, y, z, radius ); |> |> At the moment I generate a unit sphere using adaptive subdivision of an |> icoashedron/octahedron, and use a series bgnpoly() endpoly() commands to make |> an object ie. initsphere( npoly ). then translate and scale this unit sphere |> but since there are > 1000 spheres the drawing speed is sloooow. |> |> The idea of course is to make space filled drawings of molecules and |> hopefully (!) rotate a low res ie. initsphere( 32 ) and switch to hi res. |> gouard shaded object when done. |> |> Himanshu. Yes! Check out libsphere in the 3.3 release. It generates spheres based on platonic solids, using triangles, quads, tmeshes, or quadstrips. These are available as GL objects as well as in immediate mode. Many other features too. -- kurt