comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Plot sphere and ellipsoid(oblate,prolate,triaxial) by object graphics
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Plot sphere and ellipsoid(oblate,prolate,triaxial) by object graphics [message #47798] Tue, 07 March 2006 09:28 Go to next message
Rick Towler is currently offline  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
Re: Plot sphere and ellipsoid(oblate,prolate,triaxial) by object graphics [message #47807 is a reply to message #47798] Tue, 07 March 2006 05:12 Go to previous messageGo to next message
Antonio Santiago is currently offline  Antonio Santiago
Messages: 201
Registered: February 2004
Senior Member
Take a look at "orb::BuildPoly" method and to the documentation ;)

Also, here is an exmaple of Object Grpahics and the box is a polygon:

http://www.grahi.upc.edu/santiago/?p=20
(download from:
http://www.grahi.upc.edu/santiago/imdocs/idl/alpha_texture/a lpha_texture.tar.gz).


ungzip, untar, execute idl and write "@alpha.g" to exectue.

--
-----------------------------------------------------
Antonio Santiago P�rez
( email: santiago<<at>>grahi.upc.edu )
( www: http://www.grahi.upc.edu/santiago )
( www: http://asantiago.blogsite.org )
-----------------------------------------------------
GRAHI - Grup de Recerca Aplicada en Hidrometeorologia
Universitat Polit�cnica de Catalunya
-----------------------------------------------------
Re: Plot sphere and ellipsoid(oblate,prolate,triaxial) by object graphics [message #47808 is a reply to message #47807] Tue, 07 March 2006 04:48 Go to previous messageGo to next message
snfinder@naver.com is currently offline  snfinder@naver.com
Messages: 35
Registered: August 2005
Member
Thanks~ Antonio
Can you show me some example how to use IDLgrPolygon?
Actually I don't know object graphics at all.
Maybe I think I can calculate x,y,z coordinates of various ellipsoid.
And then how can I apply thses to object graphics?

Thank you in advance.
Re: Plot sphere and ellipsoid(oblate,prolate,triaxial) by object graphics [message #47809 is a reply to message #47808] Tue, 07 March 2006 02:47 Go to previous messageGo to next message
Antonio Santiago is currently offline  Antonio Santiago
Messages: 201
Registered: February 2004
Senior Member
Danis wrote:
> Hi all,
>
> 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?
>
> Thanks~
>
> Danis
>

If you can calculate the x.y.z coordenates and the connectivity among
verex, then you can draw it with IDLgrPolygon.
Take a look at "idl/examples/doc/objects/orb__define.pro". It draw a
sphere in the same way.

--
-----------------------------------------------------
Antonio Santiago P�rez
( email: santiago<<at>>grahi.upc.edu )
( www: http://www.grahi.upc.edu/santiago )
( www: http://asantiago.blogsite.org )
-----------------------------------------------------
GRAHI - Grup de Recerca Aplicada en Hidrometeorologia
Universitat Polit�cnica de Catalunya
-----------------------------------------------------
Re: Plot sphere and ellipsoid(oblate,prolate,triaxial) by object graphics [message #47885 is a reply to message #47798] Tue, 07 March 2006 18:41 Go to previous message
snfinder@naver.com is currently offline  snfinder@naver.com
Messages: 35
Registered: August 2005
Member
Thank both of you for helping me. ^^
It's a great help to me.
OK I start on buying the book..
Many thanks again.
May both of you be happy.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Interpolating a regular grid
Next Topic: Re: About REGRESS.pro

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:52:07 PDT 2025

Total time taken to generate the page: 0.00644 seconds