Unit - IV Computer Graphics
Unit - IV Computer Graphics
Frame Buffer: A digital frame buffer is large, contiguous piece of computer memory used to hold or map
the image displayed on the screen.
o At a minimum, there is 1 memory bit for each pixel in the raster. This amount of memory is called a
bit plane.
o A 1024 x 1024 element requires 220 (210=1024;220=1024 x 1024)sq.raster or 1,048,576 memory bits
in a single bit plane.
o The picture is built up in the frame buffer one bit at a time.
o ∵ A memory bit has only two states (binary 0 or 1), a single bit plane yields a black and white
(monochrome display).
o As frame buffer is a digital device write raster CRT is an analog device.
Properties of Video Monitor:
1. Persistence: Persistence is the duration of phosphorescence. Different kinds of phosphors are available
for use in CRT. Besides color, a major difference between phosphor in their persistence how they continue
to emit light after the electron beam is removed.
2. Resolution: Use to describe the number of pixels that are used on display image.
3. Aspect Ratio: It is the ratio of width to its height. Its measure is unit in length or number of pixels.
Aspect Ratio =
Three Dimensional Graphics
The three-dimensional transformations are extensions of two-dimensional transformation. In 2D two
coordinates are used, i.e., x and y whereas in 3D three co-ordinates x, y, and z are used.
For three dimensional images and objects, three-dimensional transformations are needed. These are
translations, scaling, and rotation. These are also called as basic transformations are represented using
matrix. More complex transformations are handled using matrix in 3D.
The 2D can show two-dimensional objects. Like the Bar chart, pie chart, graphs. But some more natural
objects can be represented using 3D. Using 3D, we can see different shapes of the object in different
sections.
In 3D when a translation is done we need three factors for rotation also, it is a component of three rotations.
Each can be performed along any three Cartesian axis. In 3D also we can represent a sequence of
transformations as a single matrix.
Computer Graphics uses CAD. CAD allows manipulation of machine components which are 3
Dimensional. It also provides automobile bodies, aircraft parts study. All these activities require realism.
For realism 3D is required. In the production of a realistic 3D scene from 2D is tough. It require three
dimension, i.e., depth.
3D Geometry
Three dimension system has three axis x, y, z. The orientation of a 3D coordinate system is of two types.
Right-handed system and left-handed system.
In the right -handed system thumb of right- hand points to positive z-direction and left- hand system thumb
point to negative two directions. Following figure show right-hand orientation of the cube.
Example: A point has coordinates in the x, y, z direction i.e., (5, 6, 7). The translation is done in the x-
direction by 3 coordinate and y direction. Three coordinates and in the z- direction by two coordinates. Shift
the object. Find coordinates of the new position.
Solution: Co-ordinate of the point are (5, 6, 7)
Translation vector in x direction = 3
Translation vector in y direction = 3
Translation vector in z direction = 2
Translation matrix is
= [5+0+0+30+6+0+30+0+7+20+0+0+1] = [8991]
x becomes x1=8
y becomes y1=9
1
z becomes z =9
Rotation
It is moving of an object about an angle. Movement can be anticlockwise or clockwise. 3D rotation is
complex as compared to the 2D rotation. For 2D we describe the angle of rotation, but for a 3D angle of
rotation and axis of rotation are required. The axis can be either x or y or z.
Following figures shows rotation about x, y, z- axis
Following figure show rotation of the object about the Y axis