Wolfram: Animation

By Xah Lee. Date: . Last updated: .

Interactive Manipulation

Manipulate

creates a interactive object, where variables can be changed via slider.

it returns a DynamicModule object.

Manipulate

xx = Manipulate[
Plot[Sin[x t], {x, 0, 2 Pi},
PlotRange->{{0, 2 Pi}, {-1, 1}}],
{t, 1, 3}]

(* export as a movie *)
Export[ "xx.mp4", xx ]
wl sine animation 2024-06-28
wl sine animation 2024-06-28

Animation

Animate

same as Manipulate, but automatically animate it.

Animate

Animate[
Plot[Sin[x t], {x, 0, 2 Pi},
PlotRange->{{0, 2 Pi}, {-1, 1}}],
{t, 1, 3}]
ListAnimate

Generate an animation from a list of typically graphics object.

ListAnimate

xPlots = Table[Plot[Sin[x t], {x, 0, 2 Pi}, PlotRange -> {{0, 2 Pi}, {-1, 1}}], {t, 1, 3, 0.2}]

ListAnimate[ xPlots ]

(* export as a movie *)
Export[ "xx.mp4", xPlots ]

(* export as gif *)
Export[ "xx.gif", xPlots ]

WolframLang, Graphics Programing