Re: saving mpeg is very slow [message #54257] |
Thu, 31 May 2007 10:45 |
Vince Hradil
Messages: 574 Registered: December 1999
|
Senior Member |
|
|
On May 31, 11:47 am, kostis <kostis...@gmail.com> wrote:
> I try to save a movie of a trajectory using the following routine..
> Since IDL plots every frame on my screen the whole thing is EXTREMELY
> slow.. How can i do this without viewing each frame on my screen? I
> think this is done with Z buffer but i dont know how to include this
> in my routine:
>
> ; number of frames
> nfr=100
> ; spatial size
> xsize=200
> ysize=200
>
> ; open mpeg
> mpegID=MPEG_OPEN([xsize,ysize])
>
> ; loop over frames
> img_dummy=fltarr(10,10)
> SURFACE, img_dummy,$
> xstyle=1,ystyle=1,xrange=[-60.0e-7,60.0e-7],yrange=[-60.0e-7 ,0.0],$
> ZAXIS=3,zrange=[0.0,10.0e-5],zst=1,ax=20,az=10,/SAVE,/NODATA
>
> for j=1,nfr do begin
> plots, x((j-1)*10:j*10), y((j-1)*10:j*10), z((j-1)*10:j*10),$
> /T3D,/DATA,Thick=2
> ; add the plot to mpeg
> MPEG_PUT,mpegID,WINDOW=0,FRAME=j-1,order=1
> endfor
>
> ; save movie and close the file
> MPEG_SAVE,mpegID,FILENAME='movie.mpg'
> MPEG_CLOSE,mpegID
Have you looked in the documentation? How about: set_plot, 'Z'
|
|
|