grid <- long_grid(seq(0, 1, l = 100), seq(0, 1, l = 100))
# Use one of the generators
grid$gradient <- gradient_noise(gen_simplex, x = grid$x, y = grid$y)
plot(grid$x, grid$y, type = 'n')
segments(grid$x, grid$y, grid$x + grid$gradient$x / 100, grid$y + grid$gradient$y / 100)
Run the code above in your browser using DataLab