Program for drawing geometric figures

broken image
broken image

You might think to yourself, 'Wait a minute. In this chapter, you learn how to clear the screen and to draw geometric objects, including points, straight lines, and flat polygons. Raster objects, which include such things as two-dimensional images, bitmaps, and character fonts, are covered in Chapter 8. This shouldn't be too surprising - look at what Leonardo da Vinci accomplished with just pencils and paintbrushes.Īt the highest level of abstraction, there are three basic drawing operations: clearing the window, drawing a geometric object, and drawing a raster object.

Use vertex arrays to store and access a lot of geometric data with only a few function calls.Specify normal vectors at appropriate points on the surface of solid objects.Control the display of those primitives - for example, draw dashed lines or outlined polygons.Turn states on and off and query state variables.Draw with any geometric primitive - points, lines, and polygons - in two or three dimensions.State Management and Drawing Geometric ObjectsĪfter reading this chapter, you'll be able to do the following:

broken image