if (requireNamespace("MASS", quietly = TRUE) && requireNamespace("fields", quietly = TRUE)) {
set.seed(1)
field <- Gauss.st.F(
xlim = c(0, 1), ylim = c(0, 1), tlim = c(0, 1),
par1 = c(1, 0.05), par2 = c(1, 0.06),
sigmas = c(0.5, 0.5, 1),
grid = c(15, 15, 10)
)
# Inspect dimensions and visualize one time slice
dim(field$Z)
image(field$xcoord, field$ycoord, field$Z[, , 1],
main = "Gaussian Random Field (t = 1)",
col = RColorBrewer::brewer.pal(11, "Spectral"))
}
Run the code above in your browser using DataLab