Project 1: Computer Graphics 1 Introduction
Computer graphics are images displayed or animated on a computer screen. Applications of computer graphics are widespread and growing rapidly. For instance, computer-aided design is an integral part of many engineering processes. The entertainment industry has made the most spectacular use of computer graphics–from the special effects in King Kong to the Nintendo Wii. Most interactive computer software for business and industry makes use of computer graphics including screen displays, desktop publishing, and slide production for commercial and education presentations. Consequently, most students studying a computer language spend some time learning how to use two-dimensional (2D) graphics, and maybe three dimensional (3D) graphics.
2
Transformations in 2D
We begin by examining some of the basic mathematics used to manipulate and display graphical images such as a letter of the alphabet. Such an image consists of a number of points, connected lines or curves, and information about how to fill closed regions bounded by the lines and curves. Often, curved lines are approximated by short straight-line segments, and a figure is defined mathematically by a list of points. The capital letter N can be determined by eight points, or vertices. The coordinates of the points can be stored in a data matrix D. In addition to D, it is necessary to specify which vertices are connected by lines, but we will omit this detail for now. The main reason graphical objects are described by a collection of straight-line segments is that the standard transformations in computer graphics map line segments onto other line segments. Once the vertices that describe an object have been transformed, their images can be connected with the appropriate straight lines to produce the compete image of the original object. 1. On graph paper, carefully draw the letter N. Construct a data matrix D containing the eight