Animation
An animation is a Viv program: it creates named objects, and transitions reveal, morph and move them. The program prints records; the page plays them back with a scrubber. Run a cell to see its output beside the expected one.
A stage, an object, a transition
stage opens an animation and gives it a coordinate window. Objects are created hidden; draw reveals a curve by drawing it on. Each call prints one record, which is what this page plays.
Morph, with a caption
morph moves a curve's points smoothly to new data over the given seconds. say sets the caption until the next say; a number given after the text is appended, which is how a caption reports a computed value.
Running transitions together
Transitions run one after another. Between together() and apart() they start at the same moment, and the group lasts as long as its longest member. A label's text may carry TeX between dollars: write two backslashes for one.
A simulation drawn as it runs, with keyframes
frame(dt) advances the clock. An object set again later moves there over the time between: a ball drawn at two places with a frame between them glides from one to the other. In a keyframed animation objects are visible from creation; shapes (circle, rect, segment, poly) and dots with a radius are sized in the stage's units.