We have wondered this too.
You Will Never Get to the Wall
Remember that game where someone told you that if you walked half way to the wall in sequential steps, always just walking to the mid-point, you will never actually reach the wall. Ever.
Like me you probably heard this as a kid and thought it didn’t make common sense but knowing basic math and division knew it make perfect mathematical logic. That is if you grasp infinity.
The Half Problem Ends
Here is how you program a computer to draw a line between two points. You define two points (point 0 and point 1). If the distance between the two points is less than 2 pixels you do nothing.
If the distance is more than 2 pixels you locate the mid-point (point 2). You change the color of this pixel. You repeat this basic algorithm recursively between point 0 and mid-point and between mid-point and point 1. Eventually you cut down the distances until you reach the first rule of this algorithm. And then the line is complete.
The Write a 3D Software Engine from Scratch article is written by David Rouset, developer evangelist at Microsoft. It was published a few days ago. We think it’s cool. And for Part 1 of this story you can click on that here.