powered by
This function generates a list of points that form a line between two given points using Bresenham's line algorithm.
bresenham(x0, y0, x1, y1)
A list of points that form a line between the two given points.
The x-coordinate of the starting point.
The y-coordinate of the starting point.
The x-coordinate of the ending point.
The y-coordinate of the ending point.
bresenham(0, 0, 5, 5) bresenham(0, 0, -5, -5)
Run the code above in your browser using DataLab