Wow! Thank you very much...by the way...I have found your book as a
very nice tool to learn!
I have more questions for you, if you don't mind...
1. I think I will need the loop to get the output images and insert
them in the animation. The output images are produced from the flow3
procedure.
Here is the code that I have been writting, but I don't know why it
does not run at all, and it also does not show any error message.
(note:I have the flow3.pro, the data files and my code in the same
folder.)
2. I would love to have an output window as the result that show in
one of your procedures: fsc_surface. Meaning, that I could be able to
rotate and zoom in the image. However, this is not a surface! Do you
have any procedure that could do this for my images? This will be
nicer than drawing a 3-D cube by myself. I tried the zoom command but
it does not look nice either. And I tried the rotate keywords, but I
have to change them every time and sort of guessing the angles....
This message was long! Sorry for the inconvenience, and I thank you
very much in advance if you can give me some advice, expert!
Kind regards,
Mary T.
;there are several files that contain velocity results at different
number of iterations. The purpose of the animation is to show how the
vectors look at different number of iterations:
Filename=Dialog_Pickfile(filter='*.out',/read,/multiple)
For j=0,numFiles-1 DO BEGIN
openR,lun,Files[j],/Get_Lun
A=fltarr(7,49L*49L*5L) ;create arrays to hold data in files
ReadU,lun,data
Free_Lun,lun
;create 3 dimensional arrays to hold vector data.
;the indices will be Velocity(x,y,z)
U=fltarr(49L,49L,5L)
V=fltarr(49L,49L,5L)
W=fltarr(49L,49L,5L)
For i = 0L, 12004L Do Begin
U(A(0,i)-1,A(1,i)-1,A(2,i)-1) = A(3,i)
V(A(0,i)-1,A(1,i)-1,A(2,i)-1) = A(4,i)
W(A(0,i)-1,A(1,i)-1,A(2,i)-1) = A(5,i)
Endfor
window,j,XSIZE=400, YSIZE=500, TITLE='IDLgrWindow[j]'
Scale3, xr=[0,50],yr=[0,50],zr=[50,0],AX=50, AZ=50
Flow3, Vx, Vy, Vz,$
SX=posx,SY=posy,SZ=posz, $
ARROWSIZE=.0100
;plots a cubical shape, vectors should appear inside this cube
PLOTS, [0,50], [0,0], [0,0], /T3D,color=200,line=9
PLOTS, [0,0], [0,50], [0,0], /T3D,color=200,line=9
PLOTS, [0,0], [0,0], [0,32], /T3D,color=200
PLOTS, [0,50], [0,0], [32,32], /T3D,color=200
PLOTS, [0,50], [50,50], [32,32], /T3D,color=200
PLOTS, [0,0], [50,50], [32,0], /T3D,color=200
PLOTS, [50,50], [50,0], [0,0], /T3D,color=200
PLOTS, [50,0], [50,50], [0,0], /T3D,color=200
PLOTS, [50,50], [50,50], [0,32], /T3D,color=200
PLOTS, [50,50], [0,0], [32,0], /T3D,color=200
PLOTS, [50,50], [50,0], [32,32], /T3D,color=200
PLOTS, [50,50], [50,0], [32,32], /T3D,color=200
PLOTS, [0,0], [0,50], [32,32], /T3D,color=200
XInterAnimate, Set=[400,500,3],/Showload
XInteranimate,Frame=j,Window=j
XInteranimate,50
Endfor
End
|