Ask Your Question
1

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

asked 2016-05-02 00:27:04 +0100

joyceMiracle gravatar image

updated 2017-08-01 19:15:19 +0100

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
1

answered 2016-05-02 13:32:04 +0100

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

Stats

Asked: 2016-05-02 00:27:04 +0100

Seen: 172 times

Last updated: May 02 '16