0% found this document useful (0 votes)
88 views247 pages

L1 Merged

This document provides an overview of a computer aided design (CAD) course. It discusses the history of CAD, from traditional manual design processes to the development of early computer-based systems. It describes the CAD process and how CAD integrates modeling, analysis, and manufacturing. The document outlines the course contents, which include parametric modeling of curves and surfaces, solid modeling, assembly modeling, and finite element analysis. It also discusses challenges in CAD like generative design and collaboration on large international projects. The goal of the course is to introduce students to CAD concepts, parametric modeling techniques, and analysis tools.

Uploaded by

Darsh Menon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views247 pages

L1 Merged

This document provides an overview of a computer aided design (CAD) course. It discusses the history of CAD, from traditional manual design processes to the development of early computer-based systems. It describes the CAD process and how CAD integrates modeling, analysis, and manufacturing. The document outlines the course contents, which include parametric modeling of curves and surfaces, solid modeling, assembly modeling, and finite element analysis. It also discusses challenges in CAD like generative design and collaboration on large international projects. The goal of the course is to introduce students to CAD concepts, parametric modeling techniques, and analysis tools.

Uploaded by

Darsh Menon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 247

Overview of

Computer Aided Design


ME F318

&

Course Conduct
Computer Aided Design (CAD)
CONTENTS
Brief History of computer-aided design

CAD Process

What is CAD?

Advantages & Applications of CAD

Challenges | Present & Future

Lab component of the course

Introduction to parameterization of curves

Course Objectives | Chapter wise Objectives | Course Handout

2 Computer Aided Design


Traditional Design

World War-II Era | Design of B17 Flying Fortress Bomber

How was it designed


3 Computer Aided Design
Computer Aided Design

21st Century | Design of 787 Dreamliner

4 Computer Aided Design


History of CAD

Before 1980 Decade by Decade


Year Event
The first graphic system was developed in mid 1950 by the US Air
1950’s Force's ‘ Air Defense System ’ . The system was developed at
Massachusetts Institute of Technology's Lincoln Laboratory.
SYSTEM: SAGE (Semi Automatic Ground Environment)
Until this time, design of complex part was very time consuming,
Design iterations, performance testing were impossible to complete on
time and under the budget.
First commercial CAD system emerged when companies like GM,
1960’s Boeing and Lockheed developed mainframe computer based
design systems.
Because of high cost of CAD systems, CAD was used primarily by
1970’s
large engineering firms until the introduction of mini computers.

5 Computer Aided Design


History of CAD

In 80’s Year by Year


Year Event
1980 T&W Systems releases Versa CAD
1980 Matra Datavision founded as part of Lagardene Group and starts producing CAD/CAM software.
1981 Dassault Systems is created.
1981 Computer graphics from Cornell University founded 3D/Eye Inc., a pioneered 3D and graphics
technology.
1981 Unigraphics introduced the first solid modeling system, UniSolid.
It was based on PADL-2, and was sold as a stand-alone product to Unigraphics.
1982 CATIA Version 1 is announced as an add-on product for 3D design, surface modeling and NC
programming.
1982 In 1982 mini computers with much more power at less cost started to appear. This was a major
step forward and by 1984 the technology began to be competitive with traditional methods.
For many years aircraft had of course been designed using computers, but now it was becoming
possible to economically design other domestic products with complex 3D shapes using a
computer.
1982 Autodesk was founded by sixteen people in April 1982 in California by initiative of John Walker in
idea to create a CAD program for a price of $1000 to can run on PC. John Walker has been
running Marinchip Systems for two years before. The first version of AutoCAD was based on a
CAD program wrote in 1981 by Mike Riddle called MicroCAD, changed later in Interact.
1989 Parametric Technology ships the first version of Pro/ENGINEER.

6 Computer Aided Design


CAD/M Process

Traditional Product Cycle

product design
drafting
concept engineering

customers order new


process
and equipment
planning
markets and tooling

quality production
production
control scheduling

What were the drawbacks?


7 Computer Aided Design
CAD/M Process

Product Cycle with CAD CAM Overlaid


Computer- Computer-
Aided automated drafting
Design and documentation

product design
drafting
concept engineering

customers order new Computer-


process
and equipment aided process
planning
markets and tooling planning

quality production
production
control scheduling

Computer- Computer-controlled Computer scheduling,


aided quality robots, material requirements planning,
control machines, etc. shop floor control

8 Computer Aided Design


What is CAD?

CAD | Computer Aided Design


 Traditional designs are evaluated for their validity and
performance via Computer Aided Design (CAD).
Analysis C
Modeling (structural, Thermal, Dynamic, Manufacturing
Coupled, Fatigue, Buckling)

 Computer Aided Design is Modeling, Analysis, and


Manufacturing. CAD is CAD/CAM.
9 Computer Aided Design
What is CAD?

Analysis | Simulation | Optimization


 Analysis is use of mathematical techniques such as
FEA/FEM for designing a safe product (Structural. Thermal.
Dynamic, Coupled, Fatigue, Creep, Fracture, Buckling,….,….)

 Simulation can be used to study how a mechanical


assembly with various moving parts work together, on a
computer screen, before actually building it.

 Optimization ‘Most optimal design’ that meets the


designer’s requirements. Most optimal could mean least
weight, smallest number of parts, least friction, highest
reliability, etc. depending on the designer’s primary objective.

10 Computer Aided Design


What is CAD?

CAE: Dynamic Analysis | Simulation |

11 Computer Aided Design


What is CAD?

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

12 Computer Aided Design


What is CAD?

CAD is a Meeting Point of Modelling, CAE, CAM, CG

CG

CAE CAD CAM

Modelling
13 Computer Aided Design
What is CAD?

Modern CAD/CAE/CAM Practice

14 Computer Aided Design


Applications of CAD

Applications Mechanical Engineering

15 Computer Aided Design


Applications of CAD

Applications: Architecture | Construction | Interior

16 Computer Aided Design


Applications of CAD

Advanced Applications Medical Profession

NATURE IS NEVER GEOMETRIC - WHY IS YOUR


IMPLANT AFTER 50 (!) YEARS STILL A SIMPLE
METAL SCREW?

17 Computer Aided Design


Applications of CAD

Advanced Applications Medical Profession

NATURE IS NEVER GEOMETRIC - WHY IS YOUR IMPLANT AFTER


50 (!) YEARS STILL A SIMPLE METAL SCREW?

18 Computer Aided Design


Applications of CAD

Advanced Applications Medical Profession

19 Computer Aided Design


Challenges | Present & Future

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.

Generative design is the future !

20 Computer Aided Design


Parametric Approach Vs. Algebraic Approach
Representation of solid model with Parametric Equations
instead of Algebraic Equations
Analytic Curves
Understand Parametric form of Analytic Curves
Synthetic Curves
Understand Parametric form of Synthetic Curves
Synthetic Curves | Hermite Cubic Spline
Generate Hermite Cubic Spline Curve using Parametric form
Synthetic Curves | Bezier Curve
Generate Bezier Curve using Parametric form
Synthetic Curve | B-Spline
Generate B-Spline Curve using Parametric form
Analytic Surfaces
Understand Parametric form of Analytic Surfaces
Synthetic Surfaces
Understand Parametric form of Synthetic Surfaces and
Generate: Hermite Cubic, Bezier, B-Spline
3-D Solid Modelling
Understand generation of Wire Frame Solid Modelling
3-D Solid Modelling
Understand generation of Surface Solid Modelling
3-D Solid Modelling
Understand Constructive Solid Geometry
Assembly Modeling
Understand and Generate Assembly Tree
Understand Basics of FEA and workout on Structural,
Thermal, Dynamic and Advanced FE Analysis using ANSYS
Engineering drawings
Understand how to generate engineering drawing
Take away…..Computer Aided Design
 Solid Modelling (Parametric Approach)

 Finite Element Analysis (Structural,


Thermal, Dynamic and Advanced)

 Introduction to Engineering drawing


 Exposure to CAD Software
 Exposure to MATLAB software
Course will be useful………

PS, Placement, Higher studies


Parameterization of analytic and synthetic curves
Computer-aided design

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

Examples of wireframe models made in AutoCAD


 Geometric modeling is the basic task in CAD.
 Wireframe model basic tool to visualize the 3D shape of an object.
 Clearly, wireframe model is made of several curves connected together
 Two types of curves analytic, synthetic.
 Analytic curves line, arc, circle, ellipse, hyperbola, parabola.
 Synthetic curves cubic spline, B-spline, Bezier curve.
Computer-aided design Slide #2
Non-parametric representation and its disadvantages
 Nonparametric equations of curves can be explicit or implicit
 In non-parametric explicit form,
 The explicit form is a one to one relationship.
 In non-parametric implicit form, the below two equations must be solved at each point

Disadvantages
 It is compute-intensive.
 It is axis-dependent whereas real-world objects are not
 Computed points are not evenly distributed.

Computer-aided design Slide #3


Example: Non-parametric representation of a unit circle

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

 Equal increments in x are taken to compute y using the above equation


 Resulting y values are not equally spaced visualization is poor
 True shape is not retained
 Calculation must be repeated for each point computationally expensive
Computer-aided design Slide #4
What is parametrization?

Each point on the curve is expressed as a function of a parameter u

Computer-aided design Slide #5


Parameterization of analytic curves
 Parametric equation of a circle on a 2D plane (x-y) is P(u) = [x y] = [r.cos u r.sin u]
 Equal increments in u are taken to obtain points of a unit circle
u X Y
0 1 0
π/8 0.92 0.38
π/4 0.707 0.707
3π/2 0.38 0.92
u
π/2 1 0

 y intercepts are equally spaced; visualization is good, true shape retained.


 However, it is computationally expensive as the calculation of trigonometric
functions, cos u and sin u, must be repeated for every point

Computer-aided design Slide #6


Parameteric representation of circle
 How to avoid repetitive calculations of trigonometric functions ?
 Use a fixed parameter increment called ‘du’, and write recursive relations
 Given: increment du and point (xn, yn), Is it possible to find the successive point?
xn = r cos un and yn = r sin un ---------------------------------(a)
xn+1 = r cos(un + du) and yn+1 = r sin(un + du) -----------------------(b)
Using angle sum formula,
xn+1 = r (cos un * cos du – sin un * sin du) and
yn+1 = r (cos un * sin du + sin un * cos du) ------------------------------------------(c)
Using Equation (a), we get,
xn+1 = xn * cos du – yn * sin du and
Recursive relations
yn+1 = xn * sin du + yn * cos du ---------------------------------(d)
Computer-aided design Slide #7
Parametric representation of analytic curves

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

Computer-aided design Slide #8


Parametric representation of analytic curves
Hyperbola Parabola
P(u) = [± A.sec u ± B.tan u] P(u) = [A.u2 2.A.u ]
B.xn xn+1= xn + yn.du + A.(du)2
xn+1= ±
B.cos du – yn.sin du yn+1= yn + 2A.du
B.yn + B.tan du
yn+1= ±
B – yn.tan du

Directrix
Focus Axis of symmetry

Computer-aided design Slide #9


Need for synthetic curves

 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)

1. Hermite cubic spline 2. Bezier curve 3. B-spline

Computer-aided design Slide #10


Parametric synthetic curve 1. Hermite cubic spline

 Two end points and tangent vectors to define curve shape


 Curve passes through the data (end) points
 Shape can be changed only using end points and/or tangent vectors
 For complex shapes, multiple curves must be connected by defining the continuity condition
 e.g. C2-continuity of 2 curves with 3 points, P0, P1, and P2:
 Applying the above condition to the tangent equation, we get,
Computer-aided design Slide #11
Parametric synthetic curve 2. Bezier curve

 Characteristic polygon created by joining the control (data) points


 The curve is always tangent to the first and the last polygon segment
 The curve shape tends to follow the polygon shape
 Just adding one point at any vertex changes shape
 Only the control points determine the shape
 Reversing sequence of points does not change shape
 Closed curve can be generated by closing the polygon
 But, the degree of the curve is dependent on the number of control points

Computer-aided design Slide #12


Parametric synthetic curve 3. B-spline

 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 Slide #13


Summary
 Mathematical representation of curves is important in wireframe modeling.
 Non-parametric curve costly, does not capture the true shape of the curve.
 Parametric equations of analytic curves must support recursive relations.
 Computation requires only 3-5 input values depending on the analytic curve type.
 Synthetic curve offers more flexibility and utility than analytic curve.
 Cubic spline passes through the input points, but shape is not obvious.
 Bezier curve shape is obvious from input points and polygon shape.
tweaking the curve shape involves maneuvering input points only.
number of input points decides the degree of the curve.
 B-spline degree of the curve is NOT dependent on the input points
offers greater flexibility to the user than the other synthetic curves

Computer-aided design Slide #14


THANK YOU !

Computer-aided design
Coordinate Systems in geometric modeling software

 Screen Coordinate System (SCS)


 Model Coordinate System or Global Coordinate System | (MCS/GCS)
 Working Coordinate System or Local Coordinate System (WCS/LCS)
 Viewing Coordinate System (VCS)
Computer-aided design Slide #1
Characteristics of a geometric modeling software

 Better visual representation

 User friendly

 Computationally inexpensive (CPU memory, CPU time)

 Reduced calculations to produce geometry

Computer-aided design Slide #2


Representation of Point

P (x,y)

Lowest Entity in Geometric Modelling

Computer-aided design Slide #3


Vector-Matrix Representation of Point

P(x,y,z) = P [x y z]T

p(x,y,z)

Computer-aided design Slide #4


What is Non-Parametric Representation?

 It is also called as Algebraic Representation in a simple form.

 In algebraic representation we have two types:

(a) Explicit Representation

(b) Implicit Representation

Computer-aided design Slide #5


(a) What is Explicit Representation?
 Curve in 2D: y = f(x)

e.g. a straight line: y = ax + b

 Curve in 3D: y = f(x), z = g(x)

 Surface in 3D: z = f(x,y) What are the drawbacks?

 One to one correspondence:


for one value of x there is one value of y.

Computer-aided design Slide #6


Disadvantages of Explicit Representation

How about a vertical line x = c as y = f(x)?


 What about a closed curve such as circle or to a curve that gives several
‘y’ values corresponding to an ‘x’ (e.g. Spiral curve).

 Dependent on coordinate system


Therefore, rarely used in computer graphics

Computer-aided design Slide #7


(b) What is Implicit Representation?

Curve in 2D: f(x,y) = 0


– Line: ax + by + c = 0
– Circle: x2 + y2 – r2 = 0
Surface in 3D: f(x,y,z) = 0
– Plane: ax + by + cz + d = 0
– Sphere: x2 + y2 + z2 – r2 = 0 What are the drawbacks?

f(x,y,z) can describe 3D object:


– Inside: f(x,y,z) < 0
– Surface: f(x,y,z) = 0
– Outside: f(x,y,z) > 0

Computer-aided design Slide #8


Disadvantages of Implicit Representation

 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)

 If curve is displayed as series of points or line segments, it is compute intensive

 The points on axes–dependent non parametric curve are not evenly distributed.

Computer-aided design Slide #9


Parametric Form of Point

We represent coordinates of each point as a function of single


parameter (say) u. umax
P(u) P’(u)
 x = x(u)
umin
 y = y(u) p(x,y,z)

 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

1. Suitable for closed and multi-valued curve


2. When x’(u) = 0, the slope is infinite. Hence an infinite slope
can be defined by letting one component of the tangent
vector be zero. Computational difficulty is avoided by using a
parametric derivative.
3. Since a point on a parametric curve is specified by a single
parameter (u), the parametric form is axes independent.
4. The curve end points and length are fixed by the parametric
range umin≤u≤umax
Often, it is convenient to normalize the range as 0≤u≤1

Computer-aided design Slide #11


Modeling Analytic Curves
(Straight Line)

Computer-aided design
Parametric Representation of a Line

There are various ways to draw a line. Simple


method:

Computer-aided design
Parametric Representation of a Line

P = P1+ (P–P1)

(P–P1) is proportional to (P2 – P1)

P-Equation:

P(u) = P1 + u(P2 – P1) | 0≤u≤1


Computer-aided design
Parametric Representation of a Line

In Vector Matrix form:


P(u) = P1 + u(P2 – P1)

In scalar form: x(u) = x1 + u(x2 – x1)


y(u) = y1 + u(y2 – y1)
z(u) = z1 + u(z2 – z1)

Tangent vector: P’(u) = [x’(u) y’(u) z’(u)]

Computer-aided design
Parametric Representation of a Line

Position Vector: P(u) = P1 + u(P2 – P1)

Tangent Vector: dP(u)/du = P’(u) = (P2 – P1)


Or (x2 – x1), (y2 – y1) and (z2 – z1) in scalar form
Observations:
1. The independence of the TV from u indicates the constant slope of straight line.
2. For a 2-D line the infinite slope and zero slope can be obtained by letting x’(u) = 0
and y’(u) = 0, respectively.

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

P(u) = P1 + u(P2 – P1) | 0≤u≤1

P(u) = [2 3] + u([4 5] – [2 3])

P(u) = [2 3] + u([2 2])

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

x(u) = x1 + u(x2 – x1)


= 2+(4-2)u = 2 + 2u

y(u) = y1 + u(y2 – y1)


3+(5-3)u = 3 + 2u

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

P(u) = [2+2u 3+2u]


Tangent Vector: P’(u) = [x’(u) y’(u)] = [2 2]

Slope: dP(u)/du = y’(u)/x’(u) = 2/2 = 1

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:

(P2-P1).(P3-P1) = (4)(0)+(0)(3) = 0 Hence the proof

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

(a) n1.n2 = 1 (b) n1.n2 = -1

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.

P-Equation of Circle: x = cosθ and y = sinθ.


P(θ) = [x y]T | P(θ) = [cosθ sinθ] T
θ X Y
0 1 0
π/8 0.92 0.38
π/4 0.71 0.71
3π/8 0.38 0.92
π/2 0 1
Computer-aided design
Observations of
Parametric Representation of a Circle
 Resulting intercepts on arc/circle are equal and
hence better visual representation.
 Computationally expensive as the calculation of
trigonometric function [x = cosθ and y = sinθ]
has to be repeated for every point.
Algorithm is inefficient.

Computer-aided design
We Need an Efficient Algorithm
Parametric Representation of a Circle

Efficient algorithm can be obtained by eliminating


the requirement of repetitive calculations of
trigonometric function [x = cosθ and y = sinθ] for
every point.

Computer-aided design
Need of Efficient Algorithm
Parametric Representation of a Circle

Let’s assume fixed number


of uniformly spaced points

‘δu’ is parameter increment


between points (which is a
constant)

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’)

xi+1 = xc + (xi*cosδu - yi*sinδu)


yi+1 = yc + (xi*sinδu + yi*cosδu)--(d’)

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

P(u) = [RoCosu RoSinu]T

Pc = (P1+P3)/2 = OR = (P2+P4)/2

Xc = (X1+X3)/2 & Yc = (Y1+Y3)/2

Ro = 1/2[(X1 – X3)2 + (Y1 – Y3)2]1/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

(b) Inscribed in a Square

P(u) = [RiCosu RiSinu]T

Pc = (P1+P3)/2 = OR = (P2+P4)/2

Xc = (X1+X3)/2 & Yc = (Y1+Y3)/2

Ro = 1/2[(X3 – X4)2 + (Y3 – Y4)2]1/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.

Ro d Pi(u) = [RiCosu RiSinu]T | Blue one

Po(u) = [RoCosu RoSinu]T | Green one


Ri
d Pc = Given Center Point Pc

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

P = [x y]T | x = R.cos(2πu) & y = R.sin(2πu)

(a) Parametric Equation of circle:


P(u) = [R.Cos(2πu) R.Sin(2πu)]T 0≤u ≤1
(b) Tangent Equation:
P’(u) = [-2πR.Sin(2πu) 2πR.Cos(2πu)]T 0≤u ≤1

(c) At 0o , 2πu = 0, Therefore, u = 0


At 45o, 2πu = 45, Therefore, u = 0.125
At 90o , 2πu = 90, Therefore, u = 0.25
Computer-aided design
General Problem

Computer-aided design
General Problem

Computer-aided design
Circular Arc
Circle and circular arcs are among the most common entities
used in wireframe modelling.

Circle and circular arcs together with straight lines are


sufficient to construct a large percentage of existing
mechanical parts and components in practice.

Database requirement of a circle is its centre and radius as


its essential geometric data.

Circle can be generated by many ways. The intention of the


algorithm (software) is to convert user’s input information into
radius and centre, which is the requirement of circle database.

Computer-aided design
Parametric Equation

P(u) = [x y]T = [R.Cosu R.Sinu]T us≤u ≤ ue


Origin Centered

P(u) = [xc + R.Cosu yc + R.Sinu]T us≤u ≤ ue


Non-Origin Centered

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]

(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]

(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]

(c)Find P-equation of Circle (I is center and radius 1)


(d)Find intersection point (II) L1 and C1.

Computer-aided design
Need of Efficient Algorithm (ASSIGNMENT 1)

(a) for a Circle Passing through 3 Points


(b) for a Circle tangent to two lines with given radius R

Computer-aided design
Modeling Analytic Curves
(Ellipse)

Computer-aided design
Representation of an Ellipse

Database Requirement:

Center, Major axis (2a) and Minor axis (2b)

Computer-aided design
Representation of an Ellipse
Equal Angle Increments Method

Equal angle increment method gives acceptable results (equal


segments) in case of circle, however, unacceptable results (undesired
segments) in case of ellipse.

Computer-aided design
Representation of an Ellipse
Equal segments Method

For a sufficient number of segments this gives a better representation.


However, the ellipse is over specified towards minor axis ends and
underspecified towards major axis ends.

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

dx = -a.sinu.du & dy = b.cosu.du

at u = 0 & π |dx|~ 0 & |dy|~bdu


at u = π/2 & 3π/2 |dx|~ adu & |dy|~0
bdu < adu

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

However, this representation does not yield a figure


with maximum inscribed area and thus is not efficient
visual representation.

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).

P(u) = [a.u2 2a.u]T


0≤u≤∞

Computer-aided design
Need of Efficient Algorithm
Parametric Representation
of a Parabola

x = a.u2 and y = 2.a.u


The parabola, like an ellipse is not a closed curve. Thus
the amount of parabola to be displayed must be limited
by choosing a minimum and maximum value of u.
e.g. If the range of x-coordinate is limited then
umin = (xmin/a)1/2 and umax = (xmax/a)1/2
If the range of y-coordinate is limited then
umin = ymin/2a and umax = ymax/2a

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)

New point on the parabola is obtained at the cost of 3


Adds and one multiply within inner loop.

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

Non-P Eqn.: x2/a2 – y2/b2 = 1


Vertex at (a,0) and the asymptotic slopes are ±b/a
One way of Parametric representation:
x = ±a.secu
y = ±b.tanu
P(u) = [±a.secu ±b.tanu]T

However, this P-Rep doesn’t yield maximum inscribed


area.

Computer-aided design
Parametric Representation of a Hyperbola

Non-P Eqn.: x2/a2 – y2/b2 = 1


Parametric representation:
x = ±a.secu
y = ±b.tanu
Recursive Relation:
bxi
xi 1  
b cos u  yi sin u
byi  b tan u
yi 1  
b  yi tan u

Computer-aided design
Parametric Representation of a Hyperbola

An alternate P-Rep of a hyperbola which yields the


polygon with maximum inscribed area is
x = a.coshu
y = b.sinhu
P(u) = [a.coshu b.sinhu]T

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

If x range is limited then


umin = cosh-1(xmin/a)
umax = cosh-1(xmax/a)

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?

Computer-aided design Slide #1


Need for synthetic curves

Computer-aided design Slide #2


Uses

1. Functional Requirement: Which curve is best suited from the fluid


dynamics point of view?

Computer-aided design Slide #3


Uses

2. Aesthetic Requirement: Which curve is best suited?

Computer-aided design Slide #4


Uses

3. Ergonomic Requirement(s): Which curve is best suited from the


ergonomics point of view??

Computer-aided design Slide #5


Why not analytic curves?

 Analytic curves are usually not sufficient to meet geometric design


requirements of some products

 Analytic curves don’t provide the flexibility that synthetic curves offer

 Some physical phenomena may require more smoothness than that is


possible with analytic curves/surfaces

 Car bodies, ship hulls, airplane fuselage and wings, propeller blades,
shoe insoles and bottles

Computer-aided design Slide #6


Techniques to design synthetic curves

Curve fitting technique:


 Curve passes through all the data points P0, P1, ……Pn-1, Pn. This type of
process is called as ‘curve interpolation’.

Computer-aided design Slide #7


Techniques to design synthetic curves

Curve Fairing Technique:


 Curve passes only through the end points P0 and Pn. Other points are
the control points to define shape of the curve. This type of process is
called as ‘curve approximation’.

Computer-aided design Slide #8


Objectives of synthetic curves

1. Shape Control

2. Quality of the curves

What a smooth curve it is! Smoothness


What a fair curve it is! Fairness
What a sweet curve it is! Sweetness
Computer-aided design Slide #9
Techniques to Design Curves

 There is no commonly agreed definition of the ‘fairness’, ‘smoothness’,


or ‘sweetness’ of a curve.
 Here it is used in the qualitative sense of ‘pleasing to the eye’.
 What if we have a quantitative representation ?

Computer-aided design Slide #10


Continuity

Various continuity requirements are required to


be satisfied at the data points to improve degree
of smoothness of the resulting curve or surface.
The order of continuity becomes important when
a complex curve is modelled by several curve
segments placed together end to end.

Computer-aided design Slide #11


C0 Continuity | Position Continuity

 Two curve segments join together

Computer-aided design Slide #12


C1 Continuity | Tangent Continuity

 Along with C0(position), tangents are collinear at the joining point.

Computer-aided design Slide #13


C2 Continuity | Curvature Continuity

 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.

Computer-aided design Slide #14


Relation between continuity (C) and degree of polynomial (n)

In general, a mathematical spline (curve) is a ‘piecewise polynomial of


degree n’ has continuity of derivatives of order n-1. at the common
joints between segments.
 Piecewise polynomial of low degree are most useful for curve fitting
because low degree polynomial reduce the computational requirements
as well as reduce numerical instabilities.
 Numerical instabilities do not allow for unique solution when several
points are joined in a common curve.

Computer-aided design Slide #15


Synthetic Curves under Study

Major CAD/CAM packages offer three types of synthetic curves:

a) Hermite Cubic Spline

b) Bezier

c) B-Spline

Computer-aided design Slide #16


Synthetic or Free Form Curves Cubic Spline | Bezier | B Spline

Various Synthetic Curves with reference to 5 points having same x- and y-


coordinates.

Computer-aided design Slide #17


Modeling Synthetic Curves
(Hermite cubic 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

Computer-aided design Slide #19


Algebraic Representation of Curves

 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.

Computer-aided design Slide #20


Algebraic Rep of a Cubic Spline Curve

 Algebraic equation is y = C3x3 + C2x2 + C1x + C0


 Cubic splines use cubic polynomials (3rd order polynomials). The
polynomial has four coefficients and needs four conditions to evaluate
the coefficients.
 Hermite cubic spline uses two data points at its ends and two tangent
vectors at these points.

Computer-aided design Slide #21


Hermite Cubic Spline Curve (HCS) representation

 The Hermit cubic spline uses two


data points at its ends and two
tangent vectors at these points. P(u)

 P0 Position vector at starting point


 P1 Position vector at end point
 P′0 Tangent Vector at starting point
 P′1 Tangent Vector at end point
 P(u) any point on the curve

Computer-aided design Slide #22


Hermite Cubic Spline Curve (HCS) representation

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

Computer-aided design Slide #23


Hermite Cubic Spline Curve (HCS) representation

P(u)
In matrix form,

P(u) = UT.C

U = [u3 u2 u 1]T

C = [C3 C2 C1 C0]

Computer-aided design Slide #24


Hermite Cubic Spline Curve (HCS) representation
P(u) = C3u3 + C2u2 + C1u + C0 -------(a)
P’(u) = 3C3u2 + 2C2u + C1 -------(b)
P(u) To find coefficients Ci apply BCs
At u = 0,
P(0) = P0 = C0 &
P’(0) = P’0 = C1
At u = 1,
P(1) = P1 = C3 + C2 + C1 + C0 &
P’(1) = P’1 = 3C3 + 2C2 + C1
Solve for C3, C2, C1 and C0
Computer-aided design Slide #25
Hermite Cubic Spline Curve (HCS) representation

P(u) = C3u3 + C2u2 + C1u + C0 -------(a)


P’(u) = 3C3u2 + 2C2u + C1 -------(b)
P(u)

C0 = P0 & C1 = P’0
C2 = 3(P1–P0)–2(P’0–P’1)
C3 = 2(P0–P1)+P’0+P’1

Substituting in Eqn (a) & (b)

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'

Computer-aided design Slide #26


P–representation of H-Cubic Spline curve in Vector Matrix Form

P(u) = (2u3–3u2+1)P0 + (–2u3+3u2)P1 + (u3–2u2+u)P0' + (u3–u2)P1'


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)

Computer-aided design Slide #27


P–representation of H-Cubic Spline curve in Vector Matrix Form

P(u) = (2u3–3u2+1)P0 + (–2u3+3u2)P1 + (u3–2u2+u)P0' + (u3–u2)P1'


In vector-matrix form: P(u) = U[MH]VT wherein, [MH] is called as Hermite
Matrix and V is called as Geometry Coefficient Matrix.

P(u) = U [MH] V

Computer-aided design Slide #28


Model Solution | Shape Control of HCS Curve
Generate HCS curves using end points: P [1 1]T and P [5 1]T for the
following Geometric Coefficient Matrix (GCM)

 P0 
P 
 1
 P0' 
 '
 P1 
G.C.M (1,1) (5,1)
(Geometry Coefficient Matrix)

Computer-aided design Slide #29


THANK YOU !

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) = (2u3–3u2+1)P0 + (–2u3+3u2)P1 + (u3–2u2+u)P0' + (u3–u2)P1'


In vector-matrix form: P(u) = U[MH]VT wherein, [MH] is called as Hermite
Matrix and V is called as Geometry Coefficient Matrix.

P(u) = U [MH] V

Computer-aided design Slide #1


Model Solution | Shape Control of HCS Curve
Generate HCS curves using end points: P [1 1]T and P [5 1]T for the
following Geometric Coefficient Matrix (GCM)

 P0 
P 
 1
 P0' 
 '
 P1 
G.C.M (1,1) (5,1)
(Geometry Coefficient Matrix)

Computer-aided design Slide #2


Variation of Blending Functions

P0 P1 P(u) =
(2u3–3u2+1)P0+
(–2u3+3u2)P1 +
(u3–2u2+u)P0'+
(u3–u2)P1'

P’0

P’1

Computer-aided design Slide #3


Blending of HCS segments | Composite HCS
Pn
P’n
Pn-1
Pn-2

P4
P’0
P3
P2
P1

P0

What do we require to create this curve out of HCS?


Data points: P0, P1,…. Pn-1, Pn and Tangent vectors:
P’0, P’1, …., P’n-1, P’n
Computer-aided design Slide #4
Blending of HCS segments
Consider eliminating intermediate tangent vector P’1 in the first 2
segments. P’2
P’1
P2
u2
P’0 P1
u1

P0

We will impose C2 condition at joining point P1

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

P’1 =–1/4(3P0 + P’0 – 3P2 + P’2)


P0

For more than 2 segments a matrix equation can result by


repeating the same procedure.
Computer-aided design Slide #6
Blending of HCS segments
Pn
P’n
Pn-1
Pn-2
P’0 = known
P’1 =–1/4(3P0 + P’0 – 3P2 + P’2)
P4
P’0 P’2 =–1/4(3P1 + P’1 – 3P3 + P’3)
P3
P2 P’3 =–1/4(3P2 + P’2 – 3P4 + P’4)
P1
P’n-1 =–1/4(3Pn-2 + P’n-2 – 3Pn + P’n)
P0
P’n = known

By internal evaluation of all tangent vectors, user can specify


only data points and end tangent vectors.
Computer-aided design Slide #7
Shape Control of Hermite Cubic Spline Curve

 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.

Computer-aided design Slide #8


Tutorial 1

Find equation of a cubic spline which connects P0 and P2 and that is


tangent to the two line segments as shown below.

P1

P2

P0

Computer-aided design Slide #9


Solution

P1

P2

P0

P(u) = (2u3–3u2+1)P0 + (–2u3+3u2)P1 + (u3–2u2+u)P0' + (u3–u2)P1‘

With P0‘ = P1 – P0 & P1‘ = P2 – P1

P(u) = (u3–u2–u+1)P0 – u(u-1)P1 + u2(–u+2)P2

Computer-aided design Slide #10


Tutorial 2

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

Computer-aided design Slide #11


Tutorial 2 | solution

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

Computer-aided design Slide #13


Tutorial 3 | solution

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

Write a Matlab code to generate a composite Hermite Cubic


Spline curve with ‘n’ points (position vectors) and the first and
last tangent vectors. Ensure C-2 continuity at all joints.

Computer-aided design Slide #15


Thought experiment

What would be the best HCS curve to design a water slide in a theme park ?

Computer-aided design Slide #16


Drawback of Hermite cubic spline

1. Degree remains cubic irrespective of number of data points. Therefore,


maximum order of continuity is
2. In order to increase flexibility of the curve more points must be input,
thus creating more splines which are of still cubic order.

Computer-aided design Slide #17


Drawback of Hermite cubic spline

3. Global shape control characteristics:


 The use of HCS curve in design applications is limited as compared to
Bezier and Bspline curve because of global shape control.
 Changing the position of end points or end slopes changes the entire
shape of the spline which doesn’t give ‘required feel’ in the design.

Computer-aided design Slide #18


Drawback of Hermite cubic spline

4. Tangent Vectors in Equation: NOT INTUITIVE


P(u) = (2u3–3u2+1)P0 + (–2u3+3u2)P1 + (u3–2u2+u)P0' + (u3–u2)P1‘

Computer-aided design Slide #19


Modeling Synthetic Curves
(Bezier curve)

Computer-aided design
Who is Bezier?

Computer-aided design Slide #21


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.

Computer-aided design Slide #22


Bezier Curve | Graphical Representation
P2

P1
u

P0 P3
u=0 u=1

n+1 = No of control points, n is degree


Computer-aided design Slide #23
Bezier curves (Bz) of various degrees

n+1 = 3, n =2 n+1 = 4, n=3 n+1 = 5, n=4 n+1 = 6, n=5 n+1 = 7, n=6


Quadratic Bz Cubic Bz Quartic Bz Pentic Bz Hexic Bz

n+1 = No of control points, n is degree


Computer-aided design Slide #24
Bezier Curve | [4 control points Cubic Bz curve]

Computer-aided design Slide #25


More examples of Bz curves

4 control points Cubic 4 control points Cubic


(3rd degree) Bz curve (3rd degree) Bz curve

5 control points quartic 6 control points pentic


(4th degree) Bz curve (5th degree) Bz curve
Computer-aided design Slide #26
End segments dictate the end tangent

Computer-aided design Slide #27


Bezier Curve | Key Points

 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.

Computer-aided design Slide #28


Bezier Curve Characteristics

 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.

Computer-aided design Slide #29


Bezier Curve | Parametric Equation

P(u): any point on the curve


Pi: control point or vertex of characteristic control polygon
Bi,n(u): Basis function or Bernstein function

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

for 3th degree curve, i.e. a cubic Bz curve,

for nth degree curve,

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.

Computer-aided design Slide #1


Bezier Curve | Graphical Representation
P2

P1
u

P0 P3
u=0 u=1

n+1 = No of control points, n is degree


Computer-aided design Slide #2
Bezier Curve | Key Points

 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.

Computer-aided design Slide #3


Bezier Curve Characteristics

 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.

Computer-aided design Slide #4


Bezier Curve | Parametric Equation

P(u): any point on the curve


Pi: control point or vertex of characteristic control polygon
Bi,n(u): Basis function or Bernstein function

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

for 3th degree curve, i.e. a cubic Bz curve,

for nth degree curve,

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,

Physical Significance w.r.t Cubic Bz.


n+1 = 4, n = 3
Pi is most influential at (u=i/n)
P0 is most influential at (i/n) = (0/3) = 0
P1 is most influential at (i/n) = (1/3)
P2 is most influential at (i/n) = (2/3)
P3 is most influential at (i/n) = (3/3) = 1

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

Convex Hull Property:

Bezier curve is completely contained in a convex hull defined/formed by


the curve’s control points.
The convex hull is a minimum convex area that contains all the control
points.
This property is useful to check graphics functions such as clipping or
displaying.

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

Maximum value of Bernstin function:


The Bernstin function has maximum value at u=i/n on the curve. This
implies that each control point is most influential on the curve shape at
u=i/n.
e.g., for a cubic Bz. curve, P0, P1, P2 and P3 are most influential at u =
0/3=0, 1/3, 2/3 and 3/3=1, respectively.

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

It can be shown that for any given value of u, the


summation of the Bernstin (basis) function is precisely 1.

This ensures relationship between curve and it’s control


points is invariant under connected transformations.

This fact can be used to check numerical computations


and software development.
n

B
i0
i ,n (u )  1

B
i0
i ,n ( u )  (1  u ) 3  3u (1  u ) 2  3u 2 (1  u )  u 3  1

Computer-aided design
Solved example

Find equation of a Bz curve defined by P0 [2 2 0]T P1 [2 3 0]T P2 [3 3 0]T


P3 [3 2 0]T.

Obtain coordinates at u = 0, ¼, ½, ¾ and 1.

[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

What is the continuity between 2 Bz curve


segments?
C0

Computer-aided design
Composite Bezier Curve | Continuity

How can we achieve C1 continuity?

P3
P2

u
1
P1 P4

P8

What is the continuity between 2 Bz curve


segments?
C1

Computer-aided design
Composite Bezier Curve | Continuity

How can we achieve C1 continuity?


P’(0) = n(P1–P0) | P’(1) = n(Pn–Pn-1)

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

For C2, required conditions will have to be applied


P’’(u1=1) = P’’(u2=0)

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)

From above equations,

U = (1-u)P0 + u.P1
V = (1-u)P1 + u.P2
B = (1-u)U + uV

B(u) = (1-u)2P0 + 2u(1-u)P1 + u2P2

Computer-aided design
Limitations of Bz Curve

 The curve does not pass through the control points, which is
inconvenient to some designers.

 Curve lacks local shape control. It has global shape control


characteristics. If one control point is changed then the whole
curve changes.

 Degree of the curve depends on the


number of control points

Computer-aided design
THANK YOU !

Computer-aided design

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy