powered by
Generates a 2D grid of equally spaced points, useful for testing fisheye transformations and other spatial warping functions.
create_test_grid(range = c(-1, 1), spacing = 0.1)
A numeric matrix with two columns (x, y) containing the coordinates of the grid points.
x
y
Numeric vector of length 2 giving the x and y limits of the grid (default = c(-1, 1)).
c(-1, 1)
Numeric. Distance between adjacent grid points along each axis (default = 0.1).
0.1
plot_fisheye_fgc(), fisheye_fgc()
plot_fisheye_fgc()
fisheye_fgc()
# Create a grid from -1 to 1 with spacing 0.25 grid <- create_test_grid(range = c(-1, 1), spacing = 0.25) head(grid)
Run the code above in your browser using DataLab