而固定在MATLAB动画(而不是让他们改变)轴 [英] Fixing the axes while animating in matlab (not allowing them to change)
问题描述
我想动画一个立方体(我希望能有沿气缸的行立方()的函数)移动在三维空间。它同时具有旋转和平移。虽然我成功的动画,轴似乎是动态扩展。我想他们停止。我想修复轴界限。我希望轴是从起点到终点不变。
I am trying to animate a cube (i wish there was a function for cube along the lines of cylinder() ) moving in 3d space. It has both rotation and translation. While I succeeded in animating, the axes seems to be scaling dynamically. I would like them to stop. I want to fix the axis limits. i want the axis to be constant from the beginning to the end.
我是新来的动画。我从互联网上一块code的演示动画
演示PROG: http://pastebin.com/fbv9gDS2
I am new to animating. I got a piece of code from the internet that demonstrates animating demo prog : http://pastebin.com/fbv9gDS2
我编辑的,这样我可以动画一个立方体。但后来我结束了一个动画,其中轴是不断变化的。
I edited that so that I can animate a cube. but then i ended up with an animation where the axis was continuously changing.
编辑PROG: http://pastebin.com/k3cEm4Fq
PS:链接是安全的,没有垃圾邮件
PS: the links are safe, no spam
推荐答案
您可以通过使用具有特定限制轴
命令修复该轴。例如:
You can fix the axes by using the axis
command with specific limits. For example
axis( [-2 2 -3 3 -4 4] );
设置轴限制'X'
的范围-2,2,为'Y'
中范围-3,3和'Z'
范围-4,4。
sets the axes limits for 'x'
in the range -2,2, for 'y'
in the range -3,3 and for 'z'
in the range -4,4.
这篇关于而固定在MATLAB动画(而不是让他们改变)轴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!