Learn R Programming

Momocs (version 0.1-01)

traj: Calculates shape intermediates.

Description

Given a Nef object, and two positions on the set defined by $PC_1$ and $PC_2$, calculates and plots intermediate shapes along the euclidean distance between these two shapes.

Usage

traj(Nef, fr = c(0, 0), to = c(1, 1), nb.int = 50, nb.pts= 500, save = FALSE, prog = TRUE, pause=TRUE)

Arguments

Nef
the Nef object
fr
a vector with two numerics indicating the $(x; y)$ coordinates of the starting point. If not provided, locator(1) is called
to
a vector with two numerics indicating the $(x; y)$ coordinates of the ending point. If not provided, locator(1) is called
nb.int
code{integer} giving the number of shape intermediates to calculate
nb.pts
code{integer} giving the number of points of the reconstructed outlines
save
logical indicating whether to save the images in a dedicated folder
prog
logical indicating whether to plot or not a progression bar
pause
logical indicating whether to ask the user to display successive intermediate shapes

Examples

Run this code
data(bottles.nef)
traj(bottles.nef)
traj(bottles.nef, fr=c(-0.05, -0.05), to=c(0.15, 0.05))

Run the code above in your browser using DataLab