|
Re: Object Graphics Roting Sphere [message #37959 is a reply to message #37958] |
Thu, 05 February 2004 09:16  |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
"Jamie" wrote...
> Does anyone have an example of how to make a rotating sphere using object
> graphics? An example that shows a rotating planet with a topographic map
> would be ideal ;)
I worked this up a while ago for someone. It is an object graphics globe.
You can rotate it and zoom in and out. It is a fairly simple example but it
should put you well on your way. The program is camdemo__examine.pro and is
packaged up with an old version of my camera object:
http://www.acoustics.washington.edu/~towler/programs/camera_ _define.zip
I doesn't use a topographic texture, but you could easily swap one in.
-Rick
|
|
|
Re: Object Graphics Roting Sphere [message #37964 is a reply to message #37959] |
Wed, 04 February 2004 18:05  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> Well, here is something really simple and easy.
Of course, there is the even simpler (if less illustrative):
IDL> XObjview, Obj_New('Orb')
Cheers,
David
P.S. Let's just say getting the rotating sphere is probably
*not* the hardest part. :-(
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: Object Graphics Roting Sphere [message #37965 is a reply to message #37964] |
Wed, 04 February 2004 17:59  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Jamie writes:
> Does anyone have an example of how to make a rotating sphere using object
> graphics? An example that shows a rotating planet with a topographic map
> would be ideal ;)
Well, here is something really simple and easy. Download
SIMPLE_SURFACE:
http://www.dfanning.com/programs/simple_surface.pro
Find these two lines on line 434:
thisSurface = OBJ_NEW('IDLgrSurface', data, x, y, $
Color=[255,255,0], _Extra=extra, Hidden_Lines=hidden_lines)
Replace the two lines above with this one:
thisSurface = OBJ_NEW('ORB',Color=[255,255,0])
Walla! Behold, a rotating sphere!!
I'll leave the topographic map part to you. :-)
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|