The geometry created here is similar to that created by the function drawSquare1. But instead of using constants for the vertex coordinates, we compute them as points on a circle that is centered at the origin and has a radius of 1. In turn, we easily obtain the desired rectangular coordinates from the polar coordinates of the points.

Next, we want the sides of the image map to be aligned with the display window boundaries versus the sides of the square. Conceptually, we think of the geometry as a "cookie cutter" which we place over the image map at its center and cut out a piece that fits the geometry. We accomplish this effect by using the same vertex coordinates for our texture coordinates. But since we will now be using negative coordinates and in the range from -1.0 to 1.0, we must double the size of the image map and translate the center of the mapping to the origin. Note that doubling the size of the map requires the factor 0.5 versus the factor 2,0 that we use with geometries (see the Texture Transformation tutorial).