Ask Your Question
1

Interaction and animation exportation

asked 2020-04-06 12:09:53 +0100

Cyrille gravatar image

updated 2020-04-06 16:07:45 +0100

This is an exemple extracted from the documentation

sines = [plot(csin(x), (-2pi,2*pi),

color=Color(c,0,0), ymin=-1,ymax=1)

for c in sxrange(0,1,.2)] a =

animate(sines) a

a.show() # optional -- ImageMagick

I have 2 questions :

1) The main question. Is it possible to export the animation in a pdf ?

2) Can we do the same thing with @interact ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2020-04-06 16:30:22 +0100

tmonteil gravatar image

updated 2020-04-06 16:40:21 +0100

Regarding animations, you can save your animation as an animated gif or an avi or mov video, and import them into your document:

a.save('<filename>.gif')

a.save('<filename>.avi')

a.save('<filename>.mov')

Note that if you use convert from imagemagick in a terminal, each frame will become its own page, which might be interesting as well :

convert  <filename>.gif <filename>.pdf

Note also, that most pdf reader won't show the animation.

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

1 follower

Stats

Asked: 2020-04-06 12:09:53 +0100

Seen: 352 times

Last updated: Apr 06 '20