Animate
Animate[expr,{u,umin,umax}]
generates an animation of expr in which u varies continuously from umin to umax.
Animate[expr,{u,umin,umax,du}]
takes u to vary in steps du.
Animate[expr,{u,{u1,u2,…}}]
makes u take on discrete values u1, u2, ….
Animate[expr,{u,…},{v,…},…]
varies all the variables u, v, ….
Details and Options
- expr can be any expression; it does not need to be a graphic.
- Animate evaluates expr only for the specific literal values of u it requires.
- Animate[expr,{{u,u0},umin,umax}] takes u to have initial value u0.
- When umax is finite, u is taken to vary at such a rate as to make the animation last for the time given by the setting for DefaultDuration.
- Animate[expr,{u,umin,Infinity}] makes an infinite animation in which the value of u increases forever at a rate of one unit per second.
- Animate[expr,{u,-Infinity,Infinity}] also allows u to decrease forever if the animation is run in reverse.
- Animate generates a Manipulate object containing an Animator.
- Animate[expr,{{u,u0, ulbl},…},…] uses ulbl as the label for the u animator etc.
- Animate has the same options as Manipulate, with the following additions and changes: [List of all options]
-
AnimationDirection Forwardthe direction of the animation AnimationRate Automaticthe rate at which to take variables to vary AnimationRepetitions Infinityhow many times to run before stopping AnimationRunning Truewhether the animation is running AnimationRunTime0time elapsed since the animation last started running, or 0 if the animation is not running AnimationTimeIndex Automatictime index for the animation, where 0 is the beginning and the value of DefaultDuration is the end AppearanceElements Automaticcontrol elements to include BaseStyle{}base style specifications for the animator DefaultDuration 5.the default duration in seconds Deinitialization Nonean expression to evaluate if the output from the Animate is deleted DisplayAllSteps Falsewhether to force all discrete steps to be displayed Exclusions {}specific values to be excluded Initialization Nonean expression to evaluate when output is first generated LabelStyle{}style specifications for the label area RefreshRate Automaticthe default number of times per second to refresh ShrinkingDelayAutomatichow long to delay before shrinking if the displayed object gets smaller - The default for du is determined by the setting for the RefreshRate option, and is negative if umin is larger than umax.
- If du is given as 0, it is taken to be the minimum positive or negative value determined by the setting for RefreshRate.
- If an explicit setting is specified for AnimationRate, it takes precedence over the setting for DefaultDuration.
- The following elements are included by default: "ProgressSlider", "PlayPauseButton", "FasterSlowerButtons", "DirectionButton". These elements can be specified in any order in a list given as the setting for AppearanceElements.
- The settings for BaseStyle and LabelStyle are appended to the default styles typically given by the "Animate" and "AnimateLabel" styles in the current stylesheet.
-
AlignmentAutomatichow to align the output in the display area AnimationDirectionForwardthe direction of the animation AnimationRateAutomaticthe rate at which to take variables to vary AnimationRepetitionsInfinityhow many times to run before stopping AnimationRunningTruewhether the animation is running AnimationRunTime0time elapsed since the animation last started running, or 0 if the animation is not running AnimationTimeIndexAutomatictime index for the animation, where 0 is the beginning and the value of DefaultDuration is the end AppearanceElementsAutomaticcontrol elements to include AutoActionFalsewhether to change controls automatically when the mouse is over them AutorunSequencingAutomatichow autorun should use the controls BaselinePositionAutomaticalignment relative to surrounding text BaseStyle{}base style specifications for the animator Bookmarks{}bookmark settings ContentSizeAutomaticthe absolute size for the content area ContinuousActionAutomaticwhether to update continuously when controls are changed ControllerLinkingAutomaticwhen to activate links to external controllers ControllerMethodNonehow external controllers should operate ControllerPathAutomaticwhat external controllers to try to use ControlPlacementAutomaticplacement of controls ControlTypeAutomatictype of controls to use DefaultDuration5.the default duration in seconds DeinitializationNonean expression to evaluate if the output from the Animate is deleted DeployedFalsewhether to make the displayed output deployed DisplayAllStepsFalsewhether to force all discrete steps to be displayed EvaluatorAutomaticthe kernel to use for evaluations ExcludedContextsAutomaticcontexts excluded from SaveDefinitions Exclusions{}specific values to be excluded FrameLabelNonelabels for the outer frame FrameMarginsAutomaticmargins inside the overall frame ImageMargins0margins around the whole Manipulate IncludedContextsAllcontexts considered for SaveDefinitions InitializationNonean expression to evaluate when output is first generated InterpolationOrderAutomaticinterpolation order for animating transitions between bookmarks LabelStyle{}style specifications for the label area LocalizeVariablesTruewhether to localize the variables PaneledTruewhether to put the displayed output in a panel PreserveImageOptionsTruewhether to preserve image size and other options when regenerating graphics RefreshRateAutomaticthe default number of times per second to refresh RotateLabelFalsewhether to rotate y labels on the frame SaveDefinitionsFalsewhether to save all definitions associated with expr ShrinkingDelayAutomatichow long to delay before shrinking if the displayed object gets smaller SynchronousInitializationTruewhether to perform initialization synchronously SynchronousUpdatingAutomaticwhether to update synchronously TouchscreenAutoZoomFalsewhether to zoom to fullscreen when activated on a touchscreen TouchscreenControlPlacementAutomaticplacement of controls on a touchscreen TrackedSymbolsFullsymbols whose changes trigger updates in the output UndoTrackedVariablesNonevariables that, when changed, should be tracked by the front end's undo mechanism UnsavedVariablesNonevariables whose values should not be saved
List of all options
Examples
open allclose allBasic Examples (3)
Animate by continuously changing the value of a:
Animate by varying n in discrete steps:
Animate by continuously changing two parameters a and b:
Scope (8)
Animate Content (2)
Animate any expression, not just a graphic:
Animate Control (6)
Specify a range for animation:
Specify the animator controls using AppearanceElements:
Specify an infinite animation, where the animation variable increases at unit speed:
Animate, using a discrete set of values:
Animate several variables at once:
Options (23)
Alignment (1)
AnimationDirection (1)
Control the direction of animation:
AnimationRate (1)
Control the rate of animation:
AnimationRepetitions (1)
Control the number of animation cycles:
AnimationRunning (2)
By default Animate starts running when evaluated:
By setting AnimationRunning->False, Animate starts in a paused state:
AppearanceElements (2)
By default Animate only contains an Animator:
Use AppearanceElements to get additional controls:
BaselinePosition (1)
Align with the surrounding text:
ControlPlacement (1)
Specify the location of the controls:
DefaultDuration (1)
Control the time duration of one animation cycle:
Deinitialization (1)
Specify expressions to be evaluated when Animate is no longer displayed:
Deployed (2)
By default the contents can be selected and edited:
Use Deployed to restrict the interactivity of the contents:
DisplayAllSteps (1)
With the default setting, some steps may be skipped:
Use DisplayAllSteps to prevent skipping:
Exclusions (1)
Exclude values from the range:
FrameMargins (2)
ImageMargins (2)
Initialization (1)
Specify expression to be evaluated before displaying the animation:
RefreshRate (1)
Control the refresh rate of the animation:
TrackedSymbols (1)
Specify symbols that will trigger the animation update:
Applications (9)
Animate the Taylor series of :
Scan through a large space of cellular automata:
Animate nonlinear slider motion:
Display the superposition of two waves:
Animate a complex map of the plane for different values of :
Display a sphere-torus morphing:
Animate point light positions:
Properties & Relations (2)
Animated behavior can also be built using Animator as a building block:
Animating a fixed list of expressions can be done directly with ListAnimate:
Possible Issues (2)
Fix PlotRange to stop animations from jiggling:
Use ImagePadding to make sure different labels do not make the image size change:
Neat Examples (2)
Text
Wolfram Research (2007), Animate, Wolfram Language function, https://reference.wolfram.com/language/ref/Animate.html (updated 2014).
CMS
Wolfram Language. 2007. "Animate." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/Animate.html.
APA
Wolfram Language. (2007). Animate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Animate.html