Re: Adaptation of surf_track for viewing earthquakes in 3 dimensions [message #31455 is a reply to message #31435] |
Thu, 11 July 2002 08:47  |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
"Thomas Wright" <twright@usgs.gov> wrote
>
> 1.IDL seems peculiarly unsuited for use with 3-dimensional point data.
> I have no need of connecting earthquakes, contouring surfaces, or
> otherwise looking at them other than as points in x-y-z space. I had
> expected to be able to freely configure symbol size, symbol shape and
> color to represent different earthquake parameters such as magnitude,
> depth, time intervals or other user-defined classification parameters.
> But none of the IDLgr routines allows this.
Sheesh. You can't expect IDL to do everything out of the box...
OG atoms although useful in their own right are really meant to act as
building blocks for user defined objects. You could easily create an object
which is a subclass of the IDLgrModel object which contains an instance of
IDLgrPolyline and IDLgrSymbol. Call it quakeSymbol__define.pro. It could
take magnitude and location as parameters and pass color and symbol data to
your symbol object (or you could define all sorts of symbols in your object
to represent depth, time or whatnot and use your own keyword to select the
symbol). Magnitude could map to the symbol's size property and location
would position your single point IDLgrPolyline object in space. But then
again, maybe someone has already done this.
> It would be very useful to have the rotation parameters written on the
> screen (or included in one of the "other options" buttons) while
> rotating the image using the mouse.
Surf_track uses the trackball to generate the transform matricies. The
trackball (as far as I know, it has been a while) doesn't store it's
orientation as pitch, yaw, and roll so there is no way to display the
orientation in a intuitive form. If you are really into surf_track as your
base program then your only hope is to search for the "matrix and quaternion
faq" and look for some code to convert your transform matrix into PYR
values. I seem to remember running into a few issues playing around with
this but maybe you will have better luck.
You may want to look into my camera__define object. I do have an example
program which is similar to surf_track in that the camera rotates about the
origin plus it allows you to zoom in and out and it displays the orientation
(it is a virtual globe). Let me know if you are interested and I will send
you the files.
Also, if you are working with IDL on win32 I suggest ditching MPEG and
looking into IDL2avi from Ronn Kling's website:
http://www.kilvarock.com/freesoftware/dlms/avi.htm
In conjunction with the Intel Indeo 5 codec (www.lygos.com) it makes for a
powerful and simple animation export tool.
-Rick
|
|
|