Original Post
I'm trying to draw a 2D perspective grid. My results so far is here. As you can see, I've figured out how to do the vertical lines, but I don't know how to do the horizontal lines. Lines near the top should be closer together than the lines at the bottom, but I don't know what distance function to use. I've read of a method that works by finding the grid's center, dividing the grid into upper and lower halves, and recursively finding the centers of these new halves to determine the positions of the horizontal lines. The problem is that the number of grid spaces on a side has to be a power of two, which is either too little or too much for my purposes.