pro lines, ax, ay, az, scale, xwsize, ywsize ; ; proceedure to plot stereocilia as lines ; ; passed values: ax - rotation around x axis ; ay - rotation around y axis ; az - rotation around z axis ; scale - scaled deflection factor ; xwsize - size of window in x direction ; ywsize - size of window in y direction ; openr, 1, 'lin.dat' ; open the file with line data readf, 1, numster ; read the number of stereocilia numnod = intarr(numster) ; set up an array to hold the number readf, 1, numnod ; of nodes per stereocilia and read in ; that information x0 = fltarr(numster) ; read in the x and z coordinates readf, 1, x0 ; for each stereocilia z0 = fltarr(numster) readf, 1, z0 readf, 1, minx, miny, minz, $ ; get the maximum and minimum values maxx, maxy, maxz ; for all directions window, 1, xsize=xwsize, $ ; set up a window to display data into ysize=ywsize center_view, Ax = ax, Ay = ay, $ ; sets up 3-D coordinate transformation Az = Az, $ ; using passed rotation angles and Winx = xwsize, $ ; window size. Winy = ywsize, $ ; Xr = [minx, maxx], $ ; use read values of max and min values Yr = [miny, maxy], $ ; to help scale Zr = [minz, maxz], $ ; Zoom = 0.8 ; reduce size to 80% ZAxis = 2 ; variable to put Z axis in right corner surface, findgen(2,2), /nodata, $ ; call surface to set up 3-D coordinate /save, /T3d, /Zaxis, $ ; system. Keywords used to show no data, /data, XTitle = 'X', $ ; save image, use 3-d transform, show z axis YTitle='Y', ZTitle='Z',$ ; Label axis as X, Y, and Z Xrange = [-4, 0], $ ; Set ranges to plausible values (for more Yrange = [0,10], $ ; general cases automate this...) Zrange = [-2,2] for i = 0, numster - 1 do begin ; for each individual stereocilia y0 = fltarr(numnod(i)) ; redimension arrays for y node position dx = fltarr(numnod(i)) ; '' '' x deflection dy = fltarr(numnod(i)) ; '' '' y deflection dz = fltarr(numnod(i)) ; '' '' z deflection x = fltarr(numnod(i)) ; '' '' x position y = fltarr(numnod(i)) ; '' '' x position z = fltarr(numnod(i)) ; '' '' x position readf, 1, y0 readf, 1, dx ; read values from file readf, 1, dy readf, 1, dz for j = 0, numnod(i) - 1 do begin ; compute positions after deflection x(j) = x0(i) + scale*dx(j) y(j) = y0(j) + scale*dy(j) z(j) = z0(i) + scale*dz(j) endfor plots, x, y, z, /T3D, /data ; plot each stereocilia endfor close, 1 return end