0% found this document useful (0 votes)
21 views159 pages

Cc&a 2

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)
21 views159 pages

Cc&a 2

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/ 159

Module – 2

Computer Graphics and


Techniques for Geometric
Modeling
Prepared By-
R S Jaisinghani
INTRODUCTION
❖CAD/CAM is a technology used to perform certain functions in design
and manufacturing with the aids of computers.

❖Computer Aided Design can be defined as the use of computer


systems to assist in the creation , modification, synthesis, analysis and
/or optimization of a design.

❖Computer Aided Manufacturing can be defined as the use of


computer systems to plan, manage, and control the manufacturing
operations through the direct or indirect computer interface with the
manufacturing machine

❖Computer Aided Engineering is defined as the use of computer to


analyse CAD geometry and allows the designer to stimulate and study
the behavior of a product so as to optimize the design
What is CAD?
• An integration of computer science technology for engineering
design.
• Use of hardware and software
• Numerical methods and optimization techniques
• 3d modeling
• Analysis
• Application
• Cad/cam integration
Difference between drawing, drafting and
design
• Drawing:- it is a rough sketch which gives some message or
information about product.
• No dimension
• Drafting: - it is a language of engineers with exact scaling,
measurement, accuracy and with standards like- ANSI, ISO,ASSE etc
• Design:- it is a complete prototype with analysis and manufacturing.
Advantages of CAD over manual drafting
• Ease to draw
• Less time consumption.
• Accuracy and precision ( 8 decimals)
• Quick access .
• Easier modification
• Good appearance in output.
• Storage facility
• Easy to share accurate information.
Application of CAD in mechanical engineering
• Automotive industry
• Aerospace and air craft industry
• Textile industry
• Medical industry
• Tool making industry
• Die manufacturing industry
• Welding and cutting industry
• Automobile industry
• Jigs and fixture manufacturing industry etc…
Tools used in mechanical engineering
• Drafting:- Autocad
• Design :- Creo, Pro-E, Catia, Solid Works, Inventor
• Analysis:- Ansys:- APDL
• Workbench
Computer Graphics
• In the year 1883, Charles Babbage invented the primitive computer.
• We know that what we cannot be expressed through words can be
expressed through pictures.
• Computer Graphics is a field which deals with pictures and images.
• “ Computer Graphics is a process of generation of images of virtual
scene using computer hardware”.
• “ Computer graphics is the use of computer hardware and a software
to create, manipulate and present pictures and images”.
• Computer Graphics is a pictorial representation and manipulation of
data by a computer”.
Computer Graphics
• Deals with the generation of a 2D and 3D model of an object using a
graph software or application software.
• 2D computer graphics: software like Autocad, cadian etc..
• Geometric entities : points, lines, polylines, curves, circle etc..
• 3D computer graphics: softwares like CATIA, solidworks,solid edge,
Autodesk, inventor etc..
• Geometric entities: cube, cylinder, cone, sphere etc..
Transformation
• Fundamental to all computer graphics systems is the ability to
simulate the manipulation of objects in space.
• Two types of transformation:
• 1. geometric transformation
• 2. coordinate transformation
Raster Scan Display
• It is the most common type of display used in CRT television and
monitors.
• In a raster scan system, the electron beam is swept across the screen,
one row at a time from top to bottom.
• As the beam is swept across the row, the beam intensity is turned on
and off to create a pattern of illuminated spots.

….. Refresh Buffer
• The picture definition that is to be drawn is stored in a memory area
called refresh buffer or frame buffer.
• The refresh buffer holds the set of intensity values for all the screen
points.
• Stored intensity values are than retrieved from the refresh buffer and
“ painted “ on the screen one row at a time.
…. Intensity range
• In a simple black and white raster scan display, the intensity value is
either is only 1 bit per pixel as it either on or off.
• But in color raster scan display system with 1 bit per pixel the frame
buffer is called “ BITMAP”.
• Whereas in color system/ multiple bit per pixel system the frame
buffer is called “ PIXMAP”.
….. Refresh Rate
• Refresh rate of raster scan display can be from 60 to 80 frames per
second.
• At the end of each scan line, the electron beam returns to the left
side of the screen to begin displaying the next scan line which is
known as “ Horizontal retrace”.
• At the end of each frame the electron beam returns to the display
new frame. This process is called “ vertical retrace”.
Advantages
• We can display real life image which have different shades.
• The color range available is way bigger than random scan display
Disadvantages
• High memory is required.
• Data about intensities of all pixel over the screen has to be stored
rather than only the area where picture is displayed.
Random Scan Display
• In random scan display the electron beam is directed to the area on
screen where the picture is to be drawn.
• Random scan display are also called vector scan display or stroke
writing or calligraphic display.
• The reason its also called vector display is because random scan
display draws the picture on line at a time.
…Refresh Buffer
• Refresh rate on a random scan system depends on the number of
lines to be displayed
• The picture definition is stored as a set of lines drawing commands in
a area of memory called refresh display file.
• The refresh display file is also called the display list or simply the
refresh buffer
Advantages
• Random scan display have higher resolution compared to raster scan
display as the picture is stored as line drawing instructions rather than
intensity values.
• It produces smooth line drawing.
• It also require less memory as we are storing information about only
the picture to be drawn rather than information about full screen.
Difference between raster and random scan
display
Raster scan display Random scan display
dots are used Lines are used
Electron beam moves from left to right Direct display vector
Less expensive More expensive
Refresh rate 60 – 80 frame per second Refresh rate 30 – 60 frame per second
Picture definition storage is known as frame buffer Refresh display
Viewing in two dimensional
• Computer graphics is used extensively in the field of architecture,
designing, advertisement etc..
• When user wants only a particular part of the image, he may wish to
enlarge the selected part to ease the work of fine tuning.
Window and viewport
• The method or process of selecting only that part of the image which
is of interest, is called windowing and the process of dropping out the
image which is not of interest is called clipping.
• When any object is drawn or created using computer graphics, we can
think of two different models:
• 1. object space: object has real dimensions
• 2. image space: the dimensions are in normalized screen coordinates.
• To convert an object space into image space scaling transformation is
required.
• Scaling factor will be less than one or greater than one.
Window to viewporttransformation
• Window-to-Viewport mapping is the process of
mapping or transforming a two-dimensional, world-
coordinate scene to device coordinates. In particular,
objects inside the world or clipping window are
mapped to the viewport. The viewport is rectangular
area on screen where world coordinates are mapped
to be displayed.
• In other words, the clipping window is used to select
the part of the scene that is to be displayed. The
viewport is used to display selected portion of
window on the output device.
Window to viewporttransformation
Window to viewport
transformation
• Window port: A world coordinate area selected for display.

• View port: This is a rectangular region of the screen which is selected


for displaying the object. In other words we can say that view port is
part of computerscreen.
• Window to Viewport Mapping- Mapping of a part of a world
coordinate scene to device coordinate is referred to as a viewing
transformation.
• Window to viewport transformation requires more thanone
transformation.
Concept of window to viewport
transformation
• It may be possible that size of viewport is smaller
than size of window or greater than size of window.
• In this case we have to expand or decrease sizeof
window according to the size ofviewport.
• In this concept same mapping is required to convert
size of window in size of viewport.
• Some mathematical computations are required to
map window and viewport.
Viewing transformation
• The process of converting the image from object space to image
space is called the viewing transformation.
• The process of mapping the image from window to viewport is called
viewing transformation.
Steps of viewing transformation
1. Translation on the window Tw
2. Scaling Sw
(selected image of the window to fit it to the box of viewport)
The scale factor Sx can be derived by taking the ratio of X-dimensions
of viewport to that of the window.
Similarly for Sy factor
3. Translation of scaled image to the place of view port Tv
mathematically , viewing transformation is
VT = Tw * Sw *Tv
Steps for window to viewport transformation (cont..)

• Step 2: Resize window to the size ofview port.


To convert window size in toview port size
following computation isrequired.
Steps for window to viewport
transformation
 Example

 Let us consider an example of view transformation.

 If our window has coordinates (10,10), (20,10), (20,20),


(10,20)
 Let our viewport coordinates are (.5,.5), (1,.5),(1,1), (.5,1)
 Take step 1: Translate window to origin
 In this case translation matrix will become

1 0 0
0 1 0
-10 -10 1
 Take step 2: convert size of window to viewport size
 sx=(1-0.5)/(11-1) 0.5/10  0.05
 sy=(1-0.5)/(11-1) 0.5/100.05

 University of sulaimanyiah - Faculty of Physical and Basic Education - Computer Dep. 2012-2013
13
 Example


 so scaling transformation matrix will be
0.05 0 0
0 0.05 0
0 0 1

 Step 3: Finally window to position of view port

1 0 0
0 1 0
0.5 0.5 1


 University of sulaimanyiah - Faculty of Physical and Basic Education - Computer Dep. 2012-2013
14
Introduction to curves
• Representation of curves
• Non parametric ( Generic ) representation
• Parametric representation
Non parametric curves
• The curve is represented as relationship between x,y and z.
• It may be expressed in form: f(x,y,z)=0
• X2/a2 + y2/b2 = 1
• aX2 + by2+ 2kxy+2gx+2hy+c = 1
Types of non – parametric representation
1. Explicit Non – Parametric Representation
Y=f(x)
Or y=f(x) and z= g(x)
2. Implicit Non – Parametric Representation
• X2/a2 + y2/b2 = 1
• aX2 + by2+ 2kxy+2gx+2hy+c = 1
Limitations of Non – Parametric
Representation of curves
1. Due to one to one relation, the explicit non – parametric
representation cannot be used for representing closed curves.
2. If the straight line is vertical or near vertical, its slope ‘m’ is infinity
or very large value. Such values are difficult to handle in
computation.
3. The implicit non – parametric representation of curves requires
solving of simultaneous equations, which is highly inconvenient and
lengthy.
Parametric representation
• The curve is represented not as the relationship between x,y and z
but as a function of independent parameter such as u or θ.
• X = x(u)
• Y = y (u)
• Z = z(u)
• Or
• X = r cos θ
• Y = r sin θ
Parametric curves
• Parametric representation of curves overcomes all difficulties of
nonparametric representation.
• Each point one is expressed not as the relationships between x,y,z but
as a function of independent parameter ‘u’. The parameter ‘u’ acts as
a local coordinate for the points on the curve.
• P (u) = [x , y] = [x(u) y (u)]
umin <= u <= u max
• Advantages
• Each variable to be treated separately
• Easily transformation
• It can be easily used for representing closed and multivalued curves.
• It is suitable for partial curves.
• It replaces slopes by tangent vectors.
Types of curves
• Analytical curves:
• The curves which are defined by the analytic equations are known as analytic
curves
• The examples of analytic curves are: line, circle, ellipse, parabola, and
hyperbola
• Synthetic curves:
• The curves which are defined by the set of data points are known as synthetic
curves
• The examples of synthetic curves are: cubic spline, B-spline. Nu- spline, beta –
spline, and Bezier curves.
• Curves are used for representing profile of: car bodies, ships, areoplane,
bottles. Etc…
Parametric representation of Lines
• P (t) = P1 +( P2 – P1) * t 0<=t<=1
• In scalar form, the equation can be written as
• x= x1 +( x2 – x1) * t 0<=t<=1
• y=y1 +(y2 – y1) * t 0<=t<=1
• z=z1 +( z2 – z1) * t 0<=t<=1
• Tangent vector of line:
• P’ = P2 – P1
• x’= x2 – x1 0<=t<=1
• y’=y2 – y1 0<=t<=1
• z’=z2 – z1 0<=t<=1
The unit vector in the direction of line is given by
A line joins two points (3,4,6) and
(5,7,1).write
1. The parametric equation of the line.
2. The tangent vector of the line.
3. The unit vector in the direction of the line.
Solution:

1. P = P1+ t (P2 – P1) where 0<=t <=1


2. P’ = P2 – P1
3. N^ = ( P2 – P1) / I P2 – P1 I
Line L1 has end points(1,2,7) and (5,6,1), while
line L2 has end points (7,3,4) and (3,9,10)
1. Find the parametric equations of the lines.
2. Find the tangent vectors of the lines
3. Are the two lines parallel or perpendicular?
4. Are the two lines intersecting? If yes, find the point of intersection.
Solution:
1. Line equation P = P1+ t (P2 – P1) where 0<=t <=1
2. Tangent vectors of the lines P’ = P2 – P1
3. Perpendicular lines: if two lines L1 and L2 are perpendicular, the dot
product of their tangent vectors should be zero.
PL1’ * PL2’
4. Parallel lines: if two lines L1 and L2 are parallel, the cross
product of their tangent vectors should be zero.
PL1’ X PL2’
5. Are two lines intersecting: if two lines L1 and L2 are intersecting then at
the point of intersecting,
PL1 = PL2
[1; 2; 7] + u [4 ; 4 ;-6] = [7 ; 3 ; 4 ] + v [-4 ; 6; 6]
Find u and v from two equation and put in third equation
1 + 4u = 7 – 4u
2+4u = 3+6u
7 – 6u = 4 + 6u
u = 0.4 and v = -0.06
It is not satisfying third equation, so lines are not intersecting.
Parametric representation of circle:
circles and circular arcs are among the most
common entities used in geometric modeling
Parametric equation of circle:
The most common form of input data for constructing a circle is the center and
radius
• xn=xc + R cos u
• yn=yc + R sin u
• zn=zc
Where , u = angle measured from the X- axis to any point P on the
circle.
The value of u is incremental from 0 to 2ᴨ .
0 < = u <= 2ᴨ
Recursive method
• xn=xc + R cos u
• yn=yc + R sin u
• zn=zc
• The coordinates of next point P n +1
Xn+1=xc + R cos (u+ Δu)
Yn+1=yc + R sin (u+ Δu)
Zn+1=zc

Xn+1=xc + R cos u. cos Δu – R sin u . Sin Δu


Yn+1=yc + R sin u . cos Δu + R cos u . Sin Δu
Zn+1=zc
Substituting values of R cos u and sin u
Xn+1=xc + ( x n – x c) cos Δu – ( y n – y c) sin Δu
yn+1=yc + ( y n – y c) cos Δu + ( x n – x c) sin Δu
Zn+1=zc
Write a parametric equation for a circle
having center at (3,7,2) and radius as 5 unit.
• Solution :
• xn=xc + R cos u
• yn=yc + R sin u
• Xc = 3
• Yc = 7
•R=5
Write a parametric equation of a circle having
centre at (3,3,0) and radius of 3 units. Calculate
the coordinates of points on a circle, if it is divided
in eight parts
Solution : The parametric equation for a circle is
• xn=xc + R cos u
• yn=yc + R sin u
Where 0 <= u <= 2 ᴨ
Points U X Y (x,y)
P1 0 6.0 3.0 (6.0 , 3.0)
P2 45 5.12 5.12 (5.12 , 5.12)
P3 90 3.0 6.0 (3.0 , 6.0)
P4 135 0.879 5.12 (0.879 , 5.12)
P5 180 0 3.0 (0 , 3.0 )
P6 225 0.879 0.879 ( 0.879 , 0.879)
P7 270 3.0 0 ( 3.0 , 0)
P8 315 5.12 0.879 ( 5.12 , 0.879)
A circle is passing through two end points A(6,4)
and B(10,10) where AB is the diameter of the
circle.
• Find the coordinates of centre point, radius, and parametric equation
of circle.
• Find the coordinates of points on the circle at u =30 to u = 120
Solution:
1. Centre of the circle
C = { (x1 +x2)\2 , (y1 + y2)\2 }
R = ½ sqrt{(x2-x1)2 + (y2-y1)2}
Xn+1=xc + ( x n – x c) cos Δu – ( y n – y c) sin Δu
yn+1=yc + ( y n – y c) cos Δu + ( x n – x c) sin Δu

Xn+1=8 + ( x n – 8) cos Δu – ( y n – 7) sin Δu


yn+1=7 + ( y n – 7) cos Δu + ( x n – 8) sin Δu
• Coordinates of a point on circle:
• At u = 0
• xn=xc + R cos u = 8+3.6 cos0 = 11.6
• yn=yc + R sin u = 7+3.6 sin0 = 7.0
• At u=0 (xn , yn) = (11.6,7.0)
U X Y (x,y)
0 11.6 7.0 (6.0 , 3.0)
30 11.11 8.8 (5.12 , 5.12)
60 9.8 10.11 (3.0 , 6.0)
90 8.0 10.6 (0.879 , 5.12)
120 6.2 10.11 (0 , 3.0 )
Parametric representation of ellipse
Parametric equation of ellipse

• xn=xc + A cos u
• yn=yc + B sin u
• zn=zc
• Where 0 <= u <= 2 ᴨ

• Recursive method
• Xn+1=xc + ( x n – x c) cos Δu – A/B*( y n – y c) sin Δu
• yn+1=yc + ( y n – y c) cos Δu + A/B * ( x n – x c) sin Δu
• Zn+1=zc
Problem:
• An ellipse has major axis 10 units and minor axis 6 units. If the centre
of ellipse is (8,5,3). Write its parametric equation.
• Solution: A= 10/2 = 5 B = 6/2 = 3
• Pc (8,5,3)
• xn=xc + A cos u = 8+5cos u
• yn=yc + B sin u = 5 + 3sin u
• zn=zc = 3
Xn+1=xc + ( x n – x c) cos Δu – A/B*( y n – y c) sin Δu
yn+1=yc + ( y n – y c) cos Δu + A/B * ( x n – x c) sin Δu
Zn+1=zc

Xn+1= 8 + ( x n – 8) cos Δu – 5/3*( y n – 5) sin Δu


yn+1= 5 + ( y n – 5) cos Δu + 5/3 * ( x n – 8) sin Δu
Zn+1=3
Synthetic curves
• The analytical curves are usually not sufficient to meet the geometric
design requirements of mechanical components.
• Representing profiles of car bodies, ships, bottles, airplane wings,….
• The curves which are defined by the set of data points are known as
synthetic curves
• Constructed to pass through a given data points, they are in
polynomial forms.
Approaches of generation of Synthetic curves
1. Interpolation: the curve passes through all the data points
Example: Hermite cubic spline curve.
2. Approximation: tries to fit a smoother curve which may be close to the
data points but may or may not pass through each of the data points.
Example: Bezier curve, B-Spline curve
The polynomial equation of synthetic curve in parametric form can be given
by
p(u) = au3 + bu2 + cu + d
Where a, b, c and d are polynomial coefficients and
umin<=u<=umax
Types of synthetic curves
1. Hermite Cubic Spline
2. Bezier Curves
3. B – Spline Curve
Hermite Cubic Spline curve
• known as Spline which are equivalent to French curve used in drafting
work of components.
• The shape of cubic spline is decided by the two end points of the
curve and tangents at the endpoints.
• Properties :
1. It is an interpolating piecewise cubic polynomial.
2. It has specified tangent at each control points.
3. It has local control over the curve.
Hermite Cubic Spline curve
• x(u) = ax u3 + bxu2 + cx u + dx
• y(u) = ay u3 + byu2 + cy u + dy
• z(u) = az u3 + bzu2 + cz u + dz
• 0<=u<=1
Problem:
• Find the equation of two dimensional Hermite Cubic Spline curve that
connects points P0(2,3) and P1(10,1) such that lines from point
P2(8,6) tangent to the curve at points P0 and P1. calculate five points
on curve.
Solution
• P0(2,3)=P0(x0,y0)
• P1(10,1) = P1(x1,y1)
• P2 = (8,6) = P2(x2,y2)
• P0’ = P2 – P0 = P0’(8-2,6-3)= P0’ = (6,3)
• P1’ = P1 – P2 = P1’(10-8,1-6)= P1’ = (2,-5)
• Px(u) = -8 u3 + 10 u2 + 6 u + 2
• Py(u) = 2 u3 - 7 u2 + 3 u + 3

U 0 0.2 0.4 0.6 0.8 1.0

Px(u) 2 3.536 5.488 7.472 9.104 10

Py(u) 3 3.336 3.208 2.712 1.944 1

(x,y) (2,3) (3.536,3.336) (5.488,3.208) (7.472,2.712) (9.104,1.944) (10,1)


Problem:
• Plot the hermite cubic curve having endpoints P0(1,3) and P1(7,2).
The tangent vector for end P0 is defined by a line joining P0 and
another point P2(10,8), whereas the tangent vector for end P1 is
defined by a line joining P1 another P3(6,0). Also plot the curve, if the
point P3 is changed to (9,6), with the other things remaining the
same.
Solution
• P0=[1 3]
• P1 = [7 2]
• P2 = [10 8]
• P3 = [6 0]
• P0’= P2 – P0 = [10-1 8-3] = [9 5]
• P1’= P3 – P1 = [ 6-7 0-2] = [-1 -2]
• Px(u) = -4 u3 + u2 + 9 u + 1
• Py(u) = 5 u3 -11 u2 + 5 u + 3

U 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
1 1.96 2.80 3.68 4.50 5.25 5.89 6.418 6.792 6.99 7
3 3.395 3.6 3.64 3.56 3.37 3.12 2.825 2.52 2.235 2
Find the equation of two dimensional Hermite cubic spline curve having end points
P0(0,0) and P1(6,3). The two control points P2(10,8) and P3(6,0) are oriented such
that lines P0,P2 and P1,P3 tangent to the curves. Plot the curve also.

• P0 (0,0) P1(6,3) P2(10,8) P3(6,0)


• Plot these points in graph paper and find the tangent vector on P0
and P1.
• The condition is first tangent should be in up direction and another in
down direction.
• On the basis of this concept find P0’ and P1’.
• Po’ is subtraction of final point and first point of the tangent.
• clc
• clear all
• clf
• p0=[0 0]
• p1=[6 3]
• p2=[10 8]
• p3=[6 0]
• s=[p0' p2']
• r=[p1' p3']
• scf(0);
• plot(s(1,:),s(2,:),'r')
• scf(1);
• plot(r(1,:),r(2,:),'g')
• From fig we can say
• P0’= P2 – P0 = (10-0, 8-0) = (10,8)
• P1’= P3 – P1= (6-6, 0-3) = (0,-3)
• PX= [u^3 u^2 u 1]* HM *[0 ; 6 ;10 ; 0]
= -2u^3 - 2u^2 + 10u
PY= [u^3 u^2 u 1]* HM *[0 ; 3 ;8 ; -3]
= -u^3 - 4u^2 + 8u
The hermite curve has the end points P0(1,1) and P1(7,4). The tangent vector for end P0 is defined by
the line between P0 and another point P2(8,7) whereas the tangent vector for end P1 is defined by
the line between P1 and point P2(8,7). Plot the curve and write the points .
• From diagram we can say,
• P0’ = P2 – P0 = (8-1 , 7-1) = (7,6)
• P1’ = P1 – P2 = (7-8 , 4 -7) = (-1 , -3)
• PX= [u^3 u^2 u 1]* HM *[1 ; 7 ;7 ; -1]
= -6u^3 + 5u^2 + 7u + 1
PY= [u^3 u^2 u 1]* HM *[1 ; 4 ;6 ; -3]
= -3u^3 + 6u + 1
Find the points on the Hermite cubic spline curve having the end points P0(1,1) and P1(7,4). The
tangent vector for end P0 is defined by the line between P0 and P2(5,6) whereas the tangent vetor for
end P1 is defined by the line between P1 and P3(10,7).
• P0(1,1)
• P1(7,4)
• P2(5,6)
• P3(10,7)
• P0’=P2 – P0 =(4,5)
• P1’= P1 – P3 =(-3,-3)
• PX= [u^3 u^2 u 1]* HM *[1 ; 7 ;7 ; -1]
= -11u^3 + 13u^2 + 4u + 1
PY= [u^3 u^2 u 1]* HM *[1 ; 4 ;6 ; -3]
= -4u^3 + 2u^2 + 5u + 1
Bezier curve
• Created by P. Bezier at Ranault Automobile company, France.
• Bezier curve is Spline curve.
• It is parametric curve.
• Provide more flexibility for changing the shape of curve.
• We can get n degree polynomial with n+1 control points.
• Polynomial is made up of coefficient.
• Degree of polynomial is the highest power of equation.
• When P(x) = u3 + 10 u2 + 6 u + 2
• The degree of this polynomial is 3.

• It is used in CAD, drawing, painting etc..
• Easy to implement.
• Not necessary to pass from all data points but influenced by the data
points.
• The shape can be controlled by data points.
• The curve passes through the first and last vertex of the polygon.
• The flexibility in controlling the shape should increase with increase in
number of the vertices of the polygon.
• The same curve is generated when the order of the vertices of the
polygon is reversed.
• The Bezier curve is always tangential to the first and last control point
and tends to follow the shape of the polygon
Blending function specification for Bazier
curve
• Suppose we have n+1 control points position (xk , yk , zk) then the
position vector P(u) where 0 <= u <=1 , is given by
• Bezier curve with 3 control points.
• P(u) = (1- u)2 P0 + 2 (1-u)P1 + u2 P2
• Bezier curve with 4 control points.
• P(u) = (1-u)3 P0 + 3u(1- u)2 P1 + 3 u2 (1-u)P2 + u3 P3
• Bezier curve with 5 control points.
• P(u) = (1-u)4 P0 + 4u(1- u)2 P1 + 6 u2 (1-u)P2 + 4u3 P3 + u4 P4
Problem:
• Plot the Bezier curve having end points P0(1,3) and P3(7,2). The other
control points are P1(5,6) and P2(6,0). Plot for the values of
u=0.2,0.4,0.8 and 1, if the characteristic polygon is drawn in the
sequence P0 – P1 – P2 – P3.
Solution:
• Bezier curve with 4 control points.
• P(u) = (1-u)3 P0 + 3u(1- u)2 P1 + 3 u2 (1-u)P2 + u3 P3
• Equation for X – coordinates :
• P(x) = (1-u)3 1 + 3u(1- u)2 5 + 3 u2 (1-u) 6 + u3 7
• P(x) = (1-u)3 + 15u(1- u)2 + 18u2 (1-u) + 7u3
• Equation for Y – coordinates :
• P(y) = (1-u)3 3 + 3u(1- u)2 6 + 3 u2 (1-u) 0 + u3 2
• P(y) = 3(1-u)3 + 18 u(1- u)2 + 2u3
U X Y P(x,y)
0 1 3 (1,3)
0.2 3.064 3.856 (3.064,3.856)
0.4 4.552 3.368 (4.552,3.368)
0.6 5.608 2.352 (5.608,2.352)
0.8 6.375 1.624 (6.376,1.624)
1.0 7 2 (7,2)
Problem:
• The coordinates of four data points P0, P1, P2 and P3 are: (2,2,0),
(2,3,0), (3,3,0) and (3,2,0) respectively. Find the equation of the Bezier
curve and determine the coordinates of points on curve for u =
0,0.25,0.5,0.75 and 1.0.
Solution:
• Bezier curve with 4 control points.
• P(u) = (1-u)3 P0 + 3u(1- u)2 P1 + 3 u2 (1-u)P2 + u3 P3
• Equation for X – coordinates :
• P(x) = (1-u)3 2 + 3u(1- u)2 2 + 3 u2 (1-u) 3 + u3 3
• P(x) =2 (1-u)3 + 6u(1- u)2 + 9u2 (1-u) + 3u3
• Equation for Y – coordinates :
• P(y) = (1-u)3 2 + 3u(1- u)2 3 + 3 u2 (1-u) 3 + u3 2
• P(y) = 2(1-u)3 + 9 u(1- u)2 + 9u2 (1-u) +2u3
U X Y P(x,y)
0 2 2 (2,2)
0.25 2.156 2.563 (2.156,2.563)
0.5 2.5 2.75 (2.5,2.75)
0.75 2.844 2.563 (2.884,2.563)
1.0 3 2 (3,2)
B – Spline Curve:
• One of the problem associated with the Bezier curves is that, with an
increase in the number of control points, the order of the polynomial
representing the curve increases.
• The (n+1) number of control points give the polynomial of nth order.
This makes the parametric equation complicated and increase the
computation.
• In order to overcome this drawback of the Bezier curves, B – Spline
curves are used.
• They are generalized form of the Bezier curve means defined by
polygon.
• Its ability is to control the curve shape locally, instead of global
control.
• This is done by using special blending functions.
Advantages of B – Spline Curves
• It gives better control.
• Curves permits to add or delete any number of control points without
changing the degree of polynomial.
• The degree of the curve is independent of the number of control
points. In Bezier curve four control points represent Cubic Bezier
curve. However, in case of B – Spline, they can generate a linear,
quadratic or cubic curve.
• It allows a local control over the shape of the Spline curve.
Geometric modeling
Introduction to modeling
• Modeling is the art of abstracting or representing the object or
system.
• The modeling can be
1. Geometric modeling : is defined as the complete representation of
an object or system with the graphical and non graphical
information.
2. non – geometric modeling : is usually applied to physical processes.
Geometric modeling
• The graphical image of an object is generated on the graphic screen of
the system by inputing three types of commands to the computer.
• The first type of commands generate basic geometric entities.
• The second type of commands accomplish the transformation of these
graphic elements.
• The third type of commands cause the various graphic elements to be joint
into the desired shape of the object.
• The user constructs a geometric model of an object through input
device. The software then converts such data into a mathematical
representations which is stored in database. The model which is
stored in database can be used for analysis, modification or transfer.
• Develop a full 3Dimention model of an object on the graphics screen
or in database, is the first step in any CAD/CAM process.
• It is base of many CAD/CAM applications such as kinematic analysis,
dynamic analysis, finite element analysis and NC, CNC programming
• Major role in full integration and automation for CAD/CAM systems.
Features of geometric models
• Stored in mathematical form
• Model modification can be carried out like move, rotate, etc..
• Evaluate the various properties of the actual object such as: mass,
volume, moment of inertia, etc.
• Provides 3D visualization of the object.
• Can be converted into the 2 Dimensional view.
• Can be used for FEA software.
• Can be used by the CAM software.
Methods of geometric modeling
• Wire frame modeling
• Surface modeling
• Solid modeling
Wire frame modeling
Wire frame modeling
• Oldest and simplest method
• Model is created by using the 2Dimensional geometric entities such as
point, lines, curves, circles etc..
• The model appears like a frame constructed out of wires, and hence it is
called as wire frame model.
• It is the skeletal representation.
• There are two tables which stores the information of a model.
1. Vertex table
2. Edge table
• There is no information about face.
Advantages of Wire frame model
• Simple to construct
• Requires less memory
• Less time require to retrieve, edit or update
Limitation
• It is very difficult and time consuming for complicated components
• Require more input data compare to solid modeling
• Complicated objects are confusing to the viewer, especially if there is
no automatic hidden line removal facility.
• Not possible to calculate the properties such as mass, volume,
moment of inertia
• Not suitable for NC tool path generation and process planning.
Surface modeling
Surface modeling
• The representation of complex objects such as : automotive bodies,
air craft bodies, ship bodies, castings and dies, cannot be achieved by
wire frame modeling. In such cases, another method of geometric
modeling known as surface modeling.
• A surface model is generated by using wire frame entities or curves(
analytical or synthetic)
• A system may require one wire frame entity (or curve) to create a
surface of revolution or it may require two wire frame entities (or
curve) to create a ruled surface.
• In order to assist the visualization of a surface on a graphics display,
artificial fairing lines, called mesh are added on the surface.
• Finer mesh lines are used to defining surfaces.
• Mesh lines are controlled by the user.
• Finer mesh requires more CPU memory.
• Mesh size does not improve its mathematical representation but only
visualization.
• Surface modeling software consists rendering features. Which gives
colour and light effects.
• Rendering enhances the aesthetic appeal of the object.
Meshing size
Advantages of surface modeling
• Complex objects can be farmed by surface modeling.
• Provides better visualization compared to wireframe modeling.
• It is possible to calculate the properties such as mass and volume.
• It is more complete than wireframe modeling.
• Used for engineering application such as generating cross sections,
finite element modeling and NC tool path generation.
• Shading of an object is possible in surface modeling.
• Surface modeling is considered as an extension of the wire frame
modeling. Wire frame model can be extracted from surface modeling
by deleting all surface entities.
Limitation of surface modeling
• More complex, more memory and time required
• Requires more training and mathematical background on the part of
the user.
Type of surfaces entities
• Analytical surfaces:- which are defined by the analytical equations.
• Plane surfaces
• Ruled surface
• Tabulated surface
• Surface of revolution
• Synthetic surfaces:- the surface entities which are defined by the set of
data points.
• Bezier surface
• B – Spline surface
• Coon patch
• Fillet surface
• Offset surface
Analytical surfaces
Plane surfaces: It is defined by three non –
coincident points.
Ruled ( lofted) surface:
It is formed by two boundary curves which are
wire frame entities.
Two boundary curves are joined by straight lines
Tabulated surface: It is generated by translating a
curve through certain distance along the
perpendicular direction to the plane of the curve.
Surface of Revolution: It is an axisymmetric surface
generated by rotating a planer wire frame entity in
a space about the axis of symmetry through
certain angle.
Synthetic surfaces
Bezier Surface: It is the synthetic surface which is
approximated by the given data points. Though
the surface does not pass through the given data
points, it is controlled by the data points.
B- Spline curve: It is the synthetic and
general surface like Bezier surface. It
locally controls
Coons patch: It is the surface created by using
the curves that form the closed boundaries.
Fillet surface: It is the blend of two surfaces which
intersect each other. If required, a fillet of
specified radius may be provided at the
intersection of two surfaces.
Offset surface: An existing surface can be
offset to create a new surface. The offset is
identical in shape with the existing surface.
Solid modeling
Solid modeling
• Easiest and most advanced method of geometric method
• Complete representation of an object
• Contains both geometric data and topological information of the
object.
• Commonly used in CAD/CAM
• Solid modeling an be converted into wire frame modeling. This type
of conversion is used to generate automatically the orthographic
views.
Geometry and Topology
• Geometry: it is the actual dimensions that defines the entities of the
object.
• Topology: it is the connectivity and associativity of the different
entities of the object. It describes the way in which the different
entities of the object are connected together.
Advantages of Solid modeling
• It is easiest and most advance method.
• Unlike the wireframe and surface modeling, which contains only
geometric data, solid models contains geometric data and topological
information about the objects.
• The solid models can be converted into wireframe model.
• Provide better visualization as compare to wire frame and surface
modeling.
• Possible to calculate properties such as mass, volume, moment of
inertia etc..
• Provides complete three dimensional definition of the objects.
Limitation of Solid modeling
• It is not possible to create the solid models automatically from the
wireframe or surface models.
• The solid models require more CPU time to retrieve, edit or update
the model.
Solid entities : the solid model of an object is
created by using three dimensional geometric
entities, known as primitives.
Methods of solid modeling
• Constructive solid geometry (CSG or C – rep)
• Boundary Representation ( B- Rep)
Constructive Solid Geometry ( CSG or C – REP)
• Most popular and widely used approach to create the solid models of
the objects.
• It is created by using the 3Dimensional entities known as primitives.
• These primitives can be combined by a mathematical set of Boolean
operations to create the solid.
• In a CSG approach, 2 or more primitives are combined by a Boolean
operations to create a desired model.
Boolean operations for constructive solid
geometry
• Union
• Intersection
• Difference
Boundary Representation ( B – REP)
• Popular and widely used.
• B- REP model of an object consists of :
• Vertices
• Loops
• Edges
• Handles
• Faces
B- Rep model of object
B- Rep Approach : a solid model of an object is
created by using a set of faces as shown in fig.
each face is bounded by the edges and each edge
is bounded by the vertices

You might also like