Code covered by the BSD License
-
...
CREATEINNERBARS Creates the bars of the inner (blue) ring
-
...
CREATEOUTERBARS Creates the red motionless supporting bar
-
EuMat( phi, theta, psi )
EUMAT returns a rotation matrix rotating an object by the Cardan angles
-
cylinderWeights(r1,r2)
CYLINDERWEIGHTS creates the innermost blue bars with heavy looking cylinders
-
multiplyEuMat( EuMat, X,Y,Z )
MULTIPLYEUMAT takes the X, Y, Z coordinates of an object and returns the
-
sTopMain(fileToRead)
STOPMAIN Plots an animated spinning top with Cardan mounting from raw
-
torus (a, n, r, kpi)
TORUS Generate a torus.
-
sTopEuler.m
-
View all files
from
animated spinning top with Cardan mounting
by Alexander Erlich
Plots an animated spinning top with Cardan mounting from raw animation data.
|
| multiplyEuMat( EuMat, X,Y,Z ) |
function [ Xt,Yt,Zt ] = multiplyEuMat( EuMat, X,Y,Z )
%MULTIPLYEUMAT takes the X, Y, Z coordinates of an object and returns the
%coordinates Xt, Yt, Zt of same object rotated using a rotation matrix
Xt=X;
Yt=Y;
Zt=Z;
resvec=[1;1;1];
for i=1:numel(X)
temp=[X(i);Y(i);Z(i)];
resvec=EuMat*temp;
Xt(i)=resvec(1);
Yt(i)=resvec(2);
Zt(i)=resvec(3);
end
|
|
Contact us at files@mathworks.com