pro animate, xwsize, ywsize ; ; proceedure to animate stereocilia line drawings ; read, 'Enter the number of frames', nframes read, 'Enter the starting rotations (x, y, z)', axs, ays, azs read, 'Enter the final rotations (x, y, z)', axf, ayf, azf read, 'Enter the original scale', scales read, 'Enter the final scale', scalef read, 'Enter 1 for shaded, 0 for line drawn', lors ; openw, 3, 'rotate.byt' p = assoc(3, bytarr(xwsize, ywsize)) ; ; loop over every frame, updating rotations and scale ; for i = 0, nframes-1 do begin ax = axs + (axs - axf)/(nframes-1)*i ay = ays + (ays - ayf)/(nframes-1)*i az = azs + (azs - azf)/(nframes-1)*i scale = scales + (scales - scalef)/(nframes-1)*i if lors eq 0 then begin lines, ax, ay, az, scale, xwsize, ywsize endif else begin shade, ax, ay, az, xwsize, ywsize endelse p(i) = tvrd(0, 0, xwsize, ywsize) endfor close, 3 return end