Implement the DDA algorithm to create an single line
Reference image. The reference uses the build-in line drawing functionality and is smoothed. Your line will look a bit more jagged.