how to animate/loop plots (not images) [message #6815] |
Wed, 28 August 1996 00:00  |
demott
Messages: 8 Registered: June 1996
|
Junior Member |
|
|
I have a series of simple 2D line plots that I would like to animate.
I'm currently writing the plots to a postscript file, and then using
some external applications to convert them to (unfortunately large)
tiff files and then loop them. Is there a simpler way to do this in
IDL? The manuals talk about how to loop a series of images stored
in a single array, but this isn't what I'm dealing with.
Thanks for any insight on this problem.
Charlotte
demott@olympic.atmos.colostate.edu
|
|
|
Re: how to animate/loop plots (not images) [message #6922 is a reply to message #6815] |
Fri, 30 August 1996 00:00  |
peter
Messages: 80 Registered: February 1994
|
Member |
|
|
Thorsten Becker (becker@geophysik.uni-frankfurt.de) wrote:
: Robert Moss wrote:
: >
: > Charlotte DeMott wrote:
: > >
: > > I have a series of simple 2D line plots that I would like to animate.
: > > I'm currently writing the plots to a postscript file, and then using
: > > some external applications to convert them to (unfortunately large)
: > > tiff files and then loop them. Is there a simpler way to do this in
: > > IDL? The manuals talk about how to loop a series of images stored
: > > in a single array, but this isn't what I'm dealing with.
: > >
: > > Thanks for any insight on this problem.
: > >
: > > Charlotte
: > > demott@olympic.atmos.colostate.edu
: >
: > You can use XINTERANIMATE to do this. The trick is to plot your
: > images to a pixmap, then use TVRD to get the pixmap and load it
: > into XINTERANIMATE.
: >
: Take care using xinteranimate/xanimate if you have a lot of plots to
: combine. It is very memory consuming and may cause your (small) system's
: X11 to crash. (Did it with a 250 images 500x500 picture on a 32MB
: PowerPC running AIX.) Works fine on a big machine. Another way would be
: to convert your Postscript files using a shell script and gs. Or save as
: a tiff/gif from IDL, whatever. After that use special tools to produce
: GIF-animation (e.g. gifmerge) or MPEGs. This has the advantage of being
: more "exportable".
If they are simple plots, then just plot them. IDL is fast enough to
plot many frames a second of simple graphics. More often you'll need to
slow it down than speed it up. For slightly smoother graphics, maybe
plot to a hidden pixmap and then copy it to the screen window.
Peter
|
|
|
|
Re: how to animate/loop plots (not images) [message #6937 is a reply to message #6815] |
Fri, 30 August 1996 00:00  |
Thorsten Becker
Messages: 1 Registered: August 1996
|
Junior Member |
|
|
Robert Moss wrote:
>
> Charlotte DeMott wrote:
>>
>> I have a series of simple 2D line plots that I would like to animate.
>> I'm currently writing the plots to a postscript file, and then using
>> some external applications to convert them to (unfortunately large)
>> tiff files and then loop them. Is there a simpler way to do this in
>> IDL? The manuals talk about how to loop a series of images stored
>> in a single array, but this isn't what I'm dealing with.
>>
>> Thanks for any insight on this problem.
>>
>> Charlotte
>> demott@olympic.atmos.colostate.edu
>
> You can use XINTERANIMATE to do this. The trick is to plot your
> images to a pixmap, then use TVRD to get the pixmap and load it
> into XINTERANIMATE.
>
> XINTERANIMATE, SET=[256,256,10] ;SAY YOU HAVE 10 PLOTS
> WINDOW, /FREE, /PIXMAP, XSIZE=256, YSIZE=256
> FOR I=0,9 DO BEGIN
> PLOT, X, Y ;DO YOUR 10 PLOTS HERE AS YOU SEE FIT
> XINTERANIMATE, FRAME = I, IMAGE = TVRD()
> ENDFOR
> XINTERANIMATE, /KEEP_PIXMAPS
>
> Of course these plots will have screen resolution, but since
> your displaying it on the screen that shouldn't be a problem
>
Take care using xinteranimate/xanimate if you have a lot of plots to
combine. It is very memory consuming and may cause your (small) system's
X11 to crash. (Did it with a 250 images 500x500 picture on a 32MB
PowerPC running AIX.) Works fine on a big machine. Another way would be
to convert your Postscript files using a shell script and gs. Or save as
a tiff/gif from IDL, whatever. After that use special tools to produce
GIF-animation (e.g. gifmerge) or MPEGs. This has the advantage of being
more "exportable".
Thorsten
_Thorsten Becker ___________________thbecker@rz.uni-frankfurt.de
IMGF Frankfurt/Main becker@geophysik.uni-frankfurt.de
For further info:
finger becker@geo21.geophysik.uni-frankfurt.de
|
|
|
Re: how to animate/loop plots (not images) [message #6945 is a reply to message #6815] |
Thu, 29 August 1996 00:00  |
Liam Gumley
Messages: 473 Registered: November 1994
|
Senior Member |
|
|
Charlotte DeMott wrote:
> I have a series of simple 2D line plots that I would like to animate.
> I'm currently writing the plots to a postscript file, and then using
> some external applications to convert them to (unfortunately large)
> tiff files and then loop them. Is there a simpler way to do this in
> IDL? The manuals talk about how to loop a series of images stored
> in a single array, but this isn't what I'm dealing with.
Check out the frame tools page at
http://cimss.ssec.wisc.edu/~gumley/frame.html
You can set up a series of graphics frames (as many as you want), and
create a plot in each frame, and then loop through them. e.g.
fset
x=sin(findgen(10))
plot,x,sin(x)
af
plot,x,cos(x)
af
plot,x,sin(x)^2
af
plot,x,cos(x)^2
lf
Cheers,
Liam.
|
|
|
Re: how to animate/loop plots (not images) [message #6947 is a reply to message #6815] |
Thu, 29 August 1996 00:00  |
Robert Moss
Messages: 74 Registered: February 1996
|
Member |
|
|
Charlotte DeMott wrote:
>
> I have a series of simple 2D line plots that I would like to animate.
> I'm currently writing the plots to a postscript file, and then using
> some external applications to convert them to (unfortunately large)
> tiff files and then loop them. Is there a simpler way to do this in
> IDL? The manuals talk about how to loop a series of images stored
> in a single array, but this isn't what I'm dealing with.
>
> Thanks for any insight on this problem.
>
> Charlotte
> demott@olympic.atmos.colostate.edu
You can use XINTERANIMATE to do this. The trick is to plot your
images to a pixmap, then use TVRD to get the pixmap and load it
into XINTERANIMATE.
XINTERANIMATE, SET=[256,256,10] ;SAY YOU HAVE 10 PLOTS
WINDOW, /FREE, /PIXMAP, XSIZE=256, YSIZE=256
FOR I=0,9 DO BEGIN
PLOT, X, Y ;DO YOUR 10 PLOTS HERE AS YOU SEE FIT
XINTERANIMATE, FRAME = I, IMAGE = TVRD()
ENDFOR
XINTERANIMATE, /KEEP_PIXMAPS
Of course these plots will have screen resolution, but since
your displaying it on the screen that shouldn't be a problem
--
Robert M. Moss, Ph.D. - mossrm@texaco.com - FAX (713)954-6911
------------------------------------------------------------ -----
This does not necessarily reflect the opinions of Texaco Inc.
|
|
|