Borrar filtros
Borrar filtros

Rotating a 2D plot around origo

5 visualizaciones (últimos 30 días)
Anna
Anna el 5 de Abr. de 2016
Respondida: Muhammad Usman Saleem el 5 de Abr. de 2016
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?

Respuesta aceptada

Muhammad Usman Saleem
Muhammad Usman Saleem el 5 de Abr. de 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

Más respuestas (0)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by