add_keyframe: Add Keyframe to Moving Generator Cluster: Linear

Description Usage Arguments Details See Also Examples

View source: R/MGC_Linear.R

Description

Adds a keyframe to a MGC_Linear.

Usage

1
  add_keyframe(x, time, variance = 1, density = 1, center, cluster = NA)

Arguments

x

MGC_Linear object

time

the timestamp for the keyframe

variance

the variance at the given timestamp

density

the density at the given timestamp

center

the center at the given timestamp

cluster

the name of the cluster

Details

This allows for the creation of a keframe within a MGC_Linear. If a keyframe already exists at a given timestamp then the old keyframe will be overridden.

See Also

MGC_Linear

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
  dsd <- DSD_MG()
  
  c1 <- MGC_Linear()
  add_keyframe(c1,1,10,10,c(0,0),cluster=1)
  add_keyframe(c1,50,10,10,c(50,50),cluster=1)
  add_keyframe(c1,100,10,10,c(50,100),cluster=1)

  add_cluster(dsd,c1)
  
  ## Not run: 
  animate_data(dsd,2500,xlim=c(0,100),ylim=c(0,100))
  
## End(Not run)

streamMovingGenerator documentation built on May 31, 2017, 3:36 a.m.

Search within the streamMovingGenerator package
Search all R packages, documentation and source code