tmatrix: Interpolate Matrix

Description Usage Arguments Value Author(s) Examples

View source: R/animatoR-functions-knitr.R

Description

Interpolates matrix elements between start and end value.

Usage

1
tmatrix(x0, x1 = diag(nrow(x0)), t, when, p = 1)

Arguments

x0

numerical matrix, start matrix

x1

numerical matrix, end matrix

t

numeric, homotopy parameter, limited between 0 and 1. This parameter can be considered as fraction of animation duration time.

when

numeric vector. This parameter controls the times of: entrance, exit, start of movement and, end of movement.

p

numeric, homotopy power parameter. Defaults to 1.

Value

Intermediate matrix (numerical).

Author(s)

Andrej Blejec andrej.blejec@nib.si

Examples

1
2
3
4
5
x0 <- matrix(c(1,2,3,4),2,2)
x1 <- matrix(c(11,12,13,14),2,2)
print(x0)
print(x1)
print(h(x0,x1,t=0.3))

ablejec/animatoR documentation built on Feb. 21, 2020, 10:09 p.m.