I am working with a 1 dimensional array of an RGBA struct composed of unsigned 8-bit integers. I have implemented a very basic line algorithm, and can draw lines from one point to another accurately, as long as they are within my 2D coordinate space.
For cases where one of my end points is outside of the range of my image, my system breaks down. I am trying to understand conceptually in computer graphics how one might implement an infinite (or perceptually infinite) coordinate space to take into account lines that go outside the range of my pixel array.
For example, consider that my pixel array represents a 500x500 pixel space. If I draw a line from (0, 250) to (7000, 100), I would ideally like the line would be drawn to that coordinate that is out of view with the accurate slope of the line maintained.