0% found this document useful (0 votes)
33 views45 pages

Module 1

This document discusses computer graphics techniques for geometric modeling. It describes wireframe modeling, solid modeling, and surface modeling. Wireframe models represent objects as lines, while solid models provide a complete geometric description with information about an object's internal structure. Surface models overcome ambiguities of wireframe models by representing objects as stretched surfaces. The document also discusses boundary representation and constructive solid geometry for solid modeling, as well as parametric modeling, projection methods, curve geometry representations, and hidden surface removal algorithms.

Uploaded by

Sohan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
33 views45 pages

Module 1

This document discusses computer graphics techniques for geometric modeling. It describes wireframe modeling, solid modeling, and surface modeling. Wireframe models represent objects as lines, while solid models provide a complete geometric description with information about an object's internal structure. Surface models overcome ambiguities of wireframe models by representing objects as stretched surfaces. The document also discusses boundary representation and constructive solid geometry for solid modeling, as well as parametric modeling, projection methods, curve geometry representations, and hidden surface removal algorithms.

Uploaded by

Sohan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 45

COMPUTER GRAPHICS &

TECHNIQUES FOR
GEOMETRIC MODELLING
Computer-aided engineering (CAE) is a broadly inclusive
term that includes application of the computer for general
tasks encountered in mechanical engineering, including
analysis, design, and production.
Computer-aided manufacture (CAM) is the topic
concerned with the integration of the computer into the
manufacturing process, including such tasks as controlling
real-time production devices on the factory floor.
Computer-aided design (CAD) is a general term outlining
areas where computer technology is used to speed up or
eliminate efforts by engineers within the design/analysis
cycle.
GEOMETRIC MODELING
Computer representation of the geometry of a component
using software is called a geometric model. Geometric
modeling is done in three principal ways. They are:
 Wire frame modeling
 Solid modeling
Surface modeling
These modeling methods have distinct features and
applications.
WIRE-FRAME MODELING
 In the construction of wire frame models, the edges of the
object are shown as lines.
 The image assumes the appearance of a frame constructed
out of wire, hence the name “Wire-Frame Model”.
 There are certain limitation to the models which uses wire
frame approach.
 Wire frame models are adequate for 2-D representation.
 The limitation is that all the lines that defines the edges of
model are shown in the image. There is no automatic
hidden line removal system in wire frame model.
 That means the lines that indicate the edges at the rear of
the model are also shown.
WIRE-FRAME MODELING
 This can cause image to be somewhat confusing to viewer
and is some ways image can be interpreted in different
manner.
 There are also limitation with wire frame models in the
way CAD system define models.
 For eg. In case of surface definition, as to which side of
surface is solid.
 Fig. b, c, d have the same wire frame model as shown in
fig. a.
WIRE-FRAME MODELING

Ambiguity in wire frame model


SOLID MODELING
 An improvement over wire frame models both in terms of
realism to the user and definition to the computer, is the
solid modeling approach.
 In this approach, the models are displayed as solid objects
to the viewer with very little risk of misinterpretation.
 There are two factors which promote the future of solid
modeling are;
1) Increasing awareness among the users of the
limitation of wire-frame system.
2) Development of computer hardware & software
which make solid modeling possible.
SOLID MODELING
 Solid models differ from wire frame model and surface
model in the kind of geometry information they provide.
 Wire frame models only show the edge geometry of an
object. They say nothing about what is inside of object.
 Surface model provide surface information but they too
lack information about object’s internal structure.
 Solid models provide complete geometric description of
objects.
 It gives useful geometric information and material
properties like volume, mass & C.G etc.
 In computer solid model, it is easy to frequently modify
the design model as a part of design process.
SOLID MODELING
Solid models can be used for design analysis.
Solid models are:
1) bounded
2) homogeneously three dimensional
3) Finite
 There are two basic approach to solid modeling;
 Constructive solid geometry (CSG or C-rep)
 Boundary representation (B-rep)
CONSTRUCTIVE SOLID GEOMETRY
 In this, simple geometric shapes such as cubes, spheres,
cylinder, cones etc. are used.
 These elementary geometric shapes are often called as
primitives.
 The idea is to combine this primitives to create a complex
solid model by using Boolean or logical operation such as
union, difference or intersection.
 This constructive solid geometry (CSG) approach is also
known as Building block modeling approach.
 In this approach, the modeller must position the primitives
to the proper place, then involve the required logical
operators to obtain the desired shape.
A “union” operation (A ∪ B) will combine the two to convert
them into a new solid. Fig.(c). The difference operation
(A–B) will create a block with a hole Fig. (D). An
intersection operation (A ∩ B) will yield the portion common
to the two primitives. Fig. (E).
BOUNDARY REPRESENTATION
BOUNDARY REPRESENTATION
 The Boundary representation approach requires the user to
draw the outline drawing of the part, similar to the outline
drawing commonly used in orthographic views.
 This view when undergoes a linear sweep i.e. boundary is
raised to produce a part with thickness.
 This type of method is suitable for parts which are
symmetrical about an axis since they can be easily
generated.
 Fig. shows B-rep model of an object.
SURFACE MODELING
 The higher level of sophistication in geometric modeling is
the surface modeling which can overcome many of the
ambiguities of wire frame models.
 The procedure of constructing a surface model is analogue
to stretching a thin piece of material over framework.
 Itis more convenient to construct a surface model in an
isometric view to enable clear display & visualisation of its
entities.
 Visualisation of surface is aided by addition of artificial
lines called mesh which criss-cross the surface and break it
up into network of interconnected patches.
SURFACE MODELING
 Finer the mesh size of surface, longer the time cpu takes to
construct the entities & longer it takes to plot the surface
model.
 Surface modeling has been very popular in aerospace
product design and automobile design.
 Surface modeling has been particularly useful in the
development of automobile panels and complex curved
surface of aerospace structure, dies and moulds.
PARAMETRIC MODELING
 Parametric system introduced conceptual modeling
techniques which could be used to build relationship
between geometric shapes.
 This technique relies on parametric expression defined by
the user to build the model.
 Several engineering components are made in the certain
range of dimensions, eg. Flanges, fasteners etc.
 All these will have one or more nominal dimension and
relations connecting other dimensions with these
dimension.
 Here, d1 is nominal dimension, and other dimension can be
found out by certain relation given as follows;
PARAMETRIC MODELING
d2= 2d1
L1=1.5d2
L2=0.8d1
 The user can specify value for d1 and corresponding size
of pin can be created using parametric expression.
 Thisfeature helps to create several variations of a given
product with little effort.
PARALLEL PROJECTION
PARALLEL PROJECTION
 In parallel projection, Z-coordinate is discarded & parallel
lines from each vertex on the object are extended until they
intersect the view plane.
 The point of intersection is the projection of the vertex.
 we connect the projected vertices by line segments which
correspond to connection on the original object.
 As shown in above fig. a parallel projection preserves
relative proportions of objects but does not produces the
realistic views.
PERSPECTIVE PROJECTION
PERSPECTICE PROJECTION
 The perspective projection on the other hand, produces
realistic views but does not preserves relative proportions.
 In perspective projection, the lines of projection are not
parallel, instead they all converge at a single point called
centre of projection or projection reference point.
 The object positions are transformed to the view plane
along these converged projection lines and the projected
view of an object is determined by calculating the
intersection of the converged projection lines with the view
plane as shown in fig.
CURVE GEOMETRY
 Representation of curve geometry can be carried out in
two forms:-
1) Implicit form
2) Parametric form

1) Implicit form is convenient for 2-D curves of 1st and 2nd


order.
for eg. y=mx+c for straight line
where, x & y represent coordinates of 2-D system.
CURVE GEOMETRY
2) Parametric form will be more suitable for higher order
curves. It is represented as,
X=x(u) ; Y=y(u) ; Z=z(u)
where, X,Y,Z are coordinate values on space curve, with
corresponding function x, y, z are polynomials in parameter
u.
This representation permits to quickly compute
individual x , y & z coordinates of all points on curve.
CURVE GEOMETRY :- Line
 For two position vectors p1 & p2, a
parametric representation of the
straight line segment between them
is given as;
p(u)=p1+(p2-p1)u ...... for 0 ≤ u ≤ 1
Since p(u) is a position vector,
each of the component of p(u) has a
parametric representation x(u) & y(u)
between p1 & p2 is given as:-
x(u)=x1+(x2-x1)u
y(u)=y1+(y2-y1)u ...... for 0 ≤ u ≤ 1
CURVE GEOMETRY :- Circle
Parametric form of circle whose
centre lies at the origin of the
coordinate system is given by:-
x=rcosθ
y=rsinθ ..... 0 ≤ θ ≤ 2π
where , r is radius of circle.
Alternatively, parametric form for
circle is also given by;
x=r[(1-u2)/(1+u2)]
y=r[(2u)/(1+u2)]..... -1 ≤ u ≤ 1
CURVE GEOMETRY :- Ellipse
Parametric form of ellipse whose centre
lies at the origin of the coordinate
system is given by:-
x=acosθ
y=bsinθ ..... 0 ≤ θ ≤ 2π
CURVE GEOMETRY :- Parabola
Consider an origin centered parabola
opening to the right i.e. with the axis
of symmetry along the positive x-
axis.
In rectangular coordinates the
parabola is represented by;
y2=4ax
Parametric representation is given
by;
x=tan2θ
y=±2(atanø) ..... 0 ≤ ø ≤ π/2
Hidden Surface Removal Algorithm
 In a given set of 3D objects & viewing specification, we
wish to determine which surfaces of objects are visible, so
that we can display only visible surfaces.
This process is known as hidden surface removal or visible
surface determination.
A wide variety of algorithm exist which include Back face
removal algorithm, Z-buffer algorithm, painter algorithm,
etc.
Back-Face Removal Algorithm
 The basic concept used in this algorithm is that only those
faces that are facing the camera or eye are visible.

 If 𝑁 is normal vector to a polygon surface & 𝑉 is a vector


in viewing direction from the eye position.
 The direction of light face can be identified by examining;
𝑁. 𝑉 > 0
Back-Face Removal Algorithm
 We know that dot product of two vectors, gives the
product of two vectors and cosine angle between them. i.e.
𝑁. 𝑉 = 𝑉 . 𝑁 cos 𝜃
 The cosine factor is important to us because if the vectors
are in same direction (0 ≤ 𝜃 < 𝜋/2) then cosine is positive
and overall dot product is positive.
 However if direction are opposite (𝜋/2 ≤ 𝜃 ≤ 𝜋) the
cosine is negative and overall dot product is negative.
 If the dot product is positive, we can say that the polygon
face is towards the viewer and is visible.
 If dot product is negative, then polygon face is a back face
i.e. not visible and hence can be removed.
Hidden line Removal Algorithm
Priority Algorithm:-
• This Algorithm is based on sorting all the faces in
the scene according to the largest z-cordinate value
of each face.
• Consider two boxes as shown in fig.
• Utilise proper orthographic projection to obtain
desired view of scene whose hidden lines are to be
removed.
• Utilise surface test to remove back face.
• Assign properties to the fcaes in the face list. The
priority assignment is determined by comapring two
face at a time.
Hidden line Removal Algorithm
Face Face Face Face
Priority Priority Priority Priority
List List List List
F1 1 F2 1 F3 1 F4 ł2
F2 1 F3 1 F4 2 F5 ł2
F3 1 F4 2 F5
F6 ł2
F4 2 F5 F6
F1 1
F5 F6 F1
F2 1
F6 F1 F2
F3 1

Iteration 1 Iteration 2 Iteration 3


Iteration 4
Hidden line Removal Algorithm
• The first face is assigned the highest priority i.e.1. In
iteration 1, it is F1. F1 is the intersected with other
faces in the list. The interaction between F1 and
other faces may be area overlapping in case of F1
and F4, an edge contact like in F1 and F2 and No
interaction like in F1 and F6.
• In case of area overlapping , face depth is
calculated and whose depth is more, is given higher
priority i.e.1.
• In case of edge contact, both faces are assigned
same priority.
• In case of no intersection, no priority is assigned.
Hidden line Removal Algorithm
• From iteration 1 to 3 last face does not have priority.
• In iteration 4, face F4 to F6 are assigned the priority
1 first. F4 is then intersected with F1, which is area
overlapping and depth of F1 is more hence it is
assigned priority 1 and F4 priority 2, due to which F4
to F6 priority drops from 1 to 2.
• Reorder the face and priority list such that highest
priority is in top, i.e.
Face:- [F1,F2,F3,F4,F5,F6]
Priority: - [1,1,1,2,2,2]
Clipping
• The procedure that identifies the portions of a
picture that are either inside or outside of a specified
region of space is referred to as clipping.
• The region against which an object is to be clipped
is called clipping window.
• The clipping algorithm determines which points,
lines or part of line are in clipping window and are
retained for display and all others are discarded.
Line Clipping
• The lines are said to be interior
to clipping window & hence
visible if both end points are
interior to window. eg. line
p1p2
• If both end points of line are
exterior to the window and are
not passing through the
boundary of window, are
invisible. eg. p9p10
• The lines which cross one or
more boundary require
calculation to find the visible
portion of them are called
partially visible. eg. p7p8
Ray Tracing
Ray Tracing
 Instead of identifying visible surface for each pixel, we
continue to bounce the ray around the picture or an object.
This is called Ray tracing.
When ray is bouncing from one surface to another surface,
it contributes the intensity to that surface.
This is simple and powerful rendering technique for
obtaining global reflection and transmission effects.
As shown in above fig. pixel position are designated in xy
plane and projection reference point lies on z-axis.
For each pixel ray surface is tested, that it is intersected by
ray or not.
Ray Tracing
 If it is intersected, then the distance from pixel to the
surface intersection point is calculated.
The smallest calculated intersection distance identifies the
visible surface of that picture.
The ray reflected or refracted from the surface are called
secondary rays.
The ray after reflection or refraction strikes another surface
and this process is repeated continuously and is shown by
ray tracing tree diagram.

Ray Tracing
 The left branch in binary ray tracing tree is used to
represent reflection path, & right branch is used to
represent transmission path.
 As we go from top to bottom of tree, surface intensity
decreases as distance from parent surface increases.
Computer Graphics
 Computer graphics deals with the generation of two
dimensional or three dimensional model of an object using
graphics software or application software or both.
Two Dimensional Computer graphics
 Two dimensional computer graphics deals with the
generation of two dimensional model of an object using 2D
software like Autocad.
 The various 2D geometric entities used in generation of
2D models are points, lines, circle, curves etc.
Three Dimensional Computer graphics
 Three dimensional computer graphics deals with the
generation of 3D models of an object using 3D modelling
software like catia, proe, solidworks etc.
Window & Viewport
 When the geometric models is complicated and crowded
with intricate details, it is difficult to read.
 In such situations, it is convenient to display only that
portion of geometry model which is of interest for the user
at that point of time.
 This can be done by window and viewport.
Window
 Window is that portion of geometric model or object in
model coordinate system (MCS) which is selected for
viewing or display.
 It is an area enclosed by a boundary as shown in fig.
 The technique of selecting portion of a geometric model
for viewing is called windowing.
 Thewindow gives an effect of looking at the portion of
model through a window of selected size.
 Window is a rectangle in standard position, with edges of
rectangle parallel to coordinate axes of model coordinate
system (MCS)
Viewport
 Viewport is an area on screen in UCS (user coordinate
system) where the contents of the window is displayed.
 Viewport is again a rectangle in standard position, with
edges of rectangle parallel to coordinate axes of user
coordinate system (UCS).
 While window defines what is to be viewed, viewport
defines where is to be viewed on the screen.
 The content of the window can be enlarged, decreased or
edited in viewport.
Window & Viewport
 The mapping of geometric model from model coordinate
system (MCS) to user coordinate system (UCS) is referred
to as window to viewport transformation.

You might also like