File Exchange

image thumbnail

view3d.m

version 1.0 (3.44 KB) by

view3d Interactively rotate, zoom and pan the view of a 3-D plot

4.93333
15 Ratings

9 Downloads

Updated

View License

view3d Interactively rotate, zoom and pan the view of a 3-D plot
 
VIEW3D ROT turns on mouse-based 3-D rotation
VIEW3D ZOOM turns on mouse-based 3-D zoom and pan
VIEW3D OFF turns it off
 
VIEW3D(FIG,...) works on the figure FIG
 
Double click to restore the original view
 
- hit 'z' key over the figure to switch from ROT to ZOOM
- hit 'r' key over the figure to switch from ZOOM to ROT
 
in ROT mode:
- press and hold left mouse button to rotate about screen xy axis
- press and hold middle mouse button to rotate about screen z axis

in ZOOM mode:
- press and hold left mouse button to zoom in and out
- press and hold middle mouse button to move the plot
 
Inspired by rotate3d by The MathWorks, Inc.
 
Tested under MATLAB 5.2

Comments and Ratings (16)

Johannes

Thanks for that contribution. I added the simple feature to switch between the modes "rot" and "zoom" by clicking the right mouse button.

Added the following after line 161 and after line 171, respectively:
   elseif strcmp(mouseclick,'alt')
       view3d zoom
       return
   end

Ilya Belevich

Matt Arth

Exactly what is required for viewing 3D plots.

ming zhang

very good!

Tapu Costel

Daniel Bernasconi

Very neat. Replace 'extend' with 'alt' in both places if you've only got a two-button mouse. Pan seems to go a bit unstable if you drag right to the edge of the screen.

KW Lee

Exactly what I was looking for. Great!!

Nima Moshtagh

nice work!!

Guglielmo Rubinacci

very good

Mujahid Sultan

Simply Superb

An Wei

very good!
My GUI can compile and become a executive program with view3d!

S Schuberth

very good, but before usage try this:

set(gcf,'doublebuffer','on')

this will stop the flickering of the plot.

Lina Chang

It's very nice to be able to manipulate plot views via the mouse.

Richard Steinberg

Provides flexible mouse control of 3-D view- but a dry description of functionality doesn't do it justice. VIEW3D is very nice, very pretty.

Mark Wilbanks

MATLAB Release
MATLAB 5.2 (R10)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video