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

Home » Public Forums » archive » Re: Spherical Surface Plot w/ fsc_surface from David Fanning (:
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: Spherical Surface Plot w/ fsc_surface from David Fanning (: [message #61427] Thu, 17 July 2008 08:59 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
humanumbrella@gmail.com writes:

> I am expecting to see something bumpy. What I'm doing here is having
> a set radius (r), and then adding to it what is in the dataset at
> [lat,long] -- meaning some will be high and some will be low.

Humm. Well, in that case, I'm waiting to see what kind of
answers you get, too. :-)

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: Spherical Surface Plot w/ fsc_surface from David Fanning (: [message #61428 is a reply to message #61427] Thu, 17 July 2008 08:57 Go to previous messageGo to next message
humanumbrella is currently offline  humanumbrella
Messages: 52
Registered: June 2008
Member
On Jul 17, 11:52 am, David Fanning <n...@dfanning.com> wrote:
> Justin writes:
>> Should I try to go about using volume for this spherical surface
>> plot ?
>
> I think I would try, as a first shot at this, mapping your
> surface data onto a circular polygon (maybe the ORB object)
> as a texture map.
>
> Do you expect to see a sphere or a bumpy spheroid?
>
> 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.")

Hello David,

Thanks for the quick response.

I am expecting to see something bumpy. What I'm doing here is having
a set radius (r), and then adding to it what is in the dataset at
[lat,long] -- meaning some will be high and some will be low.

Cheers,
--Justin
Re: Spherical Surface Plot w/ fsc_surface from David Fanning (: [message #61429 is a reply to message #61428] Thu, 17 July 2008 08:52 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Justin writes:

> Should I try to go about using volume for this spherical surface
> plot ?

I think I would try, as a first shot at this, mapping your
surface data onto a circular polygon (maybe the ORB object)
as a texture map.

Do you expect to see a sphere or a bumpy spheroid?

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: Spherical Surface Plot w/ fsc_surface from David Fanning (: [message #61483 is a reply to message #61427] Fri, 18 July 2008 07:06 Go to previous message
Andrew Cool is currently offline  Andrew Cool
Messages: 219
Registered: January 1996
Senior Member
On Jul 18, 12:59 am, David Fanning <n...@dfanning.com> wrote:
> humanumbre...@gmail.com writes:
>> I am expecting to see something bumpy. What I'm doing here is having
>> a set radius (r), and then adding to it what is in the dataset at
>> [lat,long] -- meaning some will be high and some will be low.
>
> Humm. Well, in that case, I'm waiting to see what kind of
> answers you get, too. :-)
>
> 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.")


Hi guys,

Here's an adaption of some code that I think originally came from
someone inside RSI long ago - I forget just who it was.

Cheers,

Andrew


PRO DEM_Globe_1

device,decomp=0


dem_file = 'C:\Program Files\ITT\IDL64\examples\data\worldelv.dat'
dem_extract = bytarr(360,360)
openr,lun,dem_file,/get
readu,lun,dem_extract
free_lun,lun


worldelvsize = [4320,2160]

; worldelvImage = TEMPORARY(BYTSCL(CONGRID(world,worldelvsize(0)/
10.0,worldelvsize(1)/10.0)))

loadct,3

oPalette = OBJ_NEW('IDLgrPalette')
oPalette -> LoadCT, file=colour_table,3

; Scale image values to the earth radius. Multiple
; scaling by 50 to exaggerate elevation.

; worldelvImage = 50.*1.77*(worldelvImage/255.)
worldelvImage = 50.*1.77*(dem_extract/255.)

; Add the earth's radius to the image. The image only
; contains elevation information from the deepest parts
; of the oceans. The earth's radius is added to obtain
; a sphere with small changes in elevation on its
; surface.


radii = worldelvImage + REPLICATE(1275.6,
worldelvsize(0),worldelvsize(1))

; Derive a mesh from the exaggerated image data and the
; radius of the earth.

MESH_OBJ, 4, vertices, connectivity, radii, /CLOSED

; Initialize a model to display.

oModel = OBJ_NEW('IDLgrModel')

; Determine the radius of each vertex to provide color
; at each vertex.

sphericalCoordinates = CV_COORD(FROM_RECT = vertices, $
/TO_SPHERE)
elevation = REFORM(sphericalCoordinates[2, *], $
N_ELEMENTS(sphericalCoordinates[2, *]))

; Initialize polygon to contain mesh.

oPolygon = OBJ_NEW('IDLgrPolygon', vertices, $
POLYGONS = connectivity, SHADING = 1, $
VERT_COLORS = BYTSCL(elevation), $
PALETTE = oPalette)

; Add polygon to model.
oModel -> Add, oPolygon
; Rotate model to place view at 0 degrees latitude.
oModel -> Rotate, [1., 0., 0.], -90.

; Display model.
XOBJVIEW, oModel, /BLOCK, SCALE = 1, $
TITLE = 'Exaggerated Earth Elevation'

; gotta comment this out or image doesn't appear - must be a change in
keyword effects since this code was written?
;;OBJ_DESTROY, [oModel, oPalette]
END
Re: Spherical Surface Plot w/ fsc_surface from David Fanning (: [message #61502 is a reply to message #61427] Thu, 17 July 2008 13:15 Go to previous message
humanumbrella is currently offline  humanumbrella
Messages: 52
Registered: June 2008
Member
On Jul 17, 11:59 am, David Fanning <n...@dfanning.com> wrote:
> humanumbre...@gmail.com writes:
>> I am expecting to see something bumpy.  What I'm doing here is having
>> a set radius (r), and then adding to it what is in the dataset at
>> [lat,long] -- meaning some will be high and some will be low.
>
> Humm. Well, in that case, I'm waiting to see what kind of
> answers you get, too. :-)
>
> 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.")

Well,

Maybe everyone is just as stumped as I am on this one. plotting
spherical data in cartesian space is no fun.

Maybe if someone could show an example of how to say, plot a spherical
surface in IDLGRSURFACE [forgetting what I've said above] ???
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Help with Spawn
Next Topic: Re: edit .sav file

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

Current Time: Wed Oct 08 17:06:54 PDT 2025

Total time taken to generate the page: 0.00669 seconds