tps_grid: Deformation grids using Thin Plate Splines

Description Usage Arguments Value See Also Examples

View source: R/gr-TPS.R

Description

tps_grid calculates and plots deformation grids between two configurations.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
tps_grid(
  fr,
  to,
  amp = 1,
  over = 1.2,
  grid.size = 15,
  grid.col = "grey80",
  poly = TRUE,
  shp = TRUE,
  shp.col = rep(NA, 2),
  shp.border = col_qual(2),
  shp.lwd = c(1, 1),
  shp.lty = c(1, 1),
  legend = TRUE,
  legend.text,
  ...
)

Arguments

fr

the reference (x; y) coordinates

to

the target (x; y) coordinates

amp

an amplification factor of differences between fr and to

over

numeric that indicates how much the thin plate splines extends over the shapes

grid.size

numeric to specify the number of grid cells on the longer axis on the outlines

grid.col

color for drawing the grid

poly

whether to draw polygons (for outlines) or points (for landmarks)

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

legend

logical whether to plot a legend

legend.text

some text for the legend

...

additional arguments to feed coo_draw

Value

Nothing

See Also

Other thin plate splines: tps2d(), tps_arr(), tps_iso(), tps_raw()

Examples

1
2
3
4
5
botF <- efourier(bot)
x <- MSHAPES(botF, 'type', nb.pts=80)$shp
fr <- x$beer
to <- x$whisky
tps_grid(fr, to, amp=3, grid.size=10)

Example output

Attaching package:MomocsThe following object is masked frompackage:stats:

    filter

`norm=TRUE` is used and this may be troublesome. See ?efourier
'nb.h' set to 10 (99% harmonic power)

Momocs documentation built on Jan. 13, 2021, 5:28 a.m.

Related to tps_grid in Momocs...