adjust_xy: Correct x and y offset for a soil specimen

Description Usage Arguments Value Examples

View source: R/adjust_xy.R

Description

After re-orienting and moving the specimen with orient_sample, the minute error in the horizontal plane needs to be corrected prior to removing the aluminum sample holder and the outermost portion of the soil surface. This function computes the difference between the maximum and minimum values observed in the x and y directions and corrects the vertex coordinates so the center is truly located at x=0 and y=0.

Usage

1
adjust_xy(mesh)

Arguments

mesh

a "mesh3d" object which is already oriented with its surface lying parallel to the x-y plane

Value

a "mesh3d" object with its center lying in the normal to the x-y plane

Examples

1
2
3
4
adjusted <- adjust_xy(mesh = untrimmed_mesh1)
rgl::shade3d(untrimmed_mesh1, color="firebrick")
rgl::shade3d(adjusted, color= "darkblue")
add_origin_axes()

evanmascitti/soilmesh documentation built on Sept. 30, 2021, 7:57 a.m.