Slope {molaR} | R Documentation |
Function to calculate the average slope of a surface
Description
A function that calculates the average slope over a tooth or some other 3D surface
Usage
Slope(plyFile, Guess = FALSE)
Arguments
plyFile |
An object of classes 'mesh3d' and 'shape3d' with calculated normals |
Guess |
Logical indicating whether the function should 'guess' as to the 'up' direction for the surface and to remove negative slopes from the calculation |
Details
This function requires a ply file. It will calculate the slope on each face of the surface and will average the slope across the surface. This is functionally equivalent to the slope calculation used by Ungar and M'Kirera "A solution to the worn tooth conundrum in primate functional anatomy" PNAS (2003) 100(7):3874-3877
In the case of applying this function to teeth (its intended purpose), the function expects a surface with the occlusal plane normal to the Z-axis.
The Guess
parameter is a logical asking whether or not you want the function to both
guess as to the right side up of the surface, and to then discard all of the 'negative' slopes,
i.e. surfaces which are over-hangs, as is frequently found on the sidewalls of teeth. If
Guess
is not engaged the mean slope will include the negative values of the overhang
and will likely underestimate the average slope of the surface.
Regardless of if the Guess
parameter is engaged, the function will also return a vector
containing all of the face slope values ("Face_Slopes")
Examples
Slope_output <- Slope(Tooth)
summary(Slope_output)