Re: Animation [message #9799 is a reply to message #5497] |
Wed, 20 August 1997 00:00   |
Armand J. L. Jongen
Messages: 9 Registered: April 1997
|
Junior Member |
|
|
Neil Winrow wrote:
>
> Can anyone give me any advice?
> I am trying to Animate a set of surface plots. Each surface plot
> represents the output from a data file. The set of plots represent flux
> at different photon energy, and my boss would like a small animation as
> the photon energies increase. I can read each of the data files into the
> program to display individally, but how can I animate the sequence,
> using the XINTERANIMATE etc. Any advice would be greatly appreicated.
>
> Many Thanks
>
> Neil
I tried something simular a few days ago. You should make use of the
WINDOW keyword in XinterAnimate. This copies the entire contents of an
existing window to a frame for the animation. Here a short example where
I assume the ImageSeq is a 3D matrix containing the sequential data.
************************************************************ ******************
Pro Animate
Z=100 ;Number of images
Window, /Free, xs=300, ys=300 ;Create a window to hold the image in.
;You could set the /PixMap here to not even
;show the window.
WinID = !D.Window ;Get the ID of this Window
Xinteranimate, Set=[300,300,Z] ;Setup Xinteranimate. The 300 here
should ;correspond with the x and y size of WinID
For I=0, Z-1, 1 do Begin ;Start the loop
Wset, WinID ;Make WinID active. Not really necessary in ;this
example.
; Create a shaded surfaceplot which will be displayed in the active
Window.
; You can of course put here any plot or image that can be dislayed in a
Win.
shade_surf, ImageSeq(*,*,i), shades=ImageSeq(*,*,i),$
AZ=300, xstyle=4, ys=4, zs=4, Zrange=[0,250]
;Load the complete contents of the window in Xinteranimate.
Xinteranimate, Frame=i, Window=WinID
endfor ; End of the loading loop
Xinteranimate, /Keep_Pixmaps ;Show the animation and keep the images
for ;further use.
END ; of Animate
************************************************************ ******************
Hope this gets you on the way. It made my boss enthousiastic to see the
animation so I hope it will make yours also jump. Be sure to use fancy
colors!:-)
Greetings, Armand.
--
************************************************************ ************
Armand Jongen Academic Medical Centre
Laser Centre
Phone +31-20-5667418 \\||||// Meibergdreef 9
Fax +31-20-6975594 | ~ ~ | 1105 AZ Amsterdam
E-mail a.j.jongen@amc.uva.nl [| o o |] The Netherlands
*****************************o00o***(__)***o00o************* ************
|
|
|