File Exchange

image thumbnail

Find Euler Angles

version 1.0 (13.7 KB) by

An interactive demo for learning and visualizing 3D coordinate transformations and Euler angles.



View License

findEulerAngs generates Euler angle sets and animates rotations in response to user manipulation of a 3D rigid body (a box).

Use the mouse to change the orientation of the box. A wireframe of the original box position will appear. The 'Euler Axis' button animates the rotation about the Euler Axis between the original and
new box positions. The 'Rotate' button calculates a set of Euler angles for the rotation type currently selected ('Body' or 'Space') and the axis set selected in the dropdown menu to orient the axes to
the new box position. 'Derotate' reverses this process and brings the axes back to their previous position.
Once the axes have been rotated, subsequent rotations are calculated
from this new orientation. This means that Space rotations use the coordinate system associated with the previous cube orientation (i.e. the axes of the wireframe cube). 'Axes DCM' is the direction cosine matrix of the current axes orientation in the unrotated inertial frame. 'Box DCM (inertial)'
is the DCM of the box's current orientation in the unrotated inertial frame. 'Box DCM (Axes)' is the matrix product of the previous two DCMs. The Euler axis is calculated in the unrotated inertial frame.

Comments and Ratings (6)


John (view profile)

Based on earlier comment on your other program for euler angles, it would be nice if there was a text box to type in angles


Mario (view profile)


Robert (view profile)

My sincere apologies to Dmitry - like many older version MATLAB users I had no knowledge of the new unused argument syntax. I have made the necessary mods and the code runs. I have already found the visualisation extremely useful for Euler angle manipulations and thank the author for this 5 star contribution to the file exchange.


Robert (view profile)

Dmitry Savransky

This submission uses the 'unused argument syntax' introduced in R2009b. (see: ) Users of earlier versions will most likely encounter errors. You can fix these quite easily by replacing the tildes in various subfunction syntax declarations with dummy variables. I apologize to all pre-R2009b users for the inconvenience.


Robert (view profile)

Looks like a potentially good piece of work spoilt by a lack of basic testing - the author should follow his own instructions to find the code simply doesn't run - crashing due to 'reserved' function arguments in call-back functions using the '~' symbol. Please correct this - the end result could be worth 5 stars!

MATLAB Release
MATLAB 7.11 (R2010b)

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

» Watch video