Learn R Programming

geomorph (version 3.2.1)

plotspec: Plot 3D specimen, fixed landmarks and surface semilandmarks

Description

A function to plot three-dimensional (3D) specimen along with its landmarks.

Usage

plotspec(spec, digitspec, fixed = NULL, ptsize = 1, centered = FALSE, ...)

Arguments

spec

An object of class shape3d/mesh3d, or matrix of 3D vertex coordinates.

digitspec

Name of data matrix containing 3D fixed and/or surface sliding coordinates.

fixed

Numeric The number of fixed template landmarks (listed first in digitspec)

ptsize

Numeric Size to plot the mesh points (vertices), e.g. 0.1 for dense meshes, 3 for sparse meshes

centered

Logical Whether the data matrix is in the surface mesh coordinate system (centered=FALSE) or if the data were collected after the mesh was centered (centered=TRUE)- see details.

...

additional parameters which will be passed to plot3d.

Details

Function to plot 3D specimens along with their digitized "fixed" landmarks and semilandmarks "surface sliders" and "curve sliders". If specimen is a 3D surface (class shape3d/mesh3d) mesh is plotted. For visualization purposes, 3D coordinate data collected using digit.fixed or digitsurface and buildtemplate prior to build 1.1-6 were centered by default. Therefore use this function with centered=TRUE. Data collected outside geomorph should be read using centered=FALSE. The function assumes the fixed landmarks are listed at the beginning of the coordinate matrix (digitspec).

See Also

warpRefMesh

read.ply

rgl-package (used in 3D plotting)

Examples

Run this code
# NOT RUN {
# data(scallopPLY)
# ply <- scallopPLY$ply
# digitdat <- scallopPLY$coords
# plotspec(spec=ply,digitspec=digitdat,fixed=16, centered =TRUE)
# }

Run the code above in your browser using DataLab