COMPUTER GRAPHICS UNIT-3
COMPUTER GRAPHICS UNIT-3
Course Objectives
The aim of this course is to provide an introduction of fundamental concepts and theory of
computer graphics.
Topics covered include graphics systems and input devices; geometric representations and
2D/3D transformations; viewing and projections; illumination and color models; animation;
rendering and implementation; visible surface detection;
Course Outcomes
Acquire familiarity with the relevant mathematics of computer graphics.
Be able to design basic graphics application programs, including animation
Be able to design applications that display graphic images to given specifications
UNIT - I
Introduction: Application areas of Computer Graphics, overview of graphics systems, video-display
devices, raster-scan systems, random scan systems, graphics monitors and work stations and input
devices
Output primitives: Points and lines, line drawing algorithms (Bresenham’s and DDA Algorithm), mid-
point circle and ellipse algorithms
Polygon Filling: Scan-line algorithm, boundary-fill and flood-fill algorithms
UNIT - II
2-D geometrical transforms: Translation, scaling, rotation, reflection and shear transformations,
matrix representations and homogeneous coordinates, composite transforms, transformations between
coordinate systems
2-D viewing: The viewing pipeline, viewing coordinate reference frame, window to view-port
coordinate transformation, viewing functions, Cohen-Sutherland algorithms, Sutherland –Hodgeman
polygon clipping algorithm.
UNIT - III
3-D object representation: Polygon surfaces, quadric surfaces, spline representation, Hermite curve,
Bezier curve and B-Spline curves, Bezier and B-Spline surfaces. Basic illumination models, polygon
rendering methods.
UNIT - IV
3-D Geometric transformations: Translation, rotation, scaling, reflection and shear transformations,
composite transformations.
3-D viewing: Viewing pipeline, viewing coordinates, view volume and general projection transforms
and clipping.
UNIT - V
Computer animation: Design of animation sequence, general computer animation functions, raster
animation, computer animation languages, key frame systems, motion specifications
81
R18 B.Tech. IT Syllabus JNTU HYDERABAD
TEXT BOOKS:
1. “Computer Graphics C version”, Donald Hearn and M. Pauline Baker, Pearson Education
2. “Computer Graphics Principles & practice”, second edition in C, Foley, Van Dam, Feiner and
Hughes, Pearson Education.
3. Computer Graphics, Steven Harrington, TMH
REFERENCE BOOKS:
1. Procedural elements for Computer Graphics, David F Rogers, Tata Mc Graw hill, 2nd edition.
2. Principles of Interactive Computer Graphics”, Neuman and Sproul, TMH.
3. Principles of Computer Graphics, Shalini Govil, Pai, 2005, Springer.
82
THREE DIMENSIONAL OBJECT REPRESENTATION
Polygon surface
Polygon table
Plane equation
Polygon mesh
Quadric surfaces
Sphere, Ellipsoid
Spline representation
Where (x, y, z) is any point on the plane, and the coefficients A,B,C and
D are constants describing the spatial properties of the plane.
We can obtain the values of A,B,C and D by solving a set of three
plane equations using the coordinate values for three non collinear
points in the plane.
For that, we can select three successive polygon vertices (x1, y1, z1),
(x2, y2, z2) and (x3, y3, z3) and solve the following set of
simultaneous linear plane equations for the ratios
Let us solve the following simultaneous equations for ratios A/D, B/D, and C/D.
You get the values of A, B, C, and D.
We can identify the point as either inside or outside the plane surface according o
the sigh (negative or positive) of 𝐴𝑥+𝐵𝑦+𝐶𝑧 +𝐷 :
• Ax + By + Cz + D ≠ 0 means the point is not on the plane.
• Ax + By + Cz + D < 0 means the point is inside the surface.
• Ax + By + Cz + D > 0 means the point is outside the surface.
POLYGON MESHES:
i. spheres
ii. Ellipsoids
iii. Torus,
SPHERE:
In Cartesian coordinates, a spherical surface
with radius r cantered on the coordinates origin
is defined as the set of points (x, y, z) that satisfy
the equation.
x2 + y2 + z2 = r2
The spherical surface can be represented in
parametric form by using latitude and longitude
angles, the parameter representation in eqn (2)
provides a symmetric range for the angular
parameter θ and φ.
x = r cosφ cosθ, -π/2 <= φ<= π/2
y = r cosφ sinθ, -π <= φ <= π
z = rsinφ
ELLIPSOID
Ellipsoid surface is an extension of a spherical
surface where the radius in three mutually
perpendicular directions can have different
values the Cartesian representation for points
over the surface of an ellipsoid centered on the
origin is
TORUS
SPLINE:
Spline is a flexible strip which was long
ago used for designing the ship
Spline curve: