adjust_z: Shift a mesh up or down

Description Usage Arguments Value Examples

View source: R/adjust_z.R

Description

After using adjust_xy() to center the mesh, it must be moved up or down so its origin lies in the x-y plane. adjust_z() computes the 10 most frequent values in the mesh's z-coordinates and translates the mesh by this amount, accounting for the direction of the "offset."

Usage

1
adjust_z(mesh, n_bins = 10000)

Arguments

mesh

a "mesh3d" object

n_bins

number of bins among which the coordinates should be split

Value

a "mesh3d" object with adjusted vertex coordinates

Examples

1
2
3
4
5
xy_fixed <- remove_cyl(adjust_xy(untrimmed_mesh1))
z_fixed <- remove_cyl(adjust_z(xy_fixed))
rgl::shade3d(xy_fixed, alpha=1/2)
rgl::shade3d(z_fixed)
add_origin_axes()

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