Sie sind auf Seite 1von 31

BITS Pilani

Presentation
BITS Pilani Mukesh Kumar Rohil
Department of Computer Science and Information Systems
Pilani Campus
BITS Pilani
Pilani Campus

Contact Hour: 11 Review


Session
Learning Objectives

Review of all modules


Some problems (from all Modules) and their outline
solution

BITS Pilani, Pilani Campus


Introduction to Computer
Graphics ...1
Why computer graphics?
What is computer Graphics?
Complexity involved in computer Graphics and Some
Applications of Computer Graphics
Graphics Systems
Hardcopy Technologies
Display Technologies

BITS Pilani, Pilani Campus


Introduction to Computer
Graphics 2
Tasks included in Computer Graphics
Some more applications of Computer Graphics
Representative Uses of Computer Graphics
Raster-Scan and Vector/Random Scan Display
Display Technologies

BITS Pilani, Pilani Campus


Basic Raster Graphics
Techniques
Problems on raster Scan conversion of
scan display Circles (Midpoint
Basics of Line drawing Algorithm)
Scan conversion of
Bresenhams
Ellipses
Algorithm and related
issues Examples on scan
conversion of circles
Scan conversion of
Filled primitives
Line Segment using
Mid-Point Algorithm Polygons
Polygon filling

BITS Pilani, Pilani Campus


Filled Primitives & 2D & 3D
Transformations 1
Filled primitives
Polygons
Polygon filling
2-D Transformations
Translations
Scaling
Rotation
Shear
Reflection
Homogeneous Coordinate Systems
Composition of 2-D Transformations

BITS Pilani, Pilani Campus


Filled Primitives & 2D & 3D
Transformations 2
Viewing in 2-D (Viewing Transformations)
Basic 3-D Geometric Transformations

BITS Pilani, Pilani Campus


3D Transformations and
Introduction to OpenGL
Basic 3D transformations
Composite 3D transformations
Examples on 3D transformations
Introduction to OpenGL
Code structure of an OpenGL Program

BITS Pilani, Pilani Campus


Clipping in 2D

Basics of Line Clipping


Cohen Sutherland Line Cliping
Examples on Line Clipping
Cyrus Beck Line Clipping
Sutherland Hodgeman Polygon Clipping
Examples on Clipping Algorithms

BITS Pilani, Pilani Campus


Viewing in 3D

Introduction
Projections
Perspective projections
Parallel projections

Mathematics of Planar Geometric projections

Specifying and arbitrary 3D View


Normalizing Transformations
Viewing Pipeline

BITS Pilani, Pilani Campus


Curves and Surfaces

Introduction
Applications of Curves and Surfaces
Why curves and surfaces?
Polygonal Mesh
Parametric Cubic Curves (Curves as smooth Segments)
Bi-cubic Parametric Representation of Surfaces
(Surfaces as family of Curves)
Quadric Surfaces

BITS Pilani, Pilani Campus


Solid Modeling

Introduction
Polygonal Mesh, Parametric & Quadric Surfaces to
represent solids
Representation of solids
Constructive Solid Geometry
User Interface for Solid Modelling

BITS Pilani, Pilani Campus


Hidden Surface Removal

Object Space Method: Back Face Culling


Image Space Method : Z Buffer Algorithm
A Buffer Method
Area Subdivision Method
List Priority Based Method: Depth Sorting Method
BSP Tree Method I
BSP Tree Method II

BITS Pilani, Pilani Campus


Illumination Models And
Surface Rendering

Introduction to Illumination Model And Rendering (Light


Sources)
Illumination Model: Ambient and Diffuse Reflection
Illumination Model: Specular Reflection and Phong Model
Shading Models
Constant shading
Interpolated shading
Polygon Mesh shading
Gouraud sharing
Phong Shading
Some problems with interpolated shading
BITS Pilani, Pilani Campus
Some Problems & their
outline solution
Q1. Answer the following briefly.
1) What are the desirable properties of the mask in a
shadow-mask colour CRT?
2) Define the term vanishing point.
3) Define the term Implied edge coherence in the context
of visible line determination?
4) Under what situations Phongs interpolated shading can
be better than Gouraud shading?

BITS Pilani, Pilani Campus


Answer Q1.

Q1.1 Mask should not expand more with high temperature


and for proper focussing it should not be thick.
Q1.2 The perspective projection of any set of parallel lines,
that are not parallel to the projection plane, converses to
a vanishing point.
Q1.4 If one planar face penetrates another, their line of
intersection (the implied edge) can be determined from
two points of intersection.
Q1.5 When specular reflectance model is used with the
Phongs equation; and when a highlight fails to fall at a
vertex, the Gouroud shading may miss it entirely.

BITS Pilani, Pilani Campus


Q2.

The quadric surface, 3x2 + 8y2 + 4z2 + 4xy + 6yz + 6y + 8z


= 0, is rotated by an angle of 75 degree about the axis
defined by the line [(-20, -30, -40), (300, 400, -800)]. Find
the equation of the quadric surface after the rotation?

BITS Pilani, Pilani Campus


Answer Q2

Q = {[3, 2, 0, 0],[2, 8, 3, 3],[0, 3, 4, 4],[0, 3, 4, 0],


NewQ = Q` = ((M-1)T)Q(M-1)
M = {[0.347,-0.671,-0.655,0], [0.907,0.417,0.052,0],
[0.238,-0.612,0.754,0], [23.678,-55.407,-21.379,1]}
Q = {[558.08,-102.87,39.23,-4.63],[-102.87,13.57,-
32.33,1.46],[39.23,-32.33,-53.17,1.18],[-
4.63,1.46,1.18,0]}
The above is for anticlockwise rotation. For clockwise
rotation, use the equation Q` = Q(M-1)Q((M-1)T)

BITS Pilani, Pilani Campus


Q3.

Write a computer program, to test if a point is inside,


outside or on a given polygon?

BITS Pilani, Pilani Campus


Answer Q3.

If using even-odd method, write a program to find


internal intersection of two line segments and by
taking a point outside the bounding rectangle just find
intersection of horizontal of vertical line segment
obtained by the point in interest and an external point
with each edge of the polygon (only internal
intersection to be taken), if the number of intersection
is odd the point is inside else outside. If the point is
along any edge can be judge by substituting the point
in the equation of the edges and then if is along edge
it must be within the span of the edge.

BITS Pilani, Pilani Campus


Q4.

Q4. Find equation of the projector so that the perspective


projection of the point (150, 400, 350) onto the plane
defined by the points (-1, 0, -1), (1, 1, -2), & (-1, -4, 1) is
a point at a distance of 555 (rounded) units from, the foot
(coordinates are rounded to integer) of the given point
onto the given plane?
Given, Z-coordinate of the centre of the projection = -5.

BITS Pilani, Pilani Campus


Answer Q4.

Find the equation of the plane and magnitude of normal vector


as 2x + 4y + 8z + 10 = 0 and N = root(84) respectively. For
the foot calculate t = -56.0714 (i.e. [2*(150+1) + 4*(400-0)
+ 8*(350+1)]
So foot (Xp, Yp, Zp) = (150+2t, 400+4t, 350+8t) = (38, 176,
-99)
Now using distance formula, given z-coordinate of the centre
of the projection, & eqn. for intersection of a line with a
plane, we get, centre of projection = (-1, 2, -5) & projection
= (-123, -319, -291)
So the projector in parameter u is, x = -1 + 151u, y = 2 +
398u, and z = -5 + 355u

BITS Pilani, Pilani Campus


Q5.

Q5. Write a computer program, for performing z-buffer


algorithms for hidden part removal? Assume data is
available in an array.

BITS Pilani, Pilani Campus


Answer Q5.

Use two buffers and code the algorithm


given on page number 669 of the text.
Please note that the polygon has to be
projected.

BITS Pilani, Pilani Campus


Q6.

Q6. Derive MH in the context of Hermite curves.

BITS Pilani, Pilani Campus


Answer Q6.

Hermite form of the cubic polynomial curve


segment is determined by constraints on the
end-points P1 & P4, & tangent vectos at end-
points R1 & R4.
X(t) = axt3 + bxt2 + cxt + dx = T.MH.GHx
X(0) = P1x = [0 0 0 1] MH.GHx
X(1) = P4x = [1 1 1 1] MH.GHx
X(0) = R1x = [0 0 1 0] MH.GHx
X(1) = R4x = [3 2 1 0] MH.GHx

BITS Pilani, Pilani Campus


Answer Q6. 2

P1 0 0 0 1
P4 = GHx = 1 1 1 1 MH.GHx
R1 0 0 1 1
R4 3 2 1 0
For the above to be satisfied, MH,
Hermite basis Matrix must the inverse
of the above 4 X 4 matrix.

BITS Pilani, Pilani Campus


Answer Q6. 3

-1
0 0 0 1 2 -2 1 1
1 1 1 1 -3 3 -2 -1
MH = 0 0 1 0 = 0 0 1 0
3 2 1 0 1 0 0 0

BITS Pilani, Pilani Campus


Questions if any?

Any questions ?

BITS Pilani, Pilani Campus


Thanking you all

Thanking you all for


your attention!

BITS Pilani, Pilani Campus

Das könnte Ihnen auch gefallen