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

Home » Public Forums » archive » Re: Supose this...
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Supose this... [message #54156 is a reply to message #54142] Thu, 24 May 2007 16:20 Go to previous messageGo to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On May 24, 11:38 am, David Fanning <n...@dfanning.com> wrote:
> Folks,
>
> Alright, suppose this.
>
> Suppose I wanted to build a 3D transparent globe, with
> continental outlines, major cities, etc. displayed on it.
> And suppose I wanted to stick a sphere in the center of
> the globe with pointy bits sticking out of it. (Think of
> of those medieval weapons that the Visigoths swung from a chain to
> bash in the skulls of their enemies.) I'd like to see where the
> pointy bits stick out of the globe. (Please don't ask
> me why.)
>
> Would IDL be the software you would use to do this?
> Would I run into the "pimento problem" with the back
> side of the globe?

How about:

interiorSphere = obj_new('orb', radius=0.1, $
alpha_channel=0.5, $
color=[255, 0, 0])
globe = obj_new('orb', radius=0.2, $
alpha_channel=0.2, $
color=[0, 0, 255])

vertices1 = [[0, 0, 0], [0, 0, 0.1], [0.3, 0, 0]]
polygons1 = [3, 0, 1, 2]
spike1 = obj_new('idlgrpolygon', vertices1, $
polygons=polygons1, $
alpha_channel=0.5, $
color=[0, 255, 0])

vertices2 = [[0, 0, 0], [0, 0, 0.1], [0.212, 0.212, 0]]
polygons2 = [3, 0, 1, 2]
spike2 = obj_new('idlgrpolygon', vertices2, $
polygons=polygons2, $
alpha_channel=0.5, $
color=[0, 255, 0])

omodel = obj_new('idlgrmodel')
omodel->add, interiorSphere
omodel->add, spike1
omodel->add, spike2
omodel->add, globe
xobjview, omodel

I think if "globe" where the only transparent object it would be
pretty good.

By the way, I've been impressed with VTK. For something similar to
your problem, how about these two shots:

http://michaelgalloy.com/wp-content/uploads/2007/05/vtk-left .png
http://michaelgalloy.com/wp-content/uploads/2007/05/vtk-righ t.png

These are screenshots from an interactive trackball-type application
and I'm not doing any manual sorting of polygons. (Yes, POV-Ray is
awesome, but it takes me a while to everything setup just right and
it's definitely not interactive.)

Mike
--
michaelgalloy.com
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Alternatives to griddata()
Next Topic: Using colorbar with multiple plots and !p.multi

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

Current Time: Fri Oct 10 02:25:16 PDT 2025

Total time taken to generate the page: 0.87826 seconds