Code covered by the BSD License  

Highlights from
Figure Rotator

5.0

5.0 | 3 ratings Rate this file 21 Downloads (last 30 days) File Size: 7.23 KB File ID: #39558
image thumbnail

Figure Rotator

by

 

08 Jan 2013 (Updated )

Allows a user to easily navigate around a target point in a 3D figure using a mouse.

| Watch this File

File Information
Description

The FigureRotator is a light and fast tool allowing a user to easily navigate around a target point in a 3D figure using a mouse. The camera will "orbit" a target point, move in and out, and zoom.
While these types of motion are available in MATLAB's built-in Camera Toolbar, the FigureRotator provides a combined interface allowing rotation, movement, and zooming to happen all at once by using the left mouse button for rotation, the scroll wheel for movement in and out, and the right mouse button for zooming, allowing a user to explore a 3D object more quickly. Further, the FigureRotator appears to work more quickly than the Camera Toolbar tools if the figure is also being animated.

Example:

peaks;
f = FigureRotator(gca());

Try 'help FigureRotator' for more examples or see example_figure_rotator.m for an example involving smooth motion during animation.

Acknowledgements

This file inspired Figure Control Widget.

Required Products MATLAB
MATLAB release MATLAB 8.0 (R2012b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
27 Nov 2014 John  
08 Jul 2013 Tucker McClure

Hi Mohamed,

Thanks for the feedback! Oliver's tool (the URL is in his comment below) includes panning. Panning could also be added directly to the FigureRotator, but I chose not to do this for a good reason. The FigureRotator is an "orbit a point" type motion instead of a "stand in a point and look around" type of motion. As such, if one was to pan around a bit, the point that one is "orbiting" becomes unclear, and getting it where one wants it might be difficult.

When I've created tools like this in the past for specific projects, I usually added "hotkeys" or something to change the orbit point (CameraTarget) from one object (say, a location on the ground) to another object (say, a satellite).

If you'd definitely like to add panning to this and aren't concerned about "losing" the orbit point, then just message me, and I can provide some tips!

Thanks again.

08 Jul 2013 Mohamed Aissiou

Hi Tucker,
Do you have an idea how panning (using the mouse) can be added?

I tried to work with 'Cameratarget','Cameraposition' and 'Cameraupvector'.... but no way.

10 Jan 2013 Oliver Woodford

I like that it uses the scroll wheel.
Here's yet another:
http://www.mathworks.co.uk/matlabcentral/fileexchange/38019-figure-control-widget

Updates
03 Oct 2014

Updated for new R2014b graphics system.

Contact us