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

Home » Public Forums » archive » spherical gridding
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
spherical gridding [message #21747] Sun, 17 September 2000 00:00 Go to previous message
Sylvain Carette is currently offline  Sylvain Carette
Messages: 19
Registered: May 2000
Junior Member
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Not sure if my understanding of spherical gridding correspond to the actual
implementation in TRIANGULATE and TRIGRID function and proc.
<br>Running the sample code below as surface give a sine shaped surface
while I was expecting a sphere.
<br>I figure that perhaps SURFACE only display "flat" surface and what
I see is a unwarped sphere (?).
<br>I though it would be better to feed the trigrid output to a polygon
as in IDLgrPolygon but now this one want xyz value while as far I can see
trigrid result is 2 dimentional array...
<br>What do I miss?
<p>My intend here is to project elevations grids onto wgs84 geoid but projecting
onto a perfect sphere will be just fine to begin with. If I'm unclear,
I need the final dem be patch of a sphere so that when putting all of them
together they form a globe and the cartesian space holding it have its
origin at the center of the globe.
<p>I've done once an autolisp function in Autocad doing this but the dem
have to be converted first to dxf in no more than 300x300 chunk and it
do not handle the case for dems that are not in long/lat proj. Very, very
big and slow...
<p>Here the sample code from TRIGRID example2 feeded to SURFACE:
<blockquote TYPE=CITE>
<pre>; Create some random longitude points:

lon = RANDOMU(seed, 50) * 360. - 180.
&nbsp;&nbsp;
; Create some random latitude points:
lat = RANDOMU(seed, 50) * 180. - 90.
&nbsp;&nbsp;
; Make a fake function value to be passed to FVALUE. The system&nbsp;
; variable !DTOR contains the conversion value for degrees to&nbsp;
; radians.
f = SIN(lon * !DTOR)^2 * COS(lat * !DTOR)
&nbsp;&nbsp;
; Perform a spherical triangulation:
TRIANGULATE, lon, lat, tr, $
&nbsp;&nbsp;&nbsp; SPHERE=s, FVALUE=f, /DEGREES
&nbsp;&nbsp;
; Perform a spherical triangulation using the values returned from&nbsp;

; TRIANGULATE. The result, r, is a 180 by 91 element array:
r=TRIGRID(f, SPHERE=s, [2.,2.],$
&nbsp;&nbsp; [-180.,-90.,178.,90.], /DEGREES)
surface, r

end</pre>
</blockquote>

<p><br>Any cues welcome thanks
<p>Sylvain Carette
<br>VRML designer-composer
<br>&nbsp;</html>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Source Code
Next Topic: Re: IDLWAVE and commenting out sections

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

Current Time: Wed Oct 08 11:53:26 PDT 2025

Total time taken to generate the page: 0.00807 seconds