Learn R Programming

Momocs (version 0.2-6)

tps.arr: Deformation "vector field" using Thin Plate Splines.

Description

tps.arr(ows) calculates deformations between two configurations and illustrate them using arrows.

Usage

tps.arr(fr, to, amp=1, palette = col.summer,
        arr.nb = 100, arr.levels = 100, arr.len = 0.1,
        arr.ang = 30, arr.lwd = 1, arr.col = "grey50",
        shp = TRUE, shp.col =  rep(NA, 2), shp.border=col.gallus(2),
        shp.lwd = c(2, 2), shp.lty = c(1, 1))

Arguments

fr
The reference $(x; y)$ coordinates.
to
The target $(x; y)$ coordinates.
amp
An amplification factor of differences between fr and to.
palette
A color palette such those included in Momocs or produced with colorRampPalette.
arr.nb
A numeric. The number of arrows to calculate.
arr.levels
A numeric. The number of levels for the color of arrows.
arr.len
A numeric. The length of arrows.
arr.ang
A numeric. The angle for arrows' heads.
arr.lwd
A numeric. The lwd for drawing arrows.
arr.col
If palette is not used the color for arrwos.
shp
logical. Whether to draw shapes.
shp.col
Two colors for filling the shapes.
shp.border
Two colors for drawing the borders.
shp.lwd
Two lwd for drawing shapes.
shp.lty
Two lty fro drawing the shapes.

Value

  • No returned value.

Examples

Run this code
data(bot)
botF <- eFourier(bot)
x <- meanShapes(botF, "type", nb.pts=80)
fr <- x$beer
to <- x$whisky
tps.arr(fr, to, arr.nb=400, palette=col.sari, amp=3)

Run the code above in your browser using DataLab