Linear Algebra - Rotate A Triangle

2 次查看(过去 30 天)
jakob holmberg
jakob holmberg 2018-12-19
So this is the code provided by our lecturer.
figure(1), clf
fill(X,Y,g,edgecolor,k,linewidth,1), hold on
axis equal, axis([-1.5 2 -0.1 2]), axis manual;
pause(1);
v=pi/6; A=[cos(v) -sin(v); sin(v) cos(v)];
P=[X;Y];
for i=1:3
P=A*P;
fill(P(1,:),P(2,:),g,edgecolor,r,linewidth,1), pause(1)
end
plot(0,0,ko,linewidth,2,markersize,2) %origo
And the assignment is to rotate a triangle which is created by defining the row matrices X and Y and I don't know how to create a triangle.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Interpolation 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by