[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating a sphere (Object Graphics)

"David Fanning" <davidf@dfanning.com> wrote in message
> Jason P. Meyers (jpm7934@cis.rit.edu) writes:
> > [snip]
> > I was a bit surprised to find that IDL doesn't have a 3-D sphere
> > function/procedure up its sleeve.  Nor could I find one at Eric
> > Deutsch's IDL web search
> > [snip]
> Well, I'm sure this was a useful exercise in
> and of itself. But I think I might have had
> a look at the ORB object that comes in the
> IDL examples/objects sub-directory. :-)
>    sphere = Obj_New('Orb')

Also look at the MESH_OBJ procedure. It helps you create a wide variety of
solids of revolution, extrusions, etc. MESH_OBJ creates vertex &
connectivity arrays with which you can then construct an IDLgrPolygon or

Mark Hadfield
m.hadfield@niwa.cri.nz  http://katipo.niwa.cri.nz/~hadfield/
National Institute for Water and Atmospheric Research
PO Box 14-901, Wellington, New Zealand

> >
> > Anyway, I came up with the procedure listed below which produces 2-D x,
> > y, and z arrays which display a sphere.  My problem is that while this
> > works for the most part, I can still see some seems and other
> > "imperfections" when I rotate the surface in Dave's program.
> > (http://www.astro.washington.edu/deutsch/idl/htmlhelp/index.html).  Does
> > anyone know of a better way (or minor improvement) of making a "better
> > looking" sphere.  I don't want to spend too much more time on this part
> > of my project.  But if I could have a cool shining sphere, that would be
> > nice.
> >
> > Thanks in advance for any and all suggestions,
> There are other goodies in that directory as well.
> RSI has a history of supplying some fabulous,
> undocumented code. It's a fair amount of work
> to wade through it, but the effort usually pays
> off.
> In any case, you ought to have a look through
> this directory fairly soon after you start working
> with objects.
> Cheers,
> David
> P.S. Let's just say spending many needless hours
> writing IDL programs was *exactly* how I became
> knowledgeable about IDL. :-)
> --
> David Fanning, Ph.D.
> Fanning Software Consulting
> Phone: 970-221-0438 E-Mail: davidf@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155