pro twirl, rotate=rotate, scale=scale, perspective=perspective @compile_opt.pro ; On error, return to caller ;+ ; NAME: ; twirl ; PURPOSE: ; Rotating relative to normal coordinates [0.5,0.5,0.5] (center ; of display rather than the origin [0,0,0] ; CALLING SEQUENCE: ; twirl, rotate=rotate ; INPUTS: ; rotate 3 element vector ; PROCEDURE: ; Translates center to origin, rotates, and translates back to center ; MODIFICATION HISTORY: ; MAR-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ;- ddoff = 0.5*[1.,1.,1.] if n_elements(rotate) ne 3 then rotate = [0,0,0] if n_elements(scale ) ne 3 then scale = [1,1,1] t3d, transl = -ddoff t3d, rotate = rotate t3d, scale = scale t3d, perspective = perspective t3d, transl = ddoff return & end