Rotating a 2D plot around origo

6 views (last 30 days)
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?

Accepted Answer

Muhammad Usman Saleem
Muhammad Usman Saleem on 5 Apr 2016
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

More Answers (0)

Categories

Find more on 3-D Scene Control in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!