Re: Supose this... [message #54142] |
Fri, 25 May 2007 07:13  |
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   |
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   |
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 #54168 is a reply to message #54160] |
Thu, 24 May 2007 12:56   |
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 #54229 is a reply to message #54142] |
Fri, 25 May 2007 12:09  |
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.
|
|
|