Matlab Equivalent to Vpython Trail

2 views (last 30 days)
Edward Lee
Edward Lee on 17 Apr 2015
Commented: Star Strider on 17 Apr 2015
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.

Answers (1)

Star Strider
Star Strider on 17 Apr 2015
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 Comments
Edward Lee
Edward Lee on 17 Apr 2015
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 on 17 Apr 2015
I’m not sure.
If you have R2015a, another option (that I also haven’t done a lot with recently) is the animatedline function.

Sign in to comment.

Categories

Find more on Animation in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!