Usage
## S3 method for class 'mesh3d':
meshDist(x, mesh2=NULL, distvec=NULL, from = NULL,
to = NULL, steps = 20, ceiling = FALSE, file = "default", imagedim =
"100x800", uprange = 1, ray = FALSE, raytol = 50, save = FALSE,
plot = TRUE, sign=TRUE, tol=NULL, displace=FALSE, shade=TRUE,
method=c("morpho", "vcglib"), ...)## S3 method for class 'matrix':
meshDist(x, mesh2=NULL, distvec=NULL, from=NULL, to=NULL, steps=20,
ceiling=FALSE, uprange=1, plot=TRUE, sign=TRUE,
tol=NULL, type=c("s", "p"), radius=NULL, displace = FALSE, ...)
Arguments
x
reference mesh; object of class "mesh3d" or a n x 3 matrix
containing 3D coordinates.
mesh2
target mesh: either object of class "mesh3d" or a
character pointing to a surface mesh (ply, obj or stl file)
distvec
vector: optional, a vector containing distances for each
vertex of mesh1, if distvec != NULL, x will be ignored.
from
numeric: minimum distance to be colorised; default is set to 0 mm
to
numeric: maximum distance to be colorised; default is set to the maximum distance
steps
integer: determines break points for color ramp: n steps
will produce n-1 colors.
ceiling
logical: if TRUE, the next larger integer of "to" is
used
file
character: filename for mesh and image files
produced. E.g. "mydist" will produce the files mydist.ply and mydist.png
imagedim
character of type 100x200 where 100 determines the
width and 200 the height of the image.
uprange
numeric between 0 and 1: restricts "to" to a quantile of
"to", if to is NULL.
ray
logical: if TRUE, the search is along vertex normals.
raytol
maximum distance to follow a normal.
save
logical: save a colored mesh.
plot
logical: visualise result as 3D-plot and distance charts
sign
logical: request signed distances. Only meaningful, if mesh2
is specified or distvec contains signed distances.
tol
numeric: threshold to color distances within this threshold green.
displace
logical: if TRUE, displacement vectors between original
and closest points are drawn colored according to the distance.
shade
logical: if FALSE, the rendering of the colored surface
will be supressed.
method
accepts: "vcglib" and "morpho" (and any
abbreviation). vcglib
uses a command line tool using vcglib headers, morpho uses fortran
routines based on a kd-tree search for closest triangles.
type
character: "s" shows coordinates as spheres, while "p" shows
3D dots.
radius
determines size of spheres; if not specified, optimal
radius size will be estimated by centroid size of the configuration.