Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!zaphod.mps.ohio-state.edu!mips!sgi!shinobu!odin!cashew.asd.sgi.com!kurt From: kurt@cashew.asd.sgi.com (Kurt Akeley) Newsgroups: comp.sys.sgi Subject: Re: tmesh sphere-> HOW ? Message-ID: <1990Aug17.162259.430@odin.corp.sgi.com> Date: 17 Aug 90 16:22:59 GMT References: <1990Aug16.163109.32446@eagle.wesleyan.edu> Sender: news@odin.corp.sgi.com (Net News) Reply-To: kurt@cashew.asd.sgi.com (Kurt Akeley) Organization: sgi Lines: 28 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