Skip to content

Latest commit

 

History

History
70 lines (53 loc) · 1.33 KB

0517.md

File metadata and controls

70 lines (53 loc) · 1.33 KB

Animation

Generate multiple frames with small differences between each.

Applying transformations over time

move 400 0 0 0 0
move 400 0 0 0 .25
move 400 0 0 0 .50
move 400 0 0 0 .75
move 400 0 0 0 1
move 400 0 0 0 m0 <-- knob
vary <knob> <start frame> <end frame> <start value> <end value>
vary m0 0 4 0 1

defines knob behavior

frame <# of total frames>
basename <name>

Use animate instead of display to show GIFs in ImageMagick.

Default framrate for a gif: 100 frames per second

New Commands

transformation <args> <knob>

if there is a knob, look up its value and apply it to the arguments

basename <name>

set a basename variable (global...)

frames <#>

set a frame # variable

vary <knob> <start frame> <end frame> <start val> <end val> <rate>

compute and store the knob value for each frame

3 Pass Animation Framework

  1. look for frames basename and vary
  • set frames and basename, use default basename if none is provided
  • if vary is present without frames, stop
  1. for each vary commmand
  • compute and store every frame knob value
  1. normal drawing pass with:
  • repeat loop for each frame
  • update knob values in symbol table
  • if animating, save at the end of each loop, create animation at final end

Structure for Storing Knob Values

In C: linked list