Re: Plot sphere and ellipsoid(oblate,prolate,triaxial) by object graphics [message #47798] |
Tue, 07 March 2006 09:28  |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
Danis wrote:
> I want to draw these figure using by object graphics.
>
> I'm not familiar with object graphics.
>
> Is there anyone to show me the example code?
Before you do anything you may want to invest in a good book. Ronn
Kling's Power Graphics with IDL is a good place to start. You can buy
it from his website www.kilvarock.com. Now while you're waiting for
that to be delivered...
Read the IDL docs on object graphics. Start at the beginning.
Then make a copy of orb__define.pro and play around with it, along with
Antonio's examples. I also offer my RHTgrPSolid object which implements
platonic solids in IDL OG. It might be the best place to start since
the objects are pretty simple:
www.acoustics.washington.edu\~towler\programs\rhtgrpsolid__d efine.pro
And you'll definitely want to use xobjview. This little gem deals with
all of the view setup so all you need to do is create an object to display.
IDL> orb=OBJ_NEW('orb', COLOR=[200,75,75], STYLE=2)
IDL> xobjview, orb
Now change some of the properties:
IDL> orb->setproperty, STYLE=1
(click on the XOBJVIEW window to update it)
IDL> orb->setproperty, DENSITY=5.
(click on the XOBJVIEW window to update it)
IDL> orb->setproperty, DENSITY=0.5
(click on the XOBJVIEW window to update it)
IDL> orb->setproperty, COLOR=[50,50,250]
(click on the XOBJVIEW window to update it)
Now destroy the object.
IDL> obj_destroy, orb
Have fun!
-Rick
|
|
|
|
|
|
|