Learn R Programming

crookR (version 0.1.0)

crook_deform: Apply a synthetic crook/krok deformation to a stem point cloud (LAS or XYZ)

Description

Generalization of your Create_Krok() that supports lidR::LAS or data.frames, arbitrary azimuth, and safer handling of edge cases.

Usage

crook_deform(
  x,
  krok_length = 0.5,
  krok_start = 4,
  krok_type = c("2dir", "1dir"),
  krok_deviation = 0.1,
  inflektion_X = 1/4,
  inflektion_ext = 1/2,
  az = 0,
  spar = 0.8
)

Value

Same class as input (LAS or data.frame object with crook deformation)

Arguments

x

LAS or data.frame with X,Y,Z (case-insensitive if data.frame).

krok_length

range of the deformation along the stem's length

krok_start

start height of the crook

krok_type

single- or double-directional deviation

krok_deviation

extent of the deviation

inflektion_X

placement of double directional deviation

inflektion_ext

placement of double directional deviation

az

numeric degrees. Azimuth of lateral rotation (0 = X axis, 90 = Y axis). Default 0.

spar

smoothing parameter for stats::smooth.spline (0..1).