Re: Cartesian IDLgrSurface of [theta,phi] data to a sphere?? [message #26463 is a reply to message #26267] |
Thu, 23 August 2001 13:23  |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
I picked up on this one a little late but this may be of some help.
I think David's idea will be the easiest way to go. I have played around
wrapping an earth image texture onto an orb and using my camera object to
rotate the orb. The advantage of using my camera object over IDL's
trackball is that you can get the pitch, yaw and roll of the camera which
you can convert into spherical coords. The trick is to get the image mapped
correctly. Since it is a pain to map an image on the orb I let the orb
generate my texcoords and just edit my image so it maps onto the orb
correctly. This is sort of bass ackwards but it was easier than calculating
the texcoords myself.
I actually started this as a demo for my camera object but I haven't
finished it. The program linked below maps a texture onto an orb, then
allows you to rotate the orb and returns Lat and Lon, sort of.... I never
finished the conversion from IDL's angular measures to Lat/Lon (yes, it is a
simple affair but I write these programs in my spare time and we know how
that goes).
First pick up the example program and texture:
http://www.acoustics.washington.edu/rht/programs/camdemo_exa mine.zip
You will also need my camera and quaternion objects:
http://www.acoustics.washington.edu/rht/3d_animation.html
Hope this helps.
-Rick Towler
<tbowers0@yahoo.com> wrote in message
news:fd12a3f3.0108101333.39acd297@posting.google.com...
> david@dfanning.com (David Fanning) wrote in message
news:<MPG.15ddaa84739ac966989e61@news.frii.com>...
>>
>> I'm not sure I totally understand this problem, but
>> wouldn't it be easier (and help with the mapping)
>> if you put the data on the sphere as a texture map?
>> That way you could use the Texture_Coord keyword to
>> position the data anywhere you like.
>>
>> Cheers,
>>
>> David
>
> Thanks David. I've never done this and did think about it, but I was
> hoping to be able to retain the 'awareness' of my data so that i could
> possibly add code that would allow me to say, mouse over a grid point
> and the value would popup. I can get teh data *on* the spherical grid
> ok (see eg code from last post), I'm just not getting the idea of how
> to get it to orient correctly. I've spent literally hours rotating and
> transforming, but no go. I'm missing something and thought maybe
> someone had some advice on it. My next option is to texture map which
> is new to me so probably another can o' worms to get it mapped
> correctly. Many, many thanks for your advice and time.
>
> todd
|
|
|