# NOT RUN {
#- import tls data
tls=data.table::fread(system.file("extdata", "Tree_t0.asc", package="VoxR"))
#- compute distance to the Z axis
tls[,dist:=VoxR::axis_distance(tls,"Z")]
#- round distance values for visualization
tls[,dist:=round(dist*100)]
#- plot the distance to the Z axis
cols=rev(rainbow(max(tls$dist)+1,end=4/6)) # color scale
rgl::open3d()
rgl::plot3d(tls,col=cols[tls$dist+1],add=TRUE)
# }
Run the code above in your browser using DataLab