Sie sind auf Seite 1von 1

% Crear matrices de rotacion

clc

% Definir angulos

alpha = 0;
beta = 0;
tetha = 0;

% Definir el punto a rotar

P1 = [0;4;0]

% Definir matrices de rotacion

% Rx
Rx = [1 0 0; 0 cosd(alpha) -sind(alpha); 0 sind(alpha) cosd(alpha)]

% Rotacion alrededor del eje y


Ry = [cosd(beta) 0 sind(beta); 0 1 0; -sind(beta) 0 cosd(beta)]

%Rotacion alrededor del eje z


Rz = [cosd(tetha) -sind(tetha) 0; sind(tetha) cosd(tetha) 0; 0 0 1]

P2 = Rx * P1

Das könnte Ihnen auch gefallen