SlideShare a Scribd company logo
1 of 52
Download to read offline
PE-III : Computer Graphics
Unit – III: Geometric Modelling (Curves)
(AY 2020-21 Tri. IX)
• Prepared By:
Prof. S. S. Pachpore
Assistant Professor in
School of Mechanical Engineering, MITWPU
CONTENT OF THE UNIT
• Introduction to Curves
• Analytical Curves-
o Line,
o Circle,
o Ellipse,
o Parabola,
o Hyperbola
• Synthetic Curves-
o Hermite Cubic Spline,
o Bezier,
o B-Spline Curve
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
2
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
3
Curves:-
• Curve can be represented by an array of coordinates or by storing its analytical
equation.
• Curves are most important entities in geometric modelling of the object.
• E.g. Automobile Bodies, Ship Hulls, Aircraft wings, Shoes, Propeller Blades, Bottles,
etc.
Analytical Curve
• Curves for which input is standard
analytical mathematical equation.
• Like Point, line, arc, and conic section.
• These basic entities can be combined
together with various end conditions to
generate the overall curve design.
Synthetic Curve
• It is computed by using geometric
input parameters like point,
tangent.
• These parameters are processed to
generate curves.
• E.g. Bezier, Hermite Cubic, B-spline
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
4
Representation of Curves:-
2. Parametric Representation (Describes the object not in the form of coordinates,
but as a function of independent parameter such as )
The parametric representation of the curve is of the form:
x = x(u)
y = y(u)
z = z(u)
e.g. Parametric representation of circle can be given as
X = r cos 
Y = r sin 
Curves can be represented by two methods
1. Non-Parametric Representation (Describes the object in the form of coordinates
of the reference frame in use; i.e. relationship between x,y,z)
e.g. ax2+by2+2kxy+2gx+2hy+c=0……….(Circle)
𝑥2
𝑎2 +
𝑦2
𝑏2 − 1 = 0………..(Ellipse)
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
5
Non-Parametric Representation of Curves
Fig.: Point Representation
in Vector Form
• A Non Parametric representation describes the object directly in
terms of the coordinate of the reference frame in its use.
• The representation further classified as explicit and implicit.
 Explicit Form
P = [ x y z] = [ x f(x) g(x) ]
Thus an equation is comprises of coordinates y and z of a point
on the curve expressed as two separate functions of the third
coordinate x as the independent variable.
 Implicit Form
The implicit form of non-parametric representation is given as the intersection of two
surfaces.
F (x, y, z) = 0
G (x, y, z) = 0
Values of y and z must be computed for certain value of x.
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
6
• To understand the concept of implicit and explicit, consider a example of circle with
radius r and center at origin
• In Explicit, the equation can be written as, y = ± √ r2-x2
• In Implicit form, the same equation is written as , x2+y2=r2
Basically non-parametric equations are useful when describing objects within given
reference plane. However certain disadvantages can not be overlooked when used in
graphical algorithm,
1. If Slope of curve is vertical or nearly vertical, the value becomes infinity or very large.
Thus smoothness of the curve cant be assured.
2. Most engineering curves are independent of any coordinate system. Their shapes are
defined by the relation between various data points, so it is not useful in defining
closed curves such as circle and multivalued curves like ellipse, parabola etc.
3. The calculations required to represent non parametric curves are large.
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
7
Parametric Representation of Curves
• In Parametric representation, each point on the curve is represented with independent
single parameter ‘u’.
• This acts as local coordinate for the points on the curve and the three Cartesian coordinates
can be expressed in terms of u.
Consider a point P(x, y, z) in space. In
parametric form this point will be
expressed as
P(u)= [ x y z] = [ x(u) y(u) z(u) ]
where, umin < u < umax
Note: In parametric form Concept of
tangent vector is used.
Thus, the tangent vector can be
defined as,
P’(u)=
𝒅𝑷(𝒖)
𝒅𝒖
= [ 𝒙′ 𝒖 𝒚′ 𝒖 𝒛′ 𝒖 ]
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
8
Advantages of Parametric Representation:
1. Can be easily used for representing closed or multivalued curves.
2. It replaces slopes by tangent vectors.
3. For curves such as conics or cubic, the parametric representation uses polynomials rather
than equations involving roots.
Thus, parametric
representation is
more suitable and
attractive for CAD
applications.
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
9
Concept of Vector Algebra
A Vector can be defined as difference between two point
position.
A = P2-P1 = [x2 y2] – [x1 y1] = [ x2-x1 y2-y1] = [Ax Ay]
Thus in three dimensional form [Ax Ay Az]
1. Magnitude of Vector: |A| = √ Ax
2+Ay
2
2. Unit Vector In direction of A: nA=
𝑨
𝑨
= 𝒏𝑨𝒙𝒊 + 𝒏𝑨𝒚𝒋 + 𝒏𝑨𝒛𝒌
3. Vector Addition: A+B= [Ax+Bx Ay+By]
4. Vector Subtraction: A-B =A+ (-B)
5. Dot Product of Two Vectors: A*B = B*A = AxBx+AyBy =|A| |B| cos
(=angle between two vector)
6. Cross Product of Two Vectors: A x B= (|A| |B| sin) I
(I= unit vector perpendicular to both A & B,
= angle between two vectors such as 0π)
Fig.: Vector
Representation
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
10
Analytical Curve: LINE
A line can be represented in a parametric form by an input of two endpoints or by one point
and a length and direction. In Geometric Modelling LINE can be represented in 2 ways
1. Line Connecting two End Points P1 and P2
Fig.: Line with two End Points
• Consider a line with two end points P1 (x1,y1,z1) and P2
(x2,y2,z2) for which position vectors are P1 and P2
• Now, consider a point P (x,y,z) on line P1P2. Under Parametric
system consideration such that point P is represented by ‘u’
such that its values are 0 and 1 at endpoints P1 and P2
• In Δ OPP1 , vector between endpoints P1 and P can be
expressed as P1-P, represented by parameter u.
𝑬𝒏𝒅 𝒑𝒐𝒊𝒏𝒕 𝒍𝒆𝒏𝒈𝒕𝒉 𝒊𝒏 𝒄𝒂𝒓𝒕𝒆𝒔𝒊𝒂𝒏 𝒔𝒑𝒂𝒄𝒆
𝑬𝒏𝒅𝒑𝒐𝒊𝒏𝒕 𝒍𝒆𝒏𝒈𝒕𝒉 𝒊𝒏 𝒑𝒂𝒓𝒂𝒎𝒆𝒕𝒓𝒊𝒄 𝒔𝒑𝒂𝒄𝒆
= 𝑫𝒊𝒔𝒕𝒂𝒏𝒄𝒆 𝒐𝒇 𝑷 𝒇𝒓𝒐𝒎 𝑷𝟏 𝒊𝒏 𝒄𝒂𝒓𝒕𝒆𝒔𝒊𝒂𝒏 𝒔𝒑𝒂𝒄𝒆
𝑫𝒊𝒔𝒕𝒂𝒏𝒄𝒆 𝒐𝒇 𝑷 𝒇𝒓𝒐𝒎 𝑷𝟏 𝒊𝒏 𝒑𝒂𝒓𝒂𝒎𝒕𝒓𝒊𝒄 𝒔𝒑𝒂𝒄𝒆
mapping between parametric
and Cartesian space
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
11
𝑷𝟐−𝑷𝟏
𝟏
= 𝑷−𝑷𝟏
𝒖
i.e. (P-P1) = u (P2-P1) P= P1 + u (P2-P1)
where, 0  u  1
• Thus, in scalar form it can be written as,
x = x1 + u (x2-x1)
y= y1 + u (y2-y1)
z = z1 + u (z2-z1) where, 0  u  1
• Tangent Vector of line P1P2,
x’ = (x2-x1)
y’= (y2-y1)
z’ = (z2-z1)
• Length of line P1P2:
L= |P2-P1| = √ (x2-x1)2+(y2-y1)2+(z2-z1)2
• Unit Vector in the direction of line is
n=
𝑷′
𝑳
=
𝒙′
𝑳
𝒊 +
𝒚′
𝑳
𝒋 +
𝒛′
𝑳
𝒌
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
12
2. Line passing through point and defined by a length and direction
• Consider a case where a line is to pass through a point P1
and has its length L and direction vector n.
• The computation of the endpoint of this line needs to be
done based on the above points..
n=
𝑷−𝑷𝟏
𝑳
P= P1 + L n where, - ∞  u  ∞
Fig.: Line with length and direction
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
13
Pb.1 A line is represented by end points P (5,7,2) and Q (-4,6,3). If ‘u’ at P and Q is
0 and 1 respectively. Determine its length and also determine the coordinates of
points represented by u=0.4, u=-0.25, u=1.5.
Given Points P (5,7,2) and Q (-4,6,3)
Step 1: Writing parametric equation of line. R= P + u (Q-P)………. 0  u  1
i.e. =
5
7
2
+ 𝑢
−4 − 5
6 − 7
3 − 2
5
7
2
+ u
−9
−1
1
In scalar form the equations can be written as,
x = 5 + u (-9)
y= 7 + u (-1)
z = 2 + u (1)
Step 2: Finding out length of line.
L = √ (x2-x1)2+(y2-y1)2+(z2-z1)2
= √ (-4-5)2+(6-7)2+(3-2)2 = √ 83 = 9.11mm
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
14
Step 3: Finding out coordinate of points
At u= 0.4:
S=
5
7
2
+ u
−9
−1
1
=
1.4
6.6
2.4
At u= - 0.25:
T=
5
7
2
+ u
−9
−1
1
=
7.25
7.25
1.75
At u= 1.5:
W=
5
7
2
+ u
−9
−1
1
=
−8.5
5.5
3.5
Thus at u= 0.4 coord. S(1.4,6.6,2.4) Thus at u= -0.25 coord. T(7.25,7.25,1.75)
Thus at u= 1.5 coord. W(-8.5, 5.5, 3.5)
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
15
Pb.2 If line L1 has end points (1,2,7) and (5,6,1), while line L2 has end points
(7,3,4), (3,9,10)
• Find the Equation of the line
• Find the tangent vectors of the line
• Are two lines parallel or perpendicular?
• Are two lines intersecting? If yes, find the point of intersection.
Given end Points (1,2,7) and (5,6,1) for L1 and for L2 (7,3,4), (3,9,10)
Step 1: Writing parametric equation of line.
For line L1: PL1= P1+u (P2-P1) and
For line L2: PL2= P3+u (P4-P3)
i.e. =
1
2
7
+ 𝑢
5 − 1
6 − 2
1 − 7
1
2
7
+ u
4
4
−6
i.e. =
7
3
4
+ 𝑣
3 − 7
9 − 3
10 − 4
7
3
4
+ v
−4
6
6
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
16
Step 2: Finding out Tangent Vectors.
For line L1: P’L1= (P2-P1) and
For line L2: P’L2= (P4-P3)
For Line L1
P’L1 = [i j k ]
5 − 1
6 − 2
1 − 7
=
4
4
−6
i.e. 4i+4j-6k
For Line L2
P’L2 = [i j k ]
3 − 7
9 − 3
10 − 4
=
−4
6
6
i.e. -4i+6j+6k
Step 3: Checking for Perpendicularity and Parallelism.
For perpendicularity the dot product of P’L1 P’L2 should be equal to zero.
P’L1 * P’L2 = (4i+4j-6k)*(-4i+6j+6k) = (4*-4)+(4*6)+(-6*6)= -28 ≠ 0…lines are not perpendicular
For parallelism the cross product of P’L1 P’L2 should be equal to zero.
P’L1 x P’L2 =
𝑖 𝑗 𝑘
4 4 −6
−4 6 6
= 60i + 40k ≠ 0…lines are not parallel
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
17
For two lines to be intersecting then the point of intersection PL1 = PL2
Step 3: Are two line intersecting
i.e.
1
2
7
+ u
4
4
−6
=
7
3
4
+ v
−4
6
6
i.e. 1+4u = 7-4v ; 2+4u = 3+6v ; 7-6u = 4+6v …………………. Solve these simultaneously by
rearranging the terms to get values of u and v
u= 1 and v= 0.5………put these values in third/remaining equation and check whether it is
satisfying the condition i.e. LHS=RHS (* Check values)
Step 4: Finding out point of intersection.
The point of intersection can be found out either by substituting the value of u or v
in
1
2
7
+ u
4
4
−6
or
7
3
4
+ v
−4
6
6
…….. Thus point of intersection is (5,6,1)
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
18
Pb.3 Determine the angle between two lines for which end points are known
L1 = P1 (2,2), P2 (8,7)
L2 = P3 (5,1), P4 (10,3)
In our case, A represents line 1 i.e. with point P1 and P2 and B represents line 2
i.e. with points P3 and P4.
(P2-P1). (P4-P3) = |P2-P1| |P4-P3| cos 
i.e. cos =
𝑥2−𝑥1 𝑥4−𝑥3 +(𝑦2−𝑦1)(𝑦4−𝑦3)
[ 𝑥2−𝑥1
2
+ 𝑦2−𝑦1
2
] [ 𝑥4−𝑥3
2
+ 𝑦4−𝑦3
2
]
= 0.951 thus = 18.004 deg.
Solution:
Angle between two line can be found out by using the concept of dot product.
Step 1: Writing down the equation of Dot Product.
A*B=|A| |B| cos
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
19
Analytical Curve: Circle
Incremental Method/ Recursive Method
Consider Point Pn (xn, yn, zn) on a circle, the
subsequent point incremental point is
Pn+1 (xn+1, yn+1, zn+1).
for 0  u  2π
Circle can be represented in parametric form as:
X= Xc + R cos u
Y=Yc + R sin u
Z= Zc
The parametric equation can be rewrite as:
xn= xc + R cos u R cos u = xn-xc
yn=yc + R sin u R sin u = yn-yc
Fig.: Circle in parametric Form
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III) 20
Similarly, The parametric equation can be rewrite as:
Xn+1= xc + R cos (u+Δu)
Yn+1=yc + R sin (u+Δu)
and Zn+1= Zn
By rearranging the equations,:
Xn+1= xc + R (cos u*cos Δu)-R (sin u*sin Δu)
Xn+1= xc +(xn-xc) cos Δu – (yn-yc ) sinΔu
Similarly,
Yn+1= yc + (yn-yc) cos Δu + (xn-xc ) sinΔu
and Zn+1= Zn
The advantage of this
method is that trigonometric
functions in terms of Δu is
constant and needs to be
worked only once. This
method is efficient in plotting
the subsequent points on the
circle.
The center point and radius of circle is given by;
[xc, yc, zc]T = [ ½ (x1+x2), ½ (y1+y2), ½ (z1+z2)]T
Radius = ½ √ (x2-x1)2+(y2-y1)2+(z2-z1)2
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
21
Pb.1 A circle is defined by the center point (4,6) and radius 5. Determine the
various points on the circle in the first quadrant, if the increment between each
point is 30 deg.
Solution:
Now given is xc= 4, yc =6, R=5 and Δu =30 deg.
Step:1 finding out xn and yn
xn= xc + R cos u = 9 and yn= yc + R sin u= 6
Step:2 determination of cos and sin component of Δu
cos Δu = 0.866 and sin Δu = 0.5
Step:3 calculating the coordinates in first quadrant
Prepare a table
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
22
xn yn xn+1= xc +(xn-xc) cos Δu –
(yn-yc ) sinΔu
yn+1= yc + (yn-yc) cos Δu +
(xn-xc ) sinΔu
9 6 4+ (9-4)*0.866+(6-
6)*0.5= 8.3301
6+ (6-6)*0.866+(9-4)*0.5=
8.5
8.3301 8.5 4+(8.3301-4)*0.866 –
(8.5-6)*0.5= 6.5
6+ (8.5-6)*0.866 + (8.3301-
4)* 0.5= 10.33
6.5 10.330 4+ (6.5-4)*0.866-(10.33-
6)*0.5= 4
6+ (10.330-6)*0.866+(6.5-
4)*0.5= 11
Coordinates of a circle in
1st quadrant
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
23
Pb.2 A circle is passing through end points A (6,4), B (10,10) where AB is the
diameter of circle. Find the coordinates of center point, radius and parametric
equation of circle. Also find the coordinates of points on the circle at  = 30 deg.
and 120 deg.
Solution:
Center point = (xc,yc)= ½ (x1+x2) , ½ (y1+y2) = (8,7)
Radius of circle = ½ √ (x2-x1)2+(y2-y1)2+(z2-z1)2 = 3.6
Step:1 finding out xn and yn
xn= xc + R cos u = 11.6 and yn= yc + R sin u= 7
Step:2 determination of cos and sin component of Δu
cos Δu = 0.866 and sin Δu = 0.5
Step:3 calculating the coordinates in first quadrant
Prepare a table
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
24
 xn yn xn+1= xc +(xn-xc) cos Δu –
(yn-yc ) sinΔu
yn+1= yc + (yn-yc) cos Δu +
(xn-xc ) sinΔu
30 11.6 7 11.11 8.8
60 11.11 8.8 9.8 10.11
90 9.8 10.11 8 10.6
120 8 10.6 6.2 10.11
Coordinates of a circle in
1st quadrant
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
25
Pb.3 A circle is represented by center point (5,5) and radius 7 units. Find the
parametric equations of circle and determine the various points in first quadrant if
the increment is 15 deg.
Ans:
u xn yn5
15 11.76 6.81
30 11.06 8.5
45 9.9476 9.9489
60 8.5 11.06
75 6.8 11.76
90 5 12
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
26
Analytical Curve: Ellipse
Ellipse can be represented in
parametric form as:
X= Xc + A cos u
Y=Yc + B sin u
Z= Zc for 0  u  2π
Incremental/ Recursive Method
Xn+1= xc +(xn-xc) cos Δu –
𝐴
𝐵
(yn-yc ) sinΔu
Yn+1= yc + (yn-yc) cos Δu +
𝐴
𝐵
(xn-xc ) sinΔu
Zn+1= Zn
Fig.: Ellipse in parametric Form
For Inclined Ellipse
X= xc + A cos u. cos  - B sin u. sin 
Y= yc + A cos u. sin  + B sin u. cos 
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
27
Analytical Curve: Parabola
Parabola can be represented in
parametric form as:
X= Xv+ Au2
Y=Yv + Au2
Z= Zc for 0  u  ∞
Xn+1= xn +(yn-yv) Δu +A (Δu)2
Yn+1= yn +2A Δu
Zn+1= Zn
Fig.: Parabola in parametric Form
Incremental/ Recursive Method
For Inclined Parabola
X= xv + Au2 cos  - 2Au. sin 
y= yv + Au2 sin  + 2Au. cos 
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
28
Analytical Curve: Hyperbola
Fig.: Hyperbola in parametric Form
Hyperbola can be represented in
parametric form as:
X= Xv+ A cosh (u)
Y=Yv + B sinh (u)
Z= Zc
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
29
Synthetic Curve
Fig.: Interpolation Curve
Fig.: Approximation Curve
The curves which are defined by the set
of data points are known as Synthetic
Curves.
They are always in Polynomial Form.
Very vital in design because, the analytical
curve are usually not sufficient to meet the
geometric design requirements of
mechanical components.
Applications: For representing profiles of
car bodies, ship hulls, airplane wings,
propeller blades, shoe insoles, bottles, etc.
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
30
Polynomial form of Synthetic Curve:
P(u)= C3u3+C2u2+C1u+C0 where, u = parameter
Ci = Polynomial Coefficients
In scalar form the equation can be represented as,
x(u)= C3xu3+C2xu2+C1xu+C0x
y(u)= C3yu3+C2yu2+C1yu+C0y
z(u)= C3zu3+C2zu2+C1zu+C0z
To achieve the necessary smoothness of curve, certain continuity conditions have to
be imposed. Depending on these conditions, the following curves can be defined,
C0 = Zero Order Continuity (Position)
C1 = First Order Continuity (Slope)
C2 = Second Order Continuity (Curvature)
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
31
C0 = Zero Order Continuity (Position)
For S2 Curve
x(u)= a2xu3+b2xu2+c2xu+d2x
y(u)= a2yu3+b2yu2+c2yu+d2y
z(u)= a2zu3+b2zu2+c2zu+d2z
For S1 Curve
x(u)= a1xu3+b1xu2+c1xu+d1x
y(u)= a1yu3+b1yu2+c1yu+d1y
z(u)= a1zu3+b1zu2+c1zu+d1z
For C0
xs1(umax)= xs2(umin)
ys1(umax)= ys2(umin)
zs1(umax)= zs2(umin)
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
32
C1 = First Order Continuity (Slope)
For S2 Curve
X’(u)= 3a2xu2+2b2xu+c2x
Y’(u)= 3a2yu2+2b2yu+c2y
Z’(u)= 3a2zu2+2b2zu+c2z
For S1 Curve
X’(u)= 3a1xu2+2b1xu+c1x
Y’(u)= 3a1yu2+2b1yu+c1y
Z’(u)= 3a1zu2+2b1zu+c1z
For C1
X’s1(umax)= x’s2(umin)
Y’s1(umax)= y’s2(umin)
Z’s1(umax)= z’s2(umin)
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
33
C2 = Second Order Continuity (Curvature)
For S2 Curve
X’’(u)= 6a2xu+2b2x
Y’’(u)= 6a2yu+2b2y
Z’’(u)= 6a2zu+2b2z
For S1 Curve
X’’(u)= 6a1xu+2b1x
Y’’(u)= 6a1yu+2b1y
Z’’(u)= 6a1zu+2b1z
For C2
X’’s1(umax)= x’’s2(umin)
Y’’s1(umax)= y’’s2(umin)
Z’’s1(umax)= z’’s2(umin)
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
34
Major CAD/CAM systems defines three types of synthetic curve
1.Hermite Spline
2.Bezier Curve
3.B-Spline Curve
24 May 2021
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
35
Continuity representation of curve
• For Segment ‘a’ eqaution is 𝒚 = −𝟎. 𝟑𝟔𝟓𝒙 + 𝟐𝟔. 𝟕𝟑
• For Segment ‘b’ eqaution is 𝒚 = 𝟎. 𝟖𝟑𝟔𝒙 + 𝟑. 𝟒𝟕𝟗
b
a
ua=0
ua=1
ub=0
ub=1
Ines Joined
Segment
Type
Equations
Continuity
Conditions
C0 C1 C2
a-b Linear
a: 𝒚 = −𝟎. 𝟑𝟔𝟓𝒙 + 𝟐𝟔. 𝟕𝟑
b: 𝒚=𝟎.𝟖𝟑𝟔𝒙+𝟑.𝟒𝟕𝟗
- - Y
https://www.youtube.com/watch?v=A3lDRn6jafs
P1
P2
P3
Scanned with CamScanner
Scanned with CamScanner
Scanned with CamScanner
Scanned with CamScanner
Scanned with CamScanner
Scanned with CamScanner
Scanned with CamScanner
Scanned with CamScanner
Scanned with CamScanner
Scanned with CamScanner
Scanned with CamScanner
Scanned with CamScanner
Scanned with CamScanner
Scanned with CamScanner
Scanned with CamScanner
Scanned with CamScanner
Scanned with CamScanner

More Related Content

Similar to UNIT III Geometric curves unit 3 geometric modeling

G coordinate, s tat, c measure
G coordinate, s tat, c measureG coordinate, s tat, c measure
G coordinate, s tat, c measuremorabisma
 
Projection.pdf is CAD CAM engg is that the
Projection.pdf is CAD CAM engg is that theProjection.pdf is CAD CAM engg is that the
Projection.pdf is CAD CAM engg is that theGunjanKolhe5
 
Class 14 3D HermiteInterpolation.pptx
Class 14 3D HermiteInterpolation.pptxClass 14 3D HermiteInterpolation.pptx
Class 14 3D HermiteInterpolation.pptxMdSiddique20
 
Ijcatr03051008Implementation of Matrix based Mapping Method Using Elliptic Cu...
Ijcatr03051008Implementation of Matrix based Mapping Method Using Elliptic Cu...Ijcatr03051008Implementation of Matrix based Mapping Method Using Elliptic Cu...
Ijcatr03051008Implementation of Matrix based Mapping Method Using Elliptic Cu...Editor IJCATR
 
Analytic geometry lecture1
Analytic geometry lecture1Analytic geometry lecture1
Analytic geometry lecture1admercano101
 
Computer graphics notes 2 tutorials duniya
Computer graphics notes 2   tutorials duniyaComputer graphics notes 2   tutorials duniya
Computer graphics notes 2 tutorials duniyaTutorialsDuniya.com
 
Implicit Interpolation Analytical Curves
Implicit Interpolation Analytical CurvesImplicit Interpolation Analytical Curves
Implicit Interpolation Analytical CurvesSharath Kumar
 
Introduction to Data Science With R Lab Record
Introduction to Data Science With R Lab RecordIntroduction to Data Science With R Lab Record
Introduction to Data Science With R Lab RecordLakshmi Sarvani Videla
 
Beginning direct3d gameprogrammingmath03_vectors_20160328_jintaeks
Beginning direct3d gameprogrammingmath03_vectors_20160328_jintaeksBeginning direct3d gameprogrammingmath03_vectors_20160328_jintaeks
Beginning direct3d gameprogrammingmath03_vectors_20160328_jintaeksJinTaek Seo
 
5.vector geometry Further Mathematics Zimbabwe Zimsec Cambridge
5.vector geometry   Further Mathematics Zimbabwe Zimsec Cambridge5.vector geometry   Further Mathematics Zimbabwe Zimsec Cambridge
5.vector geometry Further Mathematics Zimbabwe Zimsec Cambridgealproelearning
 
Computer graphics unit 4th
Computer graphics unit 4thComputer graphics unit 4th
Computer graphics unit 4thTEJVEER SINGH
 
Copyright © Cengage Learning. All rights reserved. ‹#›.docx
Copyright © Cengage Learning. All rights reserved. ‹#›.docxCopyright © Cengage Learning. All rights reserved. ‹#›.docx
Copyright © Cengage Learning. All rights reserved. ‹#›.docxbobbywlane695641
 

Similar to UNIT III Geometric curves unit 3 geometric modeling (20)

G coordinate, s tat, c measure
G coordinate, s tat, c measureG coordinate, s tat, c measure
G coordinate, s tat, c measure
 
Projection.pdf is CAD CAM engg is that the
Projection.pdf is CAD CAM engg is that theProjection.pdf is CAD CAM engg is that the
Projection.pdf is CAD CAM engg is that the
 
precalculus 6.3
precalculus 6.3precalculus 6.3
precalculus 6.3
 
Geometric algorithms
Geometric algorithmsGeometric algorithms
Geometric algorithms
 
Class 14 3D HermiteInterpolation.pptx
Class 14 3D HermiteInterpolation.pptxClass 14 3D HermiteInterpolation.pptx
Class 14 3D HermiteInterpolation.pptx
 
Curves and surfaces
Curves and surfacesCurves and surfaces
Curves and surfaces
 
Ijcatr03051008Implementation of Matrix based Mapping Method Using Elliptic Cu...
Ijcatr03051008Implementation of Matrix based Mapping Method Using Elliptic Cu...Ijcatr03051008Implementation of Matrix based Mapping Method Using Elliptic Cu...
Ijcatr03051008Implementation of Matrix based Mapping Method Using Elliptic Cu...
 
Analytic geometry lecture1
Analytic geometry lecture1Analytic geometry lecture1
Analytic geometry lecture1
 
Computer graphics notes 2 tutorials duniya
Computer graphics notes 2   tutorials duniyaComputer graphics notes 2   tutorials duniya
Computer graphics notes 2 tutorials duniya
 
Implicit Interpolation Analytical Curves
Implicit Interpolation Analytical CurvesImplicit Interpolation Analytical Curves
Implicit Interpolation Analytical Curves
 
Ijetcas14 567
Ijetcas14 567Ijetcas14 567
Ijetcas14 567
 
Introduction to Data Science With R Lab Record
Introduction to Data Science With R Lab RecordIntroduction to Data Science With R Lab Record
Introduction to Data Science With R Lab Record
 
Beginning direct3d gameprogrammingmath03_vectors_20160328_jintaeks
Beginning direct3d gameprogrammingmath03_vectors_20160328_jintaeksBeginning direct3d gameprogrammingmath03_vectors_20160328_jintaeks
Beginning direct3d gameprogrammingmath03_vectors_20160328_jintaeks
 
5.vector geometry Further Mathematics Zimbabwe Zimsec Cambridge
5.vector geometry   Further Mathematics Zimbabwe Zimsec Cambridge5.vector geometry   Further Mathematics Zimbabwe Zimsec Cambridge
5.vector geometry Further Mathematics Zimbabwe Zimsec Cambridge
 
Computer graphics unit 4th
Computer graphics unit 4thComputer graphics unit 4th
Computer graphics unit 4th
 
Plano numerico.
Plano numerico.Plano numerico.
Plano numerico.
 
Curves
CurvesCurves
Curves
 
Copyright © Cengage Learning. All rights reserved. ‹#›.docx
Copyright © Cengage Learning. All rights reserved. ‹#›.docxCopyright © Cengage Learning. All rights reserved. ‹#›.docx
Copyright © Cengage Learning. All rights reserved. ‹#›.docx
 
Lecture6.orig.ppt
Lecture6.orig.pptLecture6.orig.ppt
Lecture6.orig.ppt
 
Lecture6.orig.ppt
Lecture6.orig.pptLecture6.orig.ppt
Lecture6.orig.ppt
 

Recently uploaded

Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 

Recently uploaded (20)

Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 

UNIT III Geometric curves unit 3 geometric modeling

  • 1. PE-III : Computer Graphics Unit – III: Geometric Modelling (Curves) (AY 2020-21 Tri. IX) • Prepared By: Prof. S. S. Pachpore Assistant Professor in School of Mechanical Engineering, MITWPU
  • 2. CONTENT OF THE UNIT • Introduction to Curves • Analytical Curves- o Line, o Circle, o Ellipse, o Parabola, o Hyperbola • Synthetic Curves- o Hermite Cubic Spline, o Bezier, o B-Spline Curve 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 2
  • 3. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 3 Curves:- • Curve can be represented by an array of coordinates or by storing its analytical equation. • Curves are most important entities in geometric modelling of the object. • E.g. Automobile Bodies, Ship Hulls, Aircraft wings, Shoes, Propeller Blades, Bottles, etc. Analytical Curve • Curves for which input is standard analytical mathematical equation. • Like Point, line, arc, and conic section. • These basic entities can be combined together with various end conditions to generate the overall curve design. Synthetic Curve • It is computed by using geometric input parameters like point, tangent. • These parameters are processed to generate curves. • E.g. Bezier, Hermite Cubic, B-spline
  • 4. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 4 Representation of Curves:- 2. Parametric Representation (Describes the object not in the form of coordinates, but as a function of independent parameter such as ) The parametric representation of the curve is of the form: x = x(u) y = y(u) z = z(u) e.g. Parametric representation of circle can be given as X = r cos  Y = r sin  Curves can be represented by two methods 1. Non-Parametric Representation (Describes the object in the form of coordinates of the reference frame in use; i.e. relationship between x,y,z) e.g. ax2+by2+2kxy+2gx+2hy+c=0……….(Circle) 𝑥2 𝑎2 + 𝑦2 𝑏2 − 1 = 0………..(Ellipse)
  • 5. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 5 Non-Parametric Representation of Curves Fig.: Point Representation in Vector Form • A Non Parametric representation describes the object directly in terms of the coordinate of the reference frame in its use. • The representation further classified as explicit and implicit.  Explicit Form P = [ x y z] = [ x f(x) g(x) ] Thus an equation is comprises of coordinates y and z of a point on the curve expressed as two separate functions of the third coordinate x as the independent variable.  Implicit Form The implicit form of non-parametric representation is given as the intersection of two surfaces. F (x, y, z) = 0 G (x, y, z) = 0 Values of y and z must be computed for certain value of x.
  • 6. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 6 • To understand the concept of implicit and explicit, consider a example of circle with radius r and center at origin • In Explicit, the equation can be written as, y = ± √ r2-x2 • In Implicit form, the same equation is written as , x2+y2=r2 Basically non-parametric equations are useful when describing objects within given reference plane. However certain disadvantages can not be overlooked when used in graphical algorithm, 1. If Slope of curve is vertical or nearly vertical, the value becomes infinity or very large. Thus smoothness of the curve cant be assured. 2. Most engineering curves are independent of any coordinate system. Their shapes are defined by the relation between various data points, so it is not useful in defining closed curves such as circle and multivalued curves like ellipse, parabola etc. 3. The calculations required to represent non parametric curves are large.
  • 7. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 7 Parametric Representation of Curves • In Parametric representation, each point on the curve is represented with independent single parameter ‘u’. • This acts as local coordinate for the points on the curve and the three Cartesian coordinates can be expressed in terms of u. Consider a point P(x, y, z) in space. In parametric form this point will be expressed as P(u)= [ x y z] = [ x(u) y(u) z(u) ] where, umin < u < umax Note: In parametric form Concept of tangent vector is used. Thus, the tangent vector can be defined as, P’(u)= 𝒅𝑷(𝒖) 𝒅𝒖 = [ 𝒙′ 𝒖 𝒚′ 𝒖 𝒛′ 𝒖 ]
  • 8. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 8 Advantages of Parametric Representation: 1. Can be easily used for representing closed or multivalued curves. 2. It replaces slopes by tangent vectors. 3. For curves such as conics or cubic, the parametric representation uses polynomials rather than equations involving roots. Thus, parametric representation is more suitable and attractive for CAD applications.
  • 9. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 9 Concept of Vector Algebra A Vector can be defined as difference between two point position. A = P2-P1 = [x2 y2] – [x1 y1] = [ x2-x1 y2-y1] = [Ax Ay] Thus in three dimensional form [Ax Ay Az] 1. Magnitude of Vector: |A| = √ Ax 2+Ay 2 2. Unit Vector In direction of A: nA= 𝑨 𝑨 = 𝒏𝑨𝒙𝒊 + 𝒏𝑨𝒚𝒋 + 𝒏𝑨𝒛𝒌 3. Vector Addition: A+B= [Ax+Bx Ay+By] 4. Vector Subtraction: A-B =A+ (-B) 5. Dot Product of Two Vectors: A*B = B*A = AxBx+AyBy =|A| |B| cos (=angle between two vector) 6. Cross Product of Two Vectors: A x B= (|A| |B| sin) I (I= unit vector perpendicular to both A & B, = angle between two vectors such as 0π) Fig.: Vector Representation
  • 10. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 10 Analytical Curve: LINE A line can be represented in a parametric form by an input of two endpoints or by one point and a length and direction. In Geometric Modelling LINE can be represented in 2 ways 1. Line Connecting two End Points P1 and P2 Fig.: Line with two End Points • Consider a line with two end points P1 (x1,y1,z1) and P2 (x2,y2,z2) for which position vectors are P1 and P2 • Now, consider a point P (x,y,z) on line P1P2. Under Parametric system consideration such that point P is represented by ‘u’ such that its values are 0 and 1 at endpoints P1 and P2 • In Δ OPP1 , vector between endpoints P1 and P can be expressed as P1-P, represented by parameter u. 𝑬𝒏𝒅 𝒑𝒐𝒊𝒏𝒕 𝒍𝒆𝒏𝒈𝒕𝒉 𝒊𝒏 𝒄𝒂𝒓𝒕𝒆𝒔𝒊𝒂𝒏 𝒔𝒑𝒂𝒄𝒆 𝑬𝒏𝒅𝒑𝒐𝒊𝒏𝒕 𝒍𝒆𝒏𝒈𝒕𝒉 𝒊𝒏 𝒑𝒂𝒓𝒂𝒎𝒆𝒕𝒓𝒊𝒄 𝒔𝒑𝒂𝒄𝒆 = 𝑫𝒊𝒔𝒕𝒂𝒏𝒄𝒆 𝒐𝒇 𝑷 𝒇𝒓𝒐𝒎 𝑷𝟏 𝒊𝒏 𝒄𝒂𝒓𝒕𝒆𝒔𝒊𝒂𝒏 𝒔𝒑𝒂𝒄𝒆 𝑫𝒊𝒔𝒕𝒂𝒏𝒄𝒆 𝒐𝒇 𝑷 𝒇𝒓𝒐𝒎 𝑷𝟏 𝒊𝒏 𝒑𝒂𝒓𝒂𝒎𝒕𝒓𝒊𝒄 𝒔𝒑𝒂𝒄𝒆 mapping between parametric and Cartesian space
  • 11. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 11 𝑷𝟐−𝑷𝟏 𝟏 = 𝑷−𝑷𝟏 𝒖 i.e. (P-P1) = u (P2-P1) P= P1 + u (P2-P1) where, 0  u  1 • Thus, in scalar form it can be written as, x = x1 + u (x2-x1) y= y1 + u (y2-y1) z = z1 + u (z2-z1) where, 0  u  1 • Tangent Vector of line P1P2, x’ = (x2-x1) y’= (y2-y1) z’ = (z2-z1) • Length of line P1P2: L= |P2-P1| = √ (x2-x1)2+(y2-y1)2+(z2-z1)2 • Unit Vector in the direction of line is n= 𝑷′ 𝑳 = 𝒙′ 𝑳 𝒊 + 𝒚′ 𝑳 𝒋 + 𝒛′ 𝑳 𝒌
  • 12. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 12 2. Line passing through point and defined by a length and direction • Consider a case where a line is to pass through a point P1 and has its length L and direction vector n. • The computation of the endpoint of this line needs to be done based on the above points.. n= 𝑷−𝑷𝟏 𝑳 P= P1 + L n where, - ∞  u  ∞ Fig.: Line with length and direction
  • 13. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 13 Pb.1 A line is represented by end points P (5,7,2) and Q (-4,6,3). If ‘u’ at P and Q is 0 and 1 respectively. Determine its length and also determine the coordinates of points represented by u=0.4, u=-0.25, u=1.5. Given Points P (5,7,2) and Q (-4,6,3) Step 1: Writing parametric equation of line. R= P + u (Q-P)………. 0  u  1 i.e. = 5 7 2 + 𝑢 −4 − 5 6 − 7 3 − 2 5 7 2 + u −9 −1 1 In scalar form the equations can be written as, x = 5 + u (-9) y= 7 + u (-1) z = 2 + u (1) Step 2: Finding out length of line. L = √ (x2-x1)2+(y2-y1)2+(z2-z1)2 = √ (-4-5)2+(6-7)2+(3-2)2 = √ 83 = 9.11mm
  • 14. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 14 Step 3: Finding out coordinate of points At u= 0.4: S= 5 7 2 + u −9 −1 1 = 1.4 6.6 2.4 At u= - 0.25: T= 5 7 2 + u −9 −1 1 = 7.25 7.25 1.75 At u= 1.5: W= 5 7 2 + u −9 −1 1 = −8.5 5.5 3.5 Thus at u= 0.4 coord. S(1.4,6.6,2.4) Thus at u= -0.25 coord. T(7.25,7.25,1.75) Thus at u= 1.5 coord. W(-8.5, 5.5, 3.5)
  • 15. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 15 Pb.2 If line L1 has end points (1,2,7) and (5,6,1), while line L2 has end points (7,3,4), (3,9,10) • Find the Equation of the line • Find the tangent vectors of the line • Are two lines parallel or perpendicular? • Are two lines intersecting? If yes, find the point of intersection. Given end Points (1,2,7) and (5,6,1) for L1 and for L2 (7,3,4), (3,9,10) Step 1: Writing parametric equation of line. For line L1: PL1= P1+u (P2-P1) and For line L2: PL2= P3+u (P4-P3) i.e. = 1 2 7 + 𝑢 5 − 1 6 − 2 1 − 7 1 2 7 + u 4 4 −6 i.e. = 7 3 4 + 𝑣 3 − 7 9 − 3 10 − 4 7 3 4 + v −4 6 6
  • 16. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 16 Step 2: Finding out Tangent Vectors. For line L1: P’L1= (P2-P1) and For line L2: P’L2= (P4-P3) For Line L1 P’L1 = [i j k ] 5 − 1 6 − 2 1 − 7 = 4 4 −6 i.e. 4i+4j-6k For Line L2 P’L2 = [i j k ] 3 − 7 9 − 3 10 − 4 = −4 6 6 i.e. -4i+6j+6k Step 3: Checking for Perpendicularity and Parallelism. For perpendicularity the dot product of P’L1 P’L2 should be equal to zero. P’L1 * P’L2 = (4i+4j-6k)*(-4i+6j+6k) = (4*-4)+(4*6)+(-6*6)= -28 ≠ 0…lines are not perpendicular For parallelism the cross product of P’L1 P’L2 should be equal to zero. P’L1 x P’L2 = 𝑖 𝑗 𝑘 4 4 −6 −4 6 6 = 60i + 40k ≠ 0…lines are not parallel
  • 17. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 17 For two lines to be intersecting then the point of intersection PL1 = PL2 Step 3: Are two line intersecting i.e. 1 2 7 + u 4 4 −6 = 7 3 4 + v −4 6 6 i.e. 1+4u = 7-4v ; 2+4u = 3+6v ; 7-6u = 4+6v …………………. Solve these simultaneously by rearranging the terms to get values of u and v u= 1 and v= 0.5………put these values in third/remaining equation and check whether it is satisfying the condition i.e. LHS=RHS (* Check values) Step 4: Finding out point of intersection. The point of intersection can be found out either by substituting the value of u or v in 1 2 7 + u 4 4 −6 or 7 3 4 + v −4 6 6 …….. Thus point of intersection is (5,6,1)
  • 18. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 18 Pb.3 Determine the angle between two lines for which end points are known L1 = P1 (2,2), P2 (8,7) L2 = P3 (5,1), P4 (10,3) In our case, A represents line 1 i.e. with point P1 and P2 and B represents line 2 i.e. with points P3 and P4. (P2-P1). (P4-P3) = |P2-P1| |P4-P3| cos  i.e. cos = 𝑥2−𝑥1 𝑥4−𝑥3 +(𝑦2−𝑦1)(𝑦4−𝑦3) [ 𝑥2−𝑥1 2 + 𝑦2−𝑦1 2 ] [ 𝑥4−𝑥3 2 + 𝑦4−𝑦3 2 ] = 0.951 thus = 18.004 deg. Solution: Angle between two line can be found out by using the concept of dot product. Step 1: Writing down the equation of Dot Product. A*B=|A| |B| cos
  • 19. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 19 Analytical Curve: Circle Incremental Method/ Recursive Method Consider Point Pn (xn, yn, zn) on a circle, the subsequent point incremental point is Pn+1 (xn+1, yn+1, zn+1). for 0  u  2π Circle can be represented in parametric form as: X= Xc + R cos u Y=Yc + R sin u Z= Zc The parametric equation can be rewrite as: xn= xc + R cos u R cos u = xn-xc yn=yc + R sin u R sin u = yn-yc Fig.: Circle in parametric Form
  • 20. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 20 Similarly, The parametric equation can be rewrite as: Xn+1= xc + R cos (u+Δu) Yn+1=yc + R sin (u+Δu) and Zn+1= Zn By rearranging the equations,: Xn+1= xc + R (cos u*cos Δu)-R (sin u*sin Δu) Xn+1= xc +(xn-xc) cos Δu – (yn-yc ) sinΔu Similarly, Yn+1= yc + (yn-yc) cos Δu + (xn-xc ) sinΔu and Zn+1= Zn The advantage of this method is that trigonometric functions in terms of Δu is constant and needs to be worked only once. This method is efficient in plotting the subsequent points on the circle. The center point and radius of circle is given by; [xc, yc, zc]T = [ ½ (x1+x2), ½ (y1+y2), ½ (z1+z2)]T Radius = ½ √ (x2-x1)2+(y2-y1)2+(z2-z1)2
  • 21. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 21 Pb.1 A circle is defined by the center point (4,6) and radius 5. Determine the various points on the circle in the first quadrant, if the increment between each point is 30 deg. Solution: Now given is xc= 4, yc =6, R=5 and Δu =30 deg. Step:1 finding out xn and yn xn= xc + R cos u = 9 and yn= yc + R sin u= 6 Step:2 determination of cos and sin component of Δu cos Δu = 0.866 and sin Δu = 0.5 Step:3 calculating the coordinates in first quadrant Prepare a table
  • 22. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 22 xn yn xn+1= xc +(xn-xc) cos Δu – (yn-yc ) sinΔu yn+1= yc + (yn-yc) cos Δu + (xn-xc ) sinΔu 9 6 4+ (9-4)*0.866+(6- 6)*0.5= 8.3301 6+ (6-6)*0.866+(9-4)*0.5= 8.5 8.3301 8.5 4+(8.3301-4)*0.866 – (8.5-6)*0.5= 6.5 6+ (8.5-6)*0.866 + (8.3301- 4)* 0.5= 10.33 6.5 10.330 4+ (6.5-4)*0.866-(10.33- 6)*0.5= 4 6+ (10.330-6)*0.866+(6.5- 4)*0.5= 11 Coordinates of a circle in 1st quadrant
  • 23. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 23 Pb.2 A circle is passing through end points A (6,4), B (10,10) where AB is the diameter of circle. Find the coordinates of center point, radius and parametric equation of circle. Also find the coordinates of points on the circle at  = 30 deg. and 120 deg. Solution: Center point = (xc,yc)= ½ (x1+x2) , ½ (y1+y2) = (8,7) Radius of circle = ½ √ (x2-x1)2+(y2-y1)2+(z2-z1)2 = 3.6 Step:1 finding out xn and yn xn= xc + R cos u = 11.6 and yn= yc + R sin u= 7 Step:2 determination of cos and sin component of Δu cos Δu = 0.866 and sin Δu = 0.5 Step:3 calculating the coordinates in first quadrant Prepare a table
  • 24. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 24  xn yn xn+1= xc +(xn-xc) cos Δu – (yn-yc ) sinΔu yn+1= yc + (yn-yc) cos Δu + (xn-xc ) sinΔu 30 11.6 7 11.11 8.8 60 11.11 8.8 9.8 10.11 90 9.8 10.11 8 10.6 120 8 10.6 6.2 10.11 Coordinates of a circle in 1st quadrant
  • 25. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 25 Pb.3 A circle is represented by center point (5,5) and radius 7 units. Find the parametric equations of circle and determine the various points in first quadrant if the increment is 15 deg. Ans: u xn yn5 15 11.76 6.81 30 11.06 8.5 45 9.9476 9.9489 60 8.5 11.06 75 6.8 11.76 90 5 12
  • 26. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 26 Analytical Curve: Ellipse Ellipse can be represented in parametric form as: X= Xc + A cos u Y=Yc + B sin u Z= Zc for 0  u  2π Incremental/ Recursive Method Xn+1= xc +(xn-xc) cos Δu – 𝐴 𝐵 (yn-yc ) sinΔu Yn+1= yc + (yn-yc) cos Δu + 𝐴 𝐵 (xn-xc ) sinΔu Zn+1= Zn Fig.: Ellipse in parametric Form For Inclined Ellipse X= xc + A cos u. cos  - B sin u. sin  Y= yc + A cos u. sin  + B sin u. cos 
  • 27. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 27 Analytical Curve: Parabola Parabola can be represented in parametric form as: X= Xv+ Au2 Y=Yv + Au2 Z= Zc for 0  u  ∞ Xn+1= xn +(yn-yv) Δu +A (Δu)2 Yn+1= yn +2A Δu Zn+1= Zn Fig.: Parabola in parametric Form Incremental/ Recursive Method For Inclined Parabola X= xv + Au2 cos  - 2Au. sin  y= yv + Au2 sin  + 2Au. cos 
  • 28. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 28 Analytical Curve: Hyperbola Fig.: Hyperbola in parametric Form Hyperbola can be represented in parametric form as: X= Xv+ A cosh (u) Y=Yv + B sinh (u) Z= Zc
  • 29. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 29 Synthetic Curve Fig.: Interpolation Curve Fig.: Approximation Curve The curves which are defined by the set of data points are known as Synthetic Curves. They are always in Polynomial Form. Very vital in design because, the analytical curve are usually not sufficient to meet the geometric design requirements of mechanical components. Applications: For representing profiles of car bodies, ship hulls, airplane wings, propeller blades, shoe insoles, bottles, etc.
  • 30. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 30 Polynomial form of Synthetic Curve: P(u)= C3u3+C2u2+C1u+C0 where, u = parameter Ci = Polynomial Coefficients In scalar form the equation can be represented as, x(u)= C3xu3+C2xu2+C1xu+C0x y(u)= C3yu3+C2yu2+C1yu+C0y z(u)= C3zu3+C2zu2+C1zu+C0z To achieve the necessary smoothness of curve, certain continuity conditions have to be imposed. Depending on these conditions, the following curves can be defined, C0 = Zero Order Continuity (Position) C1 = First Order Continuity (Slope) C2 = Second Order Continuity (Curvature)
  • 31. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 31 C0 = Zero Order Continuity (Position) For S2 Curve x(u)= a2xu3+b2xu2+c2xu+d2x y(u)= a2yu3+b2yu2+c2yu+d2y z(u)= a2zu3+b2zu2+c2zu+d2z For S1 Curve x(u)= a1xu3+b1xu2+c1xu+d1x y(u)= a1yu3+b1yu2+c1yu+d1y z(u)= a1zu3+b1zu2+c1zu+d1z For C0 xs1(umax)= xs2(umin) ys1(umax)= ys2(umin) zs1(umax)= zs2(umin)
  • 32. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 32 C1 = First Order Continuity (Slope) For S2 Curve X’(u)= 3a2xu2+2b2xu+c2x Y’(u)= 3a2yu2+2b2yu+c2y Z’(u)= 3a2zu2+2b2zu+c2z For S1 Curve X’(u)= 3a1xu2+2b1xu+c1x Y’(u)= 3a1yu2+2b1yu+c1y Z’(u)= 3a1zu2+2b1zu+c1z For C1 X’s1(umax)= x’s2(umin) Y’s1(umax)= y’s2(umin) Z’s1(umax)= z’s2(umin)
  • 33. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 33 C2 = Second Order Continuity (Curvature) For S2 Curve X’’(u)= 6a2xu+2b2x Y’’(u)= 6a2yu+2b2y Z’’(u)= 6a2zu+2b2z For S1 Curve X’’(u)= 6a1xu+2b1x Y’’(u)= 6a1yu+2b1y Z’’(u)= 6a1zu+2b1z For C2 X’’s1(umax)= x’’s2(umin) Y’’s1(umax)= y’’s2(umin) Z’’s1(umax)= z’’s2(umin)
  • 34. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 34 Major CAD/CAM systems defines three types of synthetic curve 1.Hermite Spline 2.Bezier Curve 3.B-Spline Curve
  • 35. 24 May 2021 MITWPU, PUNE: TY BTECH (MECH ENGG) Computer Graphics (PE-III) 35 Continuity representation of curve • For Segment ‘a’ eqaution is 𝒚 = −𝟎. 𝟑𝟔𝟓𝒙 + 𝟐𝟔. 𝟕𝟑 • For Segment ‘b’ eqaution is 𝒚 = 𝟎. 𝟖𝟑𝟔𝒙 + 𝟑. 𝟒𝟕𝟗 b a ua=0 ua=1 ub=0 ub=1 Ines Joined Segment Type Equations Continuity Conditions C0 C1 C2 a-b Linear a: 𝒚 = −𝟎. 𝟑𝟔𝟓𝒙 + 𝟐𝟔. 𝟕𝟑 b: 𝒚=𝟎.𝟖𝟑𝟔𝒙+𝟑.𝟒𝟕𝟗 - - Y https://www.youtube.com/watch?v=A3lDRn6jafs P1 P2 P3