# Small example for creating a masking layer of a single depth interval:
createDepthLayerMasks(ppcm = 1, dims_px = c(10,10),
depth_levels_cm = matrix(c(-3,-5), ncol = 2))[[1]]
# Change some parameters to adapt to a different minimum point position and
# installation angle.
createDepthLayerMasks(ppcm = 1, dims_px = c(5,7),
depth_levels_cm = matrix(c(-1.5,-2.5), ncol = 2),
pos_highpoint_px = "center", gap_cm = 0)[[1]]
# And here is a cutout of that mask using a gap.
createDepthLayerMasks(ppcm = 1, dims_px = c(5,5),
depth_levels_cm = matrix(c(-1.5,-2.5), ncol = 2),
pos_highpoint_px = "center", gap_cm = 2)[[1]]
# Examples how different angles result in different dissection graphs:
test_x <- -12:12
plot(test_x, sapply(X=test_x, function(X){
dissectionLine(x=X, minpoint = c(0,0), angle = 45,
radius = 3)}),
ylim = c(0, 20))
plot(test_x, sapply(X=test_x, function(X){
dissectionLine(x=X, minpoint = c(0,0), angle = 80,
radius = 3)}),
ylim = c(0, 20))
plot(test_x, sapply(X=test_x, function(X){
dissectionLine(x=X, minpoint = c(0,0), angle = 10,
radius = 3)}),
ylim = c(0, 20))
Run the code above in your browser using DataLab