Ask Your Question

How to plot an animated object and one object in same plane

asked 2016-05-01 17:27:04 -0500

joyceMiracle gravatar image

updated 2017-08-01 12:15:19 -0500

FrédéricC gravatar image

I want to concatenate 2 plots... but I cant

a = animate((line([(0,0), (cos(c), sin(c))]) for c in srange(0,2*pi, pi/4)))
p = circle((0,0), 0.10, fill=true, color='magenta')
c = a+b // I get the error here...

How to do this?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2016-05-02 06:32:04 -0500

calc314 gravatar image

You need to combine the circle and line plots prior to doing the animation.

p = circle((0,0), 0.8, fill=true, color='magenta',xmin=-1,xmax=1,ymin=-1,ymax=1)
a = animate((p+line([(0,0), (cos(c), sin(c))],thickness=3) for c in srange(0,2*pi, pi/4)))
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2016-05-01 17:27:04 -0500

Seen: 36 times

Last updated: May 02 '16