Learn R Programming

molaR (version 4.2)

Slope: Function to calculate the average slope of a surface

Description

A function that calcualate the average slope over tooth or some other surface

Usage

Slope(plyFile, Guess = F)

Arguments

plyFile
An oject of classes 'mesh3d' and 'shape3d'
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 (2003).

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")