Computing a Picture

The First Row Is on the Top

Not only is the first row of pixels on the top, it is also labeled by number 0 in the tradition of C++. The second row of pixels is labeled by number 1 and it is positioned just below the first row. This goes on until the final row at the bottom, which is labeled by a number 599, since the surface is 600 pixels high.

The first column is on the left and it has number 0. The column numbers grow from left to right, and the final pixel column has number 799, since the surface is 800 pixels wide.

That effectively puts the origin of the imagined coordinate system extremely close to the top left part of the image, instead of the bottom left, as it would be usual when drawing coordinate systems for graphs. This coordinate system is also 'inverted' upside-down, that is, the coordinate y grows towards the bottom.