function alt_az(window_handle) % rotates the figure pointed to by window_handle to coordinates that % correspond to the relative position of the mouse and the window. % i.e. in the center, 0 altitude, 0 azimuth. Going up and down % changes the altitude, left and right changes the azimuth. %Eric Soroos %10-21-95 % wpos = [corner x, corner y, x size, y size] % pointer pos = [x,y] w_pos = get(window_handle,'position'); pointer_pos = get(0,'pointerlocation'); rel_location = (((pointer_pos(1:2) - w_pos(1:2))./ w_pos(3:4))-.5).*[360,190]; view(rel_location);