Re: 3d sphere revisited [message #33459] |
Tue, 31 December 2002 09:39  |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
"paul wisehart" <paul_wisehart@ssaihq.com> wrote
>> "Overplotting" the sphere. Create additional IDLgrPolyon or
IDLgrPolyline
>> objects with verticies whose radius values are slightly larger than your
>> sphere such that they appear to float on the surface of the sphere. An
>> example would be creating an IDLgrPolygon object of the continents. You
>> could add IDLgrPolyline objects representing rivers, roads, borders....
Use
>> shape and .dxf files to get this data into IDL.
>
> THAT is exactly what I would like to do. Can you elaborate on how
> i could set up these IDLgrPolygon 'continents'?
> Or, maybe theres an example program I could look at?
I remember bringing this up in an earlier post of yours. You may want to go
back and see what I had to say. Basically you'll use CV_COORD to convert
spherical coordinates to rectangular coordinates which you can plot in OG.
Assuming you have a "flat" sphere, just set the radius value a wee bit
larger than your underlying sphere to get your objects to "float" on your
sphere. If you have added relief it gets trickier but can be done.
The texture on your sphere will be underneath your polygon objects which may
or may not be what you are looking for.
I mentioned .dxf and shape files since these are two relatively easy methods
to get complex geometry and connectivity data into IDL. I haven't worked
with shape files but I have imported .dxf files into IDL. It takes a bit of
work to get at the individual elements in the file so you can change their
properties but some of that is just learning how .dxf files work. Check out
XDXF.PRO and GET_DXF_OBJECTS.PRO.
I am sending a .dxf file of the continents to you directly. To get
something going right away you can use GET_DXF_OBJECTS() and xobjview.
model=GET_DXF_OBJECTS('continents.dxf')
xobjview, model
Be aware that the actual data coordinates will probably be *way* off so you
will need to scale either the continents or your sphere to get the desired
effect. To get at the actual IDLgrPolygon objects, use the GET method of
the IDLgrModel returned by GET_DXF_OBJECTS (there seems to be only one in
this case).
-Rick
|
|
|