Rotating a 2D plot around origo

5 次查看(过去 30 天)
Hello, I am trying to rotate the plot for a propeller blade about origo.
% code
endang=0:0.01:2*pi;
xp=rboss*cos(ang);
yp=rboss*sin(ang);
plot(0+xp,0+yp, 'b');
grid on
hold on
blade1 = plot(r, c./4, 'b', r, -c./4, 'b');
hold on
In this plot I wish to rotate blade1 three times, so the finished plot will look like a propeller. How do i rotate the blade?

采纳的回答

Muhammad Usman Saleem
rotate(h,direction,alpha)
rotates the graphics object h by alpha degrees. direction is a two- or three-element vector that describes the axis of rotation in conjunction with the origin of the axis of rotation. The default origin of the axis of rotation is the center of the plot box. This point is not necessarily the origin of the axes.
Positive alpha is defined as the righthand-rule angle about the direction vector as it extends from the origin of rotation.
More detail is here

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by