Matlab Equivalent to Vpython Trail

10 次查看(过去 30 天)
Essential what the title says. I am currently modeling an animation of multiple spheres using a while loop. I am wondering if there was a way to model the trajectory of the spheres like the trail function in Vpython can.

回答(1 个)

Star Strider
Star Strider 2015-4-17
I am not familiar with Vpython, but the comet function and its friends (links at the end of the comet documentation page) might be what you want.
  2 个评论
Edward Lee
Edward Lee 2015-4-17
Ah, that seems like it would work. Any idea on how I would get this to work in a loop? I have a sphere with on a set of coordinates that updates every loop but when I put comet in the loop it just shows the blue dot each time without the trail.
Star Strider
Star Strider 2015-4-17
I’m not sure.
If you have R2015a, another option (that I also haven’t done a lot with recently) is the animatedline function.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Animation 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by