simpleAnimation: simpleAnimation

simpleAnimationR Documentation

simpleAnimation

Description

Functions to create simple animations by varying parameters

Usage

parameterAdjust(input)

addSimpleAnimation(input, parametersAdd = NULL, parametersMultiply = NULL, ...)

Arguments

input

a component

parametersAdd

a named list of parameters and changes. e.g. list(b=2,d=2) would add 2 to the value of b and d in input@data.

parametersMultiply

a named list of parameters and scale factors. e.g. list(b=2,d=2) would double the value of b and d in input@data.

...

function parameters for parameterAdjust from addSimpleAnimation.

Details

The simplest way to create an animation is for a parameter to be incremented or multiplied by a constant factor each frame. simpleAnimation adds parameters and a function to an art object to do this.

Value

parameterAdjust and addSimpleAnimation both return components

Examples

art=new("component",x=0,y=0)
art=addSimpleAnimation(art,list(x=0.01))
easyPlot(art,frames=1:100,framesToPlot=1:100,mode=0)

R-graphic-design/RGD documentation built on Jan. 2, 2023, 10:30 p.m.