Use TURBO mode to see the demonstration pattern. (Press the <Shift> key and click the Green Flag for TURBO mode). A cube rendered in perspective 3d. The cube is defined as three quads, which are in turn defined as 4 set of on screen coordinates. A simple point check on the quads tells the program whether the current screen position is inside one of these quads, and so which colour to choose. Technically these 3 quads can overlap and a point be in two quads at once, but we don't need to do that. The points are pre-calculated, and rounded.