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 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Supose this... [message #54142] Fri, 25 May 2007 07:13 Go to next message
KRDean is currently offline  KRDean
Messages: 69
Registered: July 2006
Member
How about the new IDLgrShader Objects in IDL 6.4.

It supports the OpenGL Shading Language, which has plenty of
White, Red, Green, and Orange Books to get you started.

Kelly Dean
Fort Collins



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?
>
> Just thinking out loud. :-)
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Supose this... [message #54156 is a reply to message #54142] Thu, 24 May 2007 16:20 Go to previous messageGo to next 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
Re: Supose this... [message #54158 is a reply to message #54156] Thu, 24 May 2007 15:34 Go to previous messageGo to next message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
Ahhh, the pimento problem. Makes me think of that little bit with Nigel
Tufnel complaining about the deli tray before the show in Cleveland...
(http://www.imdb.com/title/tt0088258/) I'm still waiting for a renderer
that provides z-order independent alpha blending but until then you
certainly can do this.

If you are simply going to be rotating the globe (similar to my
camdemo_examine program) you can cheat, the semi-opaque earth surface
doesn't have to be transformed. Just transform the coastlines, cities,
and your mace.

You can actually cheat for a number of cases but if you *really* need to
rotate the earth orb you'll need to slice your outer orb up into 4
quarters using MESH_CLIP (Your task is easier since you'll not be
texturing your outer globe.) Then you dynamically order the quarters so
the proper rendering order is maintained.

-Rick

David Fanning 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?
>
> Just thinking out loud. :-)
>
> Cheers,
>
> David
Re: Supose this... [message #54160 is a reply to message #54158] Thu, 24 May 2007 14:58 Go to previous messageGo to next message
cgguido is currently offline  cgguido
Messages: 195
Registered: August 2005
Senior Member
On May 24, 3:56 pm, hradilv <hrad...@yahoo.com> wrote:
>
> How about POVRay?


yeah, though POV-ray is slow and non interactive in comparison to
VRML. Of course if you want super realistic/detailed images, then it's
a good option.

Gianguido
Re: Supose this... [message #54168 is a reply to message #54160] Thu, 24 May 2007 12:56 Go to previous messageGo to next message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On May 24, 12:38 pm, 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?
>
> Just thinking out loud. :-)
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

How about POVRay?
Re: Supose this... [message #54170 is a reply to message #54168] Thu, 24 May 2007 12:14 Go to previous messageGo to next message
cgguido is currently offline  cgguido
Messages: 195
Registered: August 2005
Senior Member
On May 24, 1:38 pm, 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?
>



I have only started playing around with it, but perhaps VRML (virtual
reality markup language) could do the trick...

Don't have any particularly insightful links to share beyond the first
few hits on g00gle though :-(

Gianguido

PS: Let us know what you find out about it! Sounds interesting!
Re: Supose this... [message #54229 is a reply to message #54142] Fri, 25 May 2007 12:09 Go to previous message
warner.pete is currently offline  warner.pete
Messages: 4
Registered: May 2007
Junior Member
On May 25, 9:13 am, kBob <KRD...@gmail.com> wrote:
> How about the new IDLgrShader Objects in IDL 6.4.
>
> It supports the OpenGL Shading Language, which has plenty of
> White, Red, Green, and Orange Books to get you started.
>
> Kelly Dean
> Fort Collins
>
> 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?
>
>> Just thinking out loud. :-)
>
>> Cheers,
>
>> David
>> --
>> David Fanning, Ph.D.
>> Fanning Software Consulting, Inc.
>> Coyote's Guide to IDL Programming:http://www.dfanning.com/
>> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

Hurray, an opportunity to link back to what I consider my most useful
post:
http://tinyurl.com/27h4fl

That contains some code that should create a wireframe globe of the
continents. I've used it with a solid sphere with a slightly smaller
diameter to create a functional globe model. It was my first object
graphics project though and I'm sure there are better ways to do it.
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Wed Oct 08 13:49:24 PDT 2025

Total time taken to generate the page: 0.00669 seconds