Generalization of your Create_Krok() that supports lidR::LAS or
data.frames, arbitrary azimuth, and safer handling of edge cases.
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
)Same class as input (LAS or data.frame object with crook deformation)
LAS or data.frame with X,Y,Z (case-insensitive if data.frame).
range of the deformation along the stem's length
start height of the crook
single- or double-directional deviation
extent of the deviation
placement of double directional deviation
placement of double directional deviation
numeric degrees. Azimuth of lateral rotation (0 = X axis, 90 = Y axis). Default 0.
smoothing parameter for stats::smooth.spline (0..1).