Ask Your Question
1

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

asked 8 years ago

joyceMiracle gravatar image

updated 7 years ago

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?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 8 years ago

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)))
Preview: (hide)
link

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: 8 years ago

Seen: 180 times

Last updated: May 02 '16