L1 Merged
L1 Merged
&
Course Conduct
Computer Aided Design (CAD)
CONTENTS
Brief History of computer-aided design
CAD Process
What is CAD?
product design
drafting
concept engineering
quality production
production
control scheduling
product design
drafting
concept engineering
quality production
production
control scheduling
CG | Computer Graphics
Use of computers for graphics, display and animation.
Broad coverage:
Geometric Transformations
Viewing in 2-D & 3-D
Animation
Hidden line algorithm
Shading and colouring
Clipping and windowing
CG
Modelling
13 Computer Aided Design
What is CAD?
Future Challenges
Each generation demands more.
Features are set by the software industry leaders – we
have to guess when new features will be required by the
market.
Large international teams working on the product or
assembly.
The complexity of our designs is growing faster.
Computer-aided design
Introduction to computer-aided design (CAD)
Knuckle joint
Car body Aircraft body
Why CAD?
To release the drawings of objects
To visualize the 3D shape of objects
To conduct engineering analyses
How to do it better?
Facilitate better representation of the object shape
Lessen the computation cost less time and memory usage
Improve the design for better performance, ergonomics and aesthetics
Computer-aided design Slide #1
Introduction to curves
Disadvantages
It is compute-intensive.
It is axis-dependent whereas real-world objects are not
Computed points are not evenly distributed.
No. x y
y = +(1 – x2)1/2
1 0 1
2 0.25 0.97
3 0.5 0.87
4 0.75 0.66
5 1 0
Line Ellipse
P(u) = P1 + u(P2 – P1) , 0 ≤ u ≤ 1 P(u) = [A.cos u B.sin u] 0≤u≤2π
xn+1= xn.cos du – (A/B).yn.sin du
yn+1= yn.cos du + (A/B).xn.sin du
Directrix
Focus Axis of symmetry
What if only a collection of measured data points are available for design?
What if an existing curve must change to meet new design requirements?
Analytic curves are not sufficient
A synthetic curve offers more flexibility and control of its shape
It is described by a set of data points (control points)
Degree (k-1) does not depend on the number of control points, but limited to 2 ≤ k ≤ n+1
Local shape change is possible without changing degree.
Degree can be changed without changing the control points
Curve is pulled more sharply towards its control points by increasing its multiplicity.
This curve offers the most flexibility and is sufficient for all engineering applications
Computer-aided design
Coordinate Systems in geometric modeling software
User friendly
P (x,y)
P(x,y,z) = P [x y z]T
p(x,y,z)
Equation is solved to find its roots (y and z values) if a certain value of x is given.
If the slope of a curve at a point is vertical or near vertical, its value becomes
infinity or very large, a difficult condition to deal with in computing
Both explicit and implicit non parametric curve representations are axis
dependent (x, y). choice of coordinate system affects the ease of use. (curve
should be axis independent)
The points on axes–dependent non parametric curve are not evenly distributed.
z = z(u)
P(x,y,z) = P(u) = [x(u) y(u) z(u)]T
P’(u) = [x’(u) y’(u) z’(u)]T
Can also be written as
Slope of a straight line can be expressed as
Computer-aided design Slide #10
Advantages of Parametric Form
Computer-aided design
Parametric Representation of a Line
Computer-aided design
Parametric Representation of a Line
P = P1+ (P–P1)
P-Equation:
Computer-aided design
Parametric Representation of a Line
Computer-aided design
Parametric Representation of a Line
Computer-aided design
Model Solution for a Parametric Line
For the position vectors: P1[2 3] and P2[4 5]
(a)Write down a parametric equation
(b)Write down a scalar form
(c)Write down a Tangent Vector
(d)Find out slope
(e)Find out length
(f) Unit vector in the line direction
Computer-aided design
Model Solution for a Parametric Line
For the position vectors: P1[2 3] and P2[4 5]
(a)Write down a parametric equation
Computer-aided design
Model Solution for a Parametric Line
For the position vectors: P1[2 3] and P2[4 5]
(b) Write down a scalar form
Computer-aided design
Model Solution for a Parametric Line
For the position vectors: P1[2 3] and P2[4 5]
(c)Write down a Tangent Vector
(d)Find out slope
Computer-aided design
Model Solution for a Parametric Line
For the position vectors: P1[2 3] and P2[4 5]
(e) Find out length
Computer-aided design
Model Solution for a Parametric Line
Computer-aided design
Parametric Line [Tut-1]
For the position vectors: P1[1 2 3] and P2[4 5 6]
(a)Write down a parametric equation
(b)Write down a scalar form
(c)Write down a Tangent Vector
(d)Find out slope
(e)Find out length
(f) Unit vector in the line direction
Computer-aided design
Parametric Line [Tut-2]
Computer-aided design
Parametric Line [Tut-3]
Correlate the following CAD/M command to it’s
mathematical foundation: The command that
measures the angle between two intersecting
lines.
Computer-aided design
Parametric Line [Tut-4]
Find equations of 3 lines: L1, L2 and L3 shown in
Fig. Are L1 and L2 perpendicular? Are L1 and L3
parallel?
Computer-aided design
Parametric Line [Tut-4]
Find equations of 3 lines: L1, L2 and L3 shown in
Fig. Are L1 and L2 perpendicular? Are L1 and L3
parallel?
L1 & L2 Perpendicular:
Computer-aided design
Parametric Line [Tut-5]
Find angles between pair of lines in (a) and (b).
4,4 4,4
(a) (b)
5,5 5,5
1,1 1,1
3,3 3,3
Computer-aided design
Non-Parametric Representation of a Circle
Generate a unit circle using an Implicit Equation of Circle:
x2 + y2 = 1.
Take equal increment in x (say 0.25) and obtain y.
y = +(1 – x2)1/2
No. x y
1 0 1
2 0,25 0.97
3 0.5 0.86
4 0.75 0.66
5 1 0
Computer-aided design
Observations of
Non-Parametric Representation of a Circle
Resulting intercepts on arc/circle are unequal
and hence poor visual representation.
Calculation of square root is computationally
expensive.
Calculation has to be repeated for every point.
y = +(1 – x2)1/2
No. x y
1 0 1
2 0.25 0.97
3 0.5 0.87
4 0.75 0.66
5 1 0
Computer-aided design
Parametric Representation of a Circle
Generate a circle using a Parametric Equation.
Take equal increments in θ (say π/8) to obtain
coordinates points x and y.
Computer-aided design
We Need an Efficient Algorithm
Parametric Representation of a Circle
Computer-aided design
Need of Efficient Algorithm
Parametric Representation of a Circle
Computer-aided design
Need of Efficient Algorithm
Parametric Representation of an origin centered Circle
The Cartesian coordinates of any point on an origin –
cantered circle are then
xi = r cosui
yi = r sinui ----------------------------------(a)
Let’s take δu as an increment
xi+1 = r cos(ui + δu)
yi+1 = r sin(ui + δu) -------------------------(b)
Using the sum of the angles formulae yields
xi+1 = r (cosui*cosδu - sinui*sinδu)
yi+1 = r (cosui*sinδu + sinui*cosδu) -------(c)
With Equation (a)
xi+1 = xi *cosδu - yi * sinδu
yi+1 = xi *sinδu + yi * cosδu ----------------(d)
Computer-aided design
Need of Efficient Algorithm
Parametric Representation of an origin centered Circle
Recursive Relation
xi+1 = xi *cosδu - yi * sinδu
yi+1 = xi *sinδu + yi * cosδu ----------------(d)
Computer-aided design
Need of Efficient Algorithm
Parametric Representation of an origin centered Circle
xi+1 = xi *cosδu - yi * sinδu
yi+1 = xi *sinδu + yi * cosδu ----------------(d)
Eqn (d) represents the rotation of the point xi and yi by an “δu”.
δu = 2π/n where, n = number of segments
The value of cosδu, sinδu need to be calculated once.
The resulting algorithm represents only four multiples, one
addition and one subtraction in the inner loop. This way the
algorithm becomes efficient.
Thus the circle can start from an arbitrary point and successive
points with equal spacing can be calculated recursively. This
eliminates computation of trigonometric functions for each point.
This algorithm is useful for hardware implementation to speed up
the circle generation and display.
Computer-aided design
Need of Efficient Algorithm
Parametric Representation of a non-origin centered Circle
For a non-origin cantered circle is
obtained by translating an origin-
centered circle of appropriate radius.
Equations (a) and (b) becomes
xi = xc + r.cosui
yi = yc + r.sinui -------(a’)
Computer-aided design
Model Solution
Generate a circle of radius 2 with centre (2,2). Take 8 segments.
No of segments = 8, n = 8. We need n+1 points (starting (θ=0) and
closing point (θ=2π) will coincide).
Computer-aided design
Model Solution
Generate a circle of radius 2 with centre (2,2). Take 8 segments.
For a origin centered circle,
Computer-aided design
Model Solution
Origin centered Non-Origin centered
i
1 2 0 4 2
2 3.414 3.414
3 0 2 2 4
4 0.586 3.414
5 -2 0 0 2
6 0.586 0.586
7 0 -2 2 0
8 3.414 2.586
9 2 0 4 2
Computer-aided design
Efficient Algorithm [Tut]
Generate an efficient algorithm to generate a circle which is (a)
passes through corners of a square (b) which is inscribed in a
square
(a) Passing through corners
Pc = (P1+P3)/2 = OR = (P2+P4)/2
Computer-aided design
Efficient Algorithm [Tut]
Generate an efficient algorithm to generate a circle which is (a)
passes through corners of a square (b) which is inscribed in a
square
Pc = (P1+P3)/2 = OR = (P2+P4)/2
Computer-aided design
Efficient Algorithm [Tut]
Generate an efficient algorithm to generate a circle which is
concentric to existing circle (Black coloured) shown in Fig.
Ri = R-d | Ro = R+d
Computer-aided design
General Problem
Non-parametric equation of a circle is given by x2+y2=R2 where x = R.cos(2πu) and y =
R.Sin(2πu).
(a) Represent Equation of circle in a parametric form
(b) Using the resulting equation, write down the tangent equation
(c) Find out Tangent Equations at 0o, 45o, 90o
(d) Find out slopes at 0o, 45o, 90o
Computer-aided design
General Problem
Computer-aided design
Circular Arc
Circle and circular arcs are among the most common entities
used in wireframe modelling.
Computer-aided design
Parametric Equation
Computer-aided design
Parametric Line [Tut]
(a) Find P-equations of 2 lines: L1, L2.
(b) Find intersection point (I) of two lines
(c) Find P-equation of Circle (I is center and radius 1)
(d) Find intersection point (II) L1 and C1.
Computer-aided design
Parametric Line [Tut]
Computer-aided design
Parametric Line [Tut]
Computer-aided design
Parametric Line [Tut]
Computer-aided design
Need of Efficient Algorithm (ASSIGNMENT 1)
Computer-aided design
Modeling Analytic Curves
(Ellipse)
Computer-aided design
Representation of an Ellipse
Database Requirement:
Computer-aided design
Representation of an Ellipse
Equal Angle Increments Method
Computer-aided design
Representation of an Ellipse
Equal segments Method
Computer-aided design
Desired Increments Method: More number of points towards ends
of major axis and less number of points towards ends of minor axis
Computer-aided design
Parametric Representation of an Ellipse
Desired Increments Method: More number of points towards ends
of major axis and less number of points towards ends of minor axis
Any point on ellipse: P(u) = [x y]T
Let: xi = acosui
yi = bsinui
This clearly shows that the desired increments can be easily obtained.
Computer-aided design
Recursive Relation of an Ellipse
Xi+1, yi+1
P-Eqn: P(u) = [acosui bsinui]T
x i , yi
xi = acosui
yi = bsinui ……..(a)
Let’s take δu as an increment
xi+1 = a.cos(ui+δu)
yi+1 = b.sin(ui+δu) -------------------------(b)
Using the sum of the angles formulae yields
xi+1 = a.(cosui*cosδu - sinui*sinδu)……x(b/b)
yi+1 = b.(cosui*sinδu + sinui*cosδu)…..x(a/a)----(c)
Computer-aided design
Recursive Relation of an Ellipse
Xi+1, yi+1
P-Eqn: P(u) = [acosui bsinui]T
x i , yi
Recursive Relation:
xi+1 = xi.cosδu – (a/b). yi.sinδu
yi+1 = (b/a).xi.sinδu +yi.cosδu 0≤u ≤2π
Δu, a & b are constants | 4 multiples | One addition and one
subtraction in inner loop. Algorithm is efficient.
Computer-aided design
Need of Algorithm for
Parametric Representation of an Ellipse
0≤u ≤2π
Recursive relation
0≤u ≤2π
Computer-aided design
Model Solution
Generate an ellipse with semi-major axis a=4 and semi-minor axis
b=1, inclined 30o to the horizontal with center at (2,2). Take 32
segments.
No of segments = 32, n = 32. We need n+1 points (starting (θ=0)
and closing point (θ=2π) will coincide).
Computer-aided design
Model Solution
Computer-aided design
Model Solution
Origin centered
0≤u ≤2π
# ui xi yi
1 0 4.000 0.000
2 π/16 3.923 0.195
3 2π/16 3.696 0.383
4 3π/16 3.326 0.556
5 4π/16 2.828 0.707
6 5π/16 2.222 0.831
7 6π/16 1.531 0.924
8 7π/16 0.780 0.981
9 8π/16 0.000 1.000
Computer-aided design
0≤u ≤2π
Model Center at C(2,2) and Rotation 30o
Center at C(2,2) and Rotation 30o
ui Xi yi
0 5.465 4.000
π/16 5.300 4.131
2π/16 5.009 4.179
3π/16 4.603 4.144
4π/16 4.096 4.027
5π/16 3.509 3.831
6π/16 2.864 3.565
7π/16 2.185 3.240
8π/16 1.500 2.866
Computer-aided design
Tut-1
Find the center, lengths of half the axes and the orientation of an
ellipse defined by it’s circumscribing rectangle
Computer-aided design
Tut-1
Find the center, lengths of half the axes and the orientation of an
ellipse defined by it’s circumscribing rectangle
Computer-aided design
Tut-2
Correlate to its mathematical foundations: Ellipse inscribing a circle of
Radius R2 and circumscribed by a circle of radius R1.
Computer-aided design
Modeling Analytic Curves
(Parabola)
Computer-aided design
Representation of a Parabola
Computer-aided design
Application of a Parabola
Parabolic solar concentrator
Computer-aided design
Parametric Representation of a Parabola
Non-P Eqn.: y2 = 4 ax
One way of representation:
x = a.tan2Φ
y = ±(2).(a.tanΦ) 1/2
P(Φ) = [a.tan2Φ , ±2(a.tanΦ)1/2]T
Computer-aided design
Need of Efficient Algorithm
Parametric Representation of a Parabloa
Another way of representation:
x = a.u2 and y = 2.a.u
where, 0 ≤ u ≤ ∞ (u is not an angle).
Computer-aided design
Need of Efficient Algorithm
Parametric Representation
of a Parabola
Computer-aided design
Recursive Relation of a Parabola
Having established umin and umax, the parabola in I-quadrant can
be generated with increment in u as
δu = (umax - umin)/n-1
(i)th point:
xi = a.ui2
yi = 2.a.ui …….(a)
(i+1)th point
xi+1 = a.(ui+δu)2
yi+1 = 2.a.(ui+ δu)……(b)
xi+1 = a.ui2 + 2auiδu+ a(δu)2
yi+1 = 2.a.ui+ 2.a.δu……(c)
Computer-aided design
Recursive Relation of a Parabola
xi+1 = a.ui2 + 2.a.uiδu+ a(δu)2
Yi+1 = 2.a.ui+ 2.a.δu……(c)
Recursive Relation:
xi+1 = xi + yiδu + a(δu)2
yi+1 = yi+2aδu …………………(d)
Computer-aided design
Various Orientations
of Parabola
Computer-aided design
Model Solution
Generate a parabolic segment in the I quadrant for
1≤x≤4 for the parabola given by: x = au2 = u2 and
y = 2au = 2u
The range of x-coordinate is limited. Therefore, let’s
determine limits of u.
umin = (xmin/a)1/2 = (1/1) = 1
umax = (xmax/a)1/2 = (4/1)1/2 = 2
Let n = 10.
δu = (umax – umin)/n–1 = (2–1)/10–1 = 1/9
Computer-aided design
Recursive Relation of a Parabola
First point: u1 = umin =1
Therefore, x1 = (a.u12) = (1.12) = 1
y1 = 2au1 = 2(1)(1) = 2
For successive points, Recursive Relation:
xi+1 = xi + yδu + a(δu)2
yi+1 = yi+2aδu …………………(d)
For 2nd point:
x2 = x1 + y1δu + a(δu)2 = 1+2(1/9)+1(1/9)2 = 1.235
y2 = y1+2aδu = 2+2(1)(1/9) = 2.222
x3 =
y3 =
Once user defines 1st point other points are automatically generated as δu, a are constant.
Computer-aided design
Model Solution
Successive points are generated
i Xi yi 4
1 1 2
2 1.235 2.222 2
3 1.494 2.444
4 1.778 2.667 1 4
5 2.086 2.889
6 2.420 3.112 xi+1 = xi + yδu – a(δu)2
7 2.778 3.333 yi+1 = yi+2aδu …………………(d)
8 3.160 3.556
9 3.568 3.778
10 4.000 4
Computer-aided design
Modeling Analytic Curves
(Hyperbola)
Computer-aided design
Representation of a Hyperbola
Computer-aided design
Parametric Representation of a Hyperbola
Computer-aided design
Parametric Representation of a Hyperbola
Computer-aided design
Parametric Representation of a Hyperbola
Computer-aided design
Recursive Relation of a Hyperbola
1st Point:
xi = a.coshui
yi = b.sinhui ……..(a)
Successive points with δu as increments:
δu = (umax – umin)/n–1
cosh-1(x) = ln[x+(x2–1)1/2]
Computer-aided design
Recursive Relation of a Hyperbola
1st Point:
xi = a.coshui
yi = b.sinhui ……..(a)
Successive Points:
xi+1 = a.cosh(ui+δu)
= a(coshu.coshδu + sinhu.sinhδu) …. x(b/b)
yi+1 = b.sinh(ui+δu)
= b(sinhu.coshδu + coshu.sinhδu) …. x(a/a)
xi+1 = xi.coshδu + (a/b).yi.sinhδu)
yi+1 = (b/a) xi.sinhδu + yi.coshδu)
Computer-aided design
Model Solution
Generate 8 points on the hyperbolic segments in the I
quadrant for 4≤x≤8 with a=2, b=1.
The range of x-coordinate is limited. Therefore, let’s determine
limits of u.
umin = cosh-1(xmin/a) = 1.317
umax = cosh-1(xmax/a) = 2.063
n = 10.
δu = (umax – umin)/n–1 = (2.063–1.317)/8–1=0.107
Computer-aided design
Model Solution
Successive points are generated
i Xi yi
1 4.000 1.732
2 4.393 1.956
3 4.836 2.201
4 5.334 2.472
5 5.892 2.771
6 6.518 3.102
7 7.218 3.468
8 8.000 3.873
xi+1 = xi.coshδu + (a/b).yi.sinhδu)
yi+1 = (b/a) xi.sinhδu + yi.coshδu)
Computer-aided design
Parametric Equations of Analytic Curves
Computer-aided design
Modeling Synthetic Curves
Computer-aided design
What is synthetic curve?
Analytic curves don’t provide the flexibility that synthetic curves offer
Car bodies, ship hulls, airplane fuselage and wings, propeller blades,
shoe insoles and bottles
1. Shape Control
C2: Along with C0, C1, center of curvature is same for both curves.
Cn: Directions and magnitudes of n-th derivative are equal at the joint.
b) Bezier
c) B-Spline
Computer-aided design
Hermite cubic spline curve
Consider the physical spline as a thin elastic beam. The shape of the
spline corresponding to the deflection of the beam ‘y’, is obtained from
Euler’s equation, EI
Mx
R(x)
R(x) is the radius of curvature of the beam. For small deflection (y<< 1),
the radius of curvature is 1 y"
y"
R( x) (1 y )
2 3/ 2
Where, x along length and y represents the deflection of the beam. Now with
this Euler’s equation becomes
M ( x)
y ''
EI
Assuming there exists only simple supports and point loads, bending moment
M(x) is known to vary linearly between supports in most of the cases.
Substituting, M(x) = Ax + B, and integrating twice yields,
Ax B
y
"
EI
Double integration yields: y = C3x3 + C2x2 + C1x + C0 ----------- Algebraic rep.
3
P (u ) Ci u i , where : 0 u 1
P(u)
i 0
In scalar form,
x(u) = C3xu3 + C2xu2 + C1xu + C0x
y(u) = C3yu3 + C2yu2 + C1yu + C0y
z(u) = C3zu3 + C2zu2 + C1zu + C0z
P(u)
In matrix form,
P(u) = UT.C
U = [u3 u2 u 1]T
C = [C3 C2 C1 C0]
C0 = P0 & C1 = P’0
C2 = 3(P1–P0)–2(P’0–P’1)
C3 = 2(P0–P1)+P’0+P’1
P (u ) (2u 3 3u 2 1) (2u 3 3u 2 ) (u 3 2u 2 u ) (u 3 u 2 ) P0
Blending functions P
1
P0'
'
P1
G.C.M
(Geometry Coefficient Matrix)
P(u) = U [MH] V
P0
P
1
P0'
'
P1
G.C.M (1,1) (5,1)
(Geometry Coefficient Matrix)
Computer-aided design
Modeling Synthetic Curves
(Hermite cubic spline)
Computer-aided design
P–representation of H-Cubic Spline curve in Vector Matrix Form
P(u) = U [MH] V
P0
P
1
P0'
'
P1
G.C.M (1,1) (5,1)
(Geometry Coefficient Matrix)
P0 P1 P(u) =
(2u3–3u2+1)P0+
(–2u3+3u2)P1 +
(u3–2u2+u)P0'+
(u3–u2)P1'
P’0
P’1
P4
P’0
P3
P2
P1
P0
P0
P’’(u1=1) = P’’(u2=0)
Computer-aided design Slide #5
Blending of HCS segments
P(u) = (2u3–3u2+1)P0 + (–2u3+3u2)P1 + (u3–2u2+u)P0' + (u3–u2)P1'
P’(u) = (6u2–6u)P0 + (–6u2+6u)P1 + (3u2–4u+1)P0' + (3u2–2u)P1'
P’’(u) = (12u–6)P0 + (–12u+6)P1 + (6u–4)P0' + (6u–2)P1'
P’2 P’’(u1=1) = P’’(u2=0)
P’1
P2 P’’(u1=1) P’’(u2=0)
u2 6P0 – 6P1 + 2P’0 + 4P’1 –6P1 + 6P2 – 4P’1 – 2P’2
P’0 P1
u1 6P0 – 6P1 + 2P’0 + 4P’1 = –6P1 + 6P2 – 4P’1 – 2P’2
Changing the data points (end points) and the slope, changes the entire
shape of the spline.
This does not provide an intuitive feel required for design, not very popular.
P1
P2
P0
P1
P2
P0
Find equation of a Hermite cubic spline that passes through points: [1 2] &
[3 4] and whose tangent vectors are 2 lines connecting these two points
with [2 7] as shown.
2,7
3,4
1,2
2,7
3,4
1,2
Computer-aided design
Tutorial 3
Three composite HCS segments are to be used to form a HCS curve for a
particular application. Seg-1 with P0 [3 3] & P1 [5 4] | Seg-2 with P1 [5 4]
& P2 [7 6] | Seg-3 with P2 [7 6] & P3 [9 7]. If TVs at P0 and P3 are [3 0]
and [3 0], respectively, then evaluate intermediate TVs in terms of data
points and associated TVs.
9,7
7,6
5,4
3,3
9,7 P’3
P3
P’2
P27,6
P’1
5,4
3,3 P1
P0 P’
0
Computer-aided design
Assignment – Matlab exercise
What would be the best HCS curve to design a water slide in a theme park ?
Computer-aided design
Who is Bezier?
P1
u
P0 P3
u=0 u=1
The data points of the Bezier curve are called control points.
Only the first and the last control points lie on the curve. The other
points define the shape of the curve.
The curve is always tangent to the first and the last polygon segment.
The curve shape tends to follow the polygon shape.
The slope and shape of the Bezier curve is controlled by its data points
unlike the Hermite cubic curve.
This provides the designer with a much better feel for the relationship
between the input points and the output curve.
Hermite cubic spline is always a cubic curve, whereas the degree of the
Bezier curve is defined by the number of data points and is variable.
n + 1 data points define nth degree curve , which permits higher order
continuity. CAD systems limit the degree of the curve.
n
P (u ) Pi Bi ,n (u ) 0 u 1
i 0
Computer-aided design Slide #30
Bezier Curve | Parametric Equation
n
P(u ) Pi Bi ,n (u ) 0 u 1
i 0
Computer-aided design
Bezier Curve | Parametric Equation
n
P(u ) Pi Bi ,n (u ) 0 u 1
i 0
……
Computer-aided design
THANK YOU !
Computer-aided design
Modeling Synthetic Curves
(Bezier curve)
Computer-aided design
Bezier Curve (Bz)
As an engineer at Renault, he became a leader in the transformation of design
and manufacturing, through mathematics and computing tools, into computer-
aided design and three-dimensional modeling.
Bézier patented and popularized the Bézier curves and Bézier surfaces that are
now used in most computer-aided design and computer graphics systems.
P1
u
P0 P3
u=0 u=1
The data points of the Bezier curve are called control points.
Only the first and the last control points lie on the curve. The other
points define the shape of the curve.
The curve is always tangent to the first and the last polygon segment.
The curve shape tends to follow the polygon shape.
The slope and shape of the Bezier curve is controlled by its control points
unlike the Hermite cubic curve.
This provides the designer with a much better feel for the relationship
between the input points and the output curve.
Hermite cubic spline is always a cubic curve, whereas the degree of the
Bezier curve is defined by the number of data points and is variable.
n + 1 data points define nth degree curve , which permits higher order
continuity. CAD systems limit the degree of the curve.
n
P (u ) Pi Bi ,n (u ) 0 u 1
i 0
Computer-aided design Slide #5
Bezier Curve | Parametric Equation
n
P(u ) Pi Bi ,n (u ) 0 u 1
i 0
Computer-aided design
Bezier Curve | Parametric Equation
n
P(u ) Pi Bi ,n (u ) 0 u 1
i 0
……
Computer-aided design
Max Value of Blending Function
n
P(u ) P0 Bi ,n (u ) 0 u 1
i 0
It can be proved that,
Computer-aided design
Blending functions for a quadratic Bz Curve
Computer-aided design
Blending functions for a quadratic Bz Curve
Computer-aided design
Parametric Eqn for a quadratic Bz Curve
Computer-aided design
Blending functions for a cubic Bz Curve
Computer-aided design
Blending functions for a cubic Bz Curve
Computer-aided design
Parametric Eqn for a cubic Bz Curve
Computer-aided design
Blending functions for a quartic Bz Curve
Computer-aided design
Blending function for a pentic Bz Curve
Computer-aided design
Bezier Curve | Characteristics
The curve interpolates the 1st and last points, i.e. it passes through P0 and Pn
Computer-aided design
Bezier Curve | Characteristics
The curve interpolates the 1st and last points, i.e. it passes through P0 and Pn
Computer-aided design
Bezier Curve | Characteristics
The curve is tangent to the 1st and last segments of the characteristic polygon.
Computer-aided design
Bezier Curve | Characteristics
Computer-aided design
Bezier Curve | Characteristics
Symmetry Property:
The curve is symmetric w.r.t. u and (1-u).
This means that the sequence of control points defining the curve can
be reversed without change of shape of curve.
P3
P2
u
P1 P4
u=0 u=1
Computer-aided design
Bezier Curve | Characteristics
Computer-aided design
Bezier Curve | Characteristics
Shape Control:
The curve shape can be controlled/modified
(1) by changing one or more vertices of polygon or
(2) by keeping the polygon fixed and specifying multiple coincident points at a vertex.
Computer-aided design
Bezier Curve | Characteristics
B
i0
i ,n (u ) 1
B
i0
i ,n ( u ) (1 u ) 3 3u (1 u ) 2 3u 2 (1 u ) u 3 1
Computer-aided design
Solved example
[2 3] [3 3]
P1 P2
P0 P3
[2 2] [3 2]
Computer-aided design
Model Solution
[2 3] [3
P1 3]P2
P0 P3
[2 [3
2] 2]
Computer-aided design
Tut-1
2 1
2 1 0
Computer-aided design
Tut-1 | Solution
2 1
Computer-aided design
Composite Bezier Curve | Continuity
Fig shows 2 Bz curve segments defined by 2 sets of points: P1, P2, P3,
P4 and P4, P5, P6, P7, P8.
P8
P7
P3
P2
u1 u2
P6
P1 P4
P5
Computer-aided design
Composite Bezier Curve | Continuity
P3
P2
u
1
P1 P4
P8
Computer-aided design
Composite Bezier Curve | Continuity
P’(u1=1) = P’(u2=0)
P3 3(P4–P3) = 4(P5–P4)
P2
u (P4–P3) = 4/3(P5–P4)
1
P1 P4
P8
Computer-aided design
Composite Bezier Curve | Continuity
Computer-aided design
Tut-2
Using parametric approach prove: Point U varies from P0 to P1, defining
a linear Bezier curve and point V varies from P1 to P2, defining another
linear Bezier curve. If points U, V and B divide the line segments P0P1,
P1P2 and UV, respectively by an equal ratio then point B(u) describes a
quadratic Bezier curve.
Computer-aided design
Tut-2
As U, V and B divides P0P1, P1P2 and UV by an
equal ratio
U-P0 = u(P1–P0)
V-P1 = u(P2–P1)
B-U = u(V-U)
U = (1-u)P0 + u.P1
V = (1-u)P1 + u.P2
B = (1-u)U + uV
Computer-aided design
Limitations of Bz Curve
The curve does not pass through the control points, which is
inconvenient to some designers.
Computer-aided design
THANK YOU !
Computer-aided design