# Make an initial log ----
r <- c(1,2,3,4,5) # left boundary of the bed interval (upper or lower)
l <- c(0,1,2,3,4) # right boundary of the bed interval (upper or lower)
h <- c(4,3,5,3,4) # hardness (arbitrary)
i <- c("B1","B2","B3","B4","B5") # Bed name
log <- litholog(l,r,h,i) # Generate data frame of the polygons
# making the litholog
# Define the profile ----
# Depths (dt), intensity (xy), and ids (id) of profile points
dt <- c(0,1,1,1,2,2,2,3,3,3,4,4,5)
xy <- c(5,4,3,4,3,3,6,5,3,4,3,5,4)
id <- c("B1","B1","B1","B2","B2","B3","B3","B3","B3","B4","B4","B5","B5")
# Weld profile to litholog ----
nlog <- weldprofile(log = log, gap = 3, dt = dt, xy = xy, i = id, ext = Inf)
# Visualisation ----
opar <- par()$mfrow
par(mfrow = c(1,3))
plot.new()
plot.window(xlim = c(0,6), ylim = c(0,5))
axis(1)
axis(2)
multigons(log$i, log$xy, log$dt)
plot.new()
plot.window(xlim = c(0,6), ylim = c(0,5))
axis(1)
axis(2)
lines(xy, dt, type = "o", pch = 19)
plot.new()
plot.window(xlim = c(0,6), ylim = c(0,5))
axis(1)
axis(2)
multigons(nlog$i, nlog$xy, nlog$dt)
par(mfrow = opar)
Run the code above in your browser using DataLab