grid <- long_grid(seq(1, 10, length.out = 1000), seq(1, 10, length.out = 1000))
grid$circles <- gen_spheres(grid$x, grid$y)
grid$cylinders <- gen_spheres(grid$x)
plot(grid, circles)
plot(grid, cylinders)
Run the code above in your browser using DataLab