3D圆周运动Matlab

时间:2014-03-31 18:56:52

标签: matlab 3d

我在 Matlab 中编码圆周运动, 3D-space 中圆周运动的合适公式或技术是什么,但是我用圆周方程来表示这个现象sin和cos但是它只是以圆周运动(物体本身)旋转物体而不采用中心,我希望用圆心旋转。

我的代码:

for ii = 1:3

circular motion = [5*sin(ii) 5 5*cos(ii)];
%I used gain of 5 in order to give its speed.
%matrix circular motion contains XYZ coordinates.

end

关于圆心的圆周运动的现实生活场景: Helicopter

欢迎使我的字符串与众不同的任何建议或公式。

1 个答案:

答案 0 :(得分:1)

假设我正确理解您的要求,要绘制三维圆形,您需要指定圆所在的平面。我假设这个平面是z=1平面。

因此,您可以使用以下方式绘制圆圈:

t = 0:0.01:2*pi;
plot3(sin(t),cos(t),ones(size(t)));

这给出了这个:

enter image description here


加成:

对于很酷的动画,请尝试:

t = 0:0.01:2*pi;
comet3(sin(t),cos(t),ones(size(t)));
相关问题