0% found this document useful (0 votes)
32 views87 pages

Surface Modelling

Uploaded by

gociy20905
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)
32 views87 pages

Surface Modelling

Uploaded by

gociy20905
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/ 87

Government College of Engineering and Research

Avasari, Pune

SOLID MODELING AND


DRAFTING

Mr. Sanjay D. Patil


Assistant Professor,
Automobile Department
[email protected]
Unit 2

Curves and Surfaces

Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 2
CAD Entities in ZOOM view

Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 3
Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 4
2D Graphics Pipeline

Clipping
Object window to
Object Applying
subset viewport
World Coordinates world window
mapping

Simple 2D Drawing Pipeline

Object
Display Rasterization
Screen coordinates
Rasterization

• A fundamental computer graphics function


• Determine the pixels’ colors, illuminations, textures, etc.
• Implemented by graphics hardware
• Rasterization algorithms
• Lines
• Circles
• Triangles
• Polygons

Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 6
Line Drawing
Many computer-generated pictures are composed of
straight-line segments.
A line segment is displayed by turning on a set of
adjacent pixels.
In order to draw a line, it is necessary to determine
which pixels lie nearest the line and provide the best
approximation to the desired line.
The line drawing routine should be accurate, fast,
and easy to implement.

7
The Problem of Scan Conversion
y = mx + b
where, m = Slope of the line
b = the y intercept of a line
A line segment is defined by the
coordinate positions of the line
endpoints.
We have a line with the endpoints (2,2)
and (8,7) and we want to draw this line
on a pixel based display.
How do we choose which pixels to turn on?
Following algorithms are used for line
• Digital Differential Analyzer (simple DDA) Line Drawing Algorithm
• Bresenham ’s Line Drawing Algorithm
8
Simple Digital Differential Analyzer (simple
DDA) Line Drawing Algorithm
To illustrate the idea of DDA algorithm, we still want to
draw the line segment with endpoints
(Xstart, Ystart) and (Xend, Yend) having slope :
Yend – Ystart
m=
Xend – Xstart
Any two consecutive points (x1, y1), (x2, y2) lying
on this line satisfies the equation:
y2 – y1
= m
x2 – x1

9
Simple DDA Line Drawing Algorithm

The algorithm is divided into two cases that depend on the


absolute value of the slope of the line. Note that:
 We should test the line endpoints to ensure that the line is
neither horizontal (Xstart = Xend) nor vertical (Ystart
=Yend). If the line is horizontal use the horizontal line
drawing algorithm and use the vertical line drawing algorithm
when it is vertical.
 The starting and ending points of the line are plotted
separately since these values are known from the given data.
 In the two cases below the computed incremental values
for y2 and x2 may not be integers. The Round function must
be used to obtain an integer coordinate value.
10
Simple DDA Line Drawing Algorithm
Case 1: For abs(m) < 1 and Xstart < Xend,
we generate the line by incrementing the previous x
value one unit until Xend is reached and then solve
for y. if Xstart > Xend, swap the two endpoints.
Thus for these consecutive points:
x2 = x1 + 1 or x2 – x1 = 1
Substituting this difference into equation 1 yields:
(y2 – y1)/1= m or y2 = y1 + m

11
Simple DDA Line Drawing Algorithm
Equation 2 enables us to calculate successive values
of y from the previous value by replacing the
repeated multiplication with floating point addition.
This method of obtaining the current value by
adding a constant to the previous value is an
example of incremental calculation. Using
knowledge of one point to compute the next is a
great time saving technique.
The following code can be used to draw a line from
(Xstart, Ystart) to (Xend, Yend) using simple DDA
algorithm (case 1):

12
Simple DDA Line Drawing Algorithm
m = (Yend-Ystart) / (Xend-Xstart)
If (abs(m)<1 and Xstart>Xend) then
Swap endpoints Xstart  Xend and Ystart  Yend
end if
Set pixel (Xstart, Ystart) with desired color
If abs(m) < 1 then
y = Ystart
x = Xstart + 1
Next: y = y + m
Set pixel (x, Round(y)) with desired color
x=x+1
If x  Xend-1 then go to Next
endif
Set pixel (Xend, Yend) with desired color

13
Simple DDA Line Drawing Algorithm
We will use the simple DDA algorithm to draw a line with starting point (2,0)
and ending point (7,4) on a pixel based display. Firstly, we compute the slope m:
m =(Yend–Ystart)/(Xend–Xstart)=(4–0)/(7–2)=4/5 = 0.8
Δx = (Xend–Xstart)=(7-2)=5
Δy =(Yend–Ystart) =(4–0) =4
Increment in X = Xstart +(Δx/5) = Xstart + 1
Increment in Y= Ystart + (Δy/5) = Ystart + 0.8

x y Round(y)
2 0
3 y = y + m = 0 + 0.8=0.8 1
4 y = y + m = 0.8 + 0.8=1.6 2
5 y = y + m = 1.6 + 0.8=2.4 2
6 y = y + m = 2.4 + 0.8=3.2 3
7 4
14
Simple DDA Line Drawing Algorithm

15
Geometrical Curve :

• All existing CAD/CAM system provide users with curve entities


which can be divided into analytical and synthetic curve
Analytical curve:
i. can be defined by mathematical equation
ii. Analytic entities are points, lines, arcs circle etc
Synthetic curve
i. It is defined by set of data points
ii. Synthetics curve include B- spline curve, Bezier curve etc

Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 16
Methods of defining Point

• Absolute Cartesian coordinate


• Absolute cylindrical coordinate
• Incremental Cartesian Coordinate
• Incremental Cylindrical Coordinate
• Point of Intersection
• Defining middle or break point

Methods of defining Line


• Define end points
• Parallel or Perpendicular to exiting line
• Vertical or horizontal line
• Tangent to exiting line

Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 17
Methods of defining Circle

• Radius or diameter and center


• Defining three points
• Center and point on circle
• Tangent to line, pass through a given point and with radius

Methods of defining Ellipse


• Center and axis length
• Four Points
• Two conjugate diameter

Methods of defining Parabola


• Vertex and focus
• Three points

Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 18
Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 19
Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 20
Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 21
Application of Synthetic Curves

Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 22
Curve Representation
Cartesian or Non parametric
• P= [ x y z] T = [x f(x) g(x) ] T
• Curve represented by x, y and z coordinate or one to one relationship
• If the solve of curve is vertical or near to vertical it’s value become infinite or very
large so, it is difficult to deal with computationally and programme wise
• difficult to represent closed curve
• If curve displayed by as a series of points or by straight line segments, the
computation involved could be extensive.

Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 23
Parametric
• P= [ x(u) y(u) z(u) ] T umin < u < u max
• Each point on curve is expressed as a function of parameter u. The parameter
acts as a local coordinate for point on curve
• Overcomes the limitation of non parametric curve
• Closed curve can easily define
• Slope is replaced with tangent
• Well suite for computation and display
• large so, it is difficult to deal with computationally and programme wise
• difficult to represent closed curve
• If curve displayed by as a series of points or by straight line segments, the
computation involved could be extensive.

Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 24
Parametric Equation of Line

P  P1  (P - P1)
P - P1= u (P2 -P1)

P  P1  u(P2 - P1), 0  u 1
Pro.1. A Line joins two Points(3, 4, 6) & (5, 7, 1)
Find
i) The Parametric Equation of Line
ii) The tangent vector of Line
iii) The unit vector in the direction of Line
29

Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari
Pro.2. Line L1 has end points (1, 2, 7) & (5, 6, 1), while
line L2 has end points (7, 3, 4) & (3, 9, 10)
i) The Parametric Equation of Line
ii) The tangent vector of Line
iii) Are the tow lines are Parallel or Perpendicular?
Iv) Are the two lines are intersecting? If yes, find point
of Intersection.

Solution :-
Given: P1 (1, 2, 7) , P2(5, 6, 1) , P3 (7, 3, 4) & P4 (3,
9, 10)
Parametric Equation of Circle

Representation 1
Non-parametric Representation

x 2
 y 2
 1
x = u (a )

y  1- u 2

0 0.25 0.5 0.75 1

Limitations of non parametric representation


poor and non-uniform definition
square root complicated to compute
Representation 2 :
Parametric representation

/2 3/8
/4

x  cos u /8
y  sin u
(b)
u
0

Limitations of non parametric representation


better definition than non parametric representation
Inefficient due to computing the trigonometric function at each
point
Representation 3
Parametric Representation with recursive approach
Pn+1
Parametric equation for point Pn with centre of circle is origin

xn  r cos
Pn
yn  r sin 

Now, assuming there is d  increment between


two consecutive Pn and Pn+1
x n 1  r cos(  d )
 r cos cos d  r sin  sin d
x n 1  xn cos d  yn sin d
Coordinate of point Pn+1
y n 1  y n cos d  x n sin d

Observation:
• curves are represented by a series of line-segments
• Trigonometric function cosd  and sind  have to calculated once only, hence it speed up the circl
generation and display
Parametric equation for point Pn with centre of circle xc and yc origin
xn  xc+r c o s u
yn  yc+r s i n u

xn  xc = r cos u
yn  yc = r sin u

x n 1  xc +r cos(u  d u )
 x c+ r c o s u c o s d u  r s i n u s i n d u

y n 1  yc + r sin(u  d u )
 yc + r s i n u c o s d u  r cosu sin d u

x n 1  x + ( x - x ) c o s d u  ( y - y ) s i n d u
c n c n c

y n 1  y c + ( y n - y c ) c o s d u  ( x n - yc ) s i n d u
36

Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari
Determination of Center and Radius of circle from two end points of
Diameter

37

Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari
38

Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari
Prob. 2. P1(2, 3, 6) & P2 (8, 7, 6)

39

Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari
40

Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari
Parametric Equation of Ellips

xn xc  Acosu
yn  y
c
Bsinu 0    2
zn  z c
Now uses the same method as in the Representation of circle to reduce the amount of calculation.
x n 1  xc +A cos(u  d u )
 x c+ A c o s u c o s d u  A s i n u s i n d u

y n 1  yc + B sin(u  d u )
 yc + B s i n u c o s d u  B cosu sin d u

x n 1  x + ( x - x ) c o s d u  𝐴 ( y n - yc ) s i n d u
c n c 𝐵

𝐵 41
y n 1  y c+ ( y n - y c) c o s d u  ( x n - yc ) s i n d u
𝐴

Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari
Parametric Equation of an inclined Ellips

Parametric Equation of ellips inclined at angale α

An inclined ellips

42

Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari
Parametric Equation of Inclined Ellips

Mr. S. D. Patil, Automobile Department, Government College of


43
Engineering and Research Avasari
Example 1

Mr. S. D. Patil, Automobile Department, Government College of


44
Engineering and Research Avasari
Mr. S. D. Patil, Automobile Department, Government College of
45
Engineering and Research Avasari
Mr. S. D. Patil, Automobile Department, Government College of
46
Engineering and Research Avasari
Mr. S. D. Patil, Automobile Department, Government College of
47
Engineering and Research Avasari
Mr. S. D. Patil, Automobile Department, Government College of
48
Engineering and Research Avasari
Mr. S. D. Patil, Automobile Department, Government College of
49
Engineering and Research Avasari
Order of a Synthetic Curve
• Mathematically, synthetic curves represent a curve-fitting problem
to construct a smooth curve that passes through given data points.

• Zero-order continuity C0 yields a position continuous curve. First


C1-and second C2-order continuities imply slope and curvature
continuous curves respectively. A C1 curve is the minimum
acceptable curve for engineering design.

• A cubic polynomial is the minimum-order polynomial that can


guarantee the generation of C0, C1 or C2 curves.

• Also, the designer may prefer to control the shape of the curve
locally instead of globally by changing the control points.
Continuity (C0, C1 & C2)

C0 continuity: Two curves sections must have the same


coordinate position at the boundary point. i.e. when two
curves meet at their end points but may not share same
tangency curvature.
C1continuity: It means that the parametric first derivatives
are the same at the intersection on two successive sections.
i.e. two curves have the same tangent at the matched end
points.
C2 continuity: Both the first and second parametric
derivatives of the two curve sections are the same at their
boundary. i.e. two curves have the same curvature at the end
point and have a smooth transition from one curve to
another.
Synthetic Curve
A curve which are defined by set of data points are known as
synthetic curve

It is used for representation of profile of


• Car bodies
• Ship hulls
• Airplane wings
• Propeller blades

Few types of synthetic curve are


• Hermite Cubic Splines
• Bezier Curve
• B-Spline Curve
Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 54
Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 56
Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 57
Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 58
Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 59
Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 60
Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 61
Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 62
Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 63
Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 64
Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 65
Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 66
Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 67
Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 68
Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 69
Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 70
Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 71
NURBS(Non uniform rational B spline curves)
• A rational curve is defined by the algebraic ratio of two polynomials
while a non rational curve is defined by one polynomial. Rational curves
draw their theories from projective geometry.
• Non-uniform rational basis spline (NURBS) is a mathematical model
commonly used in computer graphics for generating and representing
curves and surfaces. It offers great flexibility and precision for handling
both analytic (surfaces defined by common mathematical formulae) and
modeled shapes.
• NURBS are commonly used in computer-aided design (CAD),
manufacturing (CAM), and engineering (CAE) and are part of numerous
industry wide standards, such as IGES, STEP, ACIS, and PHIGS. NURBS
tools are also found in various 3D modeling and animation software
packages.
 NURBS surfaces are functions of two parameters mapping to a surface in three-
dimensional space.
 The shape of the surface is determined by control points.
 NURBS surfaces can represent, in a compact form, simple geometrical shapes.
 A NURBS curve is defined by its order, a set of weighted control points, and a knot
vector.
 The knot vector is a sequence of parameter values that determines where and how
the control points affect the NURBS curve. The number of knots is always equal to
the number of control points plus curve degree plus one (i.e. number of control
points plus curve order). The knot vector divides the parametric space in the
intervals mentioned before, usually referred to as knot spans.
 The values of the knots control the mapping between the input parameter and the
corresponding NURBS value. For example, if a NURBS describes a path through space
over time, the knots control the time that the function proceeds past the control
points.
SURFACE MODELING
• Surface modeling gives you the ability to build out a visual representation of an object’s exterior and its
contours
• Surface modeling is a mathematical method usually provided in CAD applications for displaying solid-
appearing objects. Surface modeling makes it possible for users to look at the specific object at specific
angles with solid surfaces.
• Surface modeling is a popular technique for architectural designs and renderings.
• For Surface model there were no properties of mass defined and no thickness. This gives the designer the
unique ability to modify the model in ways that solid models are incapable.
• Also, note that these surfaces can be represented using NURBS or polygons, depending on the application.
SolidWorks typically uses NURBS in its surface modeling operators.
• Surface modeling facilitates, Make Changes to an Imported Model, Design More Complex Shapes and
Create a Fillet or Draft Between Faces.
• Surface modeling is considered a more complex technique for displaying objects than wireframe modeling.
• Surface modeling has much less ambiguous display functionalities compared to wireframe modelling. but not
as much or sophisticated as solid modeling. The technique often involves conversions between various three-
dimensional modeling types.
• Typical processes involved in surface modeling are: Generation of a model combining the three-dimensional
surfaces and solids
INTRODUCTION TO SURFACES

• Shape design and the representation of complex objects such as car, ship, and airplane
bodies as well as castings cannot be achieved utilizing the curves covered in earlier.
• In such cases, surfaces must be utilized to describe objects precisely and accurately. We
create surfaces, and then we use them to cut and trim solid features and primitives to
obtain the models of the complex objects.
• Creation usually begins with data points or curves. Surface creation on CAD/CAM
systems usually requires curves as a start.
• During surface creation on a CAD/CAM system, you should follow the modeling
guidelines and strategies. Moreover, you should be careful when selecting curves to
create surfaces. Selecting the mismatching ends of curves results in twisted surfaces.
The figure shows how the wrong ruled surface is created if its defining curves are
selected near the wrong ends.
• A surface might require two boundary curves, All curves covered in this Chapter can be used to
generate surfaces. In order to visualize surfaces on computer screen, a mesh, say in n in size, is usually
displayed. The mesh size is controllable by the user.
Types of Surfaces
1. Plane surface: It is the simplest surface. It requires three non-coincident points to define an
infinite plane. The plane surface can be used to generate cross sections by intersecting a solid with
it.
2. Ruled (lofted) surface: It is a linear surface. It interpolates linearly between two boundary curves
that define the surface (rails). Rails can be any curves, this surface is ideal for representing surfaces
that do not have any twists or kinks.
3. Surface of revolution: It is an axisymmetric surface that can model axisymmetric objects. It is
generated by rotating a planar curve in space about the axis of symmetry a certain angle as shown
in Figure.
4. Tabulated cylinder: It is a surface generated by translating a planar curve a certain distance along
a specified direction (axis of the cylinder or directrix) as shown in figure. The plane of the curve is
perpendicular to the directrix. This surface is not literally a cylinder. It is used to generate extruded
surfaces that have identical cross sections.
5. Bezier surface: it is a surface that approximates or interpolates given input data. It is different
from the previous surfaces in that it is a synthetic surface. It extends the Bezier curve to surfaces.
It is a general surface that permits twists, and kinks. Bezier surface allows only global control of the
surface.
6. B-spline surface: It is a surface that can approximate or interpolate given input data.
Figure shows an interpolating example. It is a synthetic surface. It is a general surface like a
Bezier surface hut with the advantage of permitting local control of the surface.
7. Coon’s surface: The previously described surfaces are used with either open boundaries
or given data points. A Coons patch is used to create a surface using curves that form closed
boundaries .
8. Fillet surface: It is a B-spline surface that blends two surfaces. The two original surfaces
may or may not be trimmed.
9. Offset surface: Existing surfaces can be offset to create new ones identical in shape hut
with different dimensions. It is a useful surface to use to speed up surface creation. For
example, to create a hollow cylinder, the outer or inner cylinder can he created using a
cylinder command and the other one can he created by an offset command. The offset
surface command becomes very efficient to use if the original surface is a composite one.
10. NURB Surface: as stated earlier, surface defined by NURB curves.
11. Coons Surface: A Coons surface or simply Coons, is a type of manifold parameterization
used in computer graphics like CAD/CAM to smoothly join other surfaces together, and in
computational mechanics applications, particularly in finite element method and boundary
element method, to mesh problem domains into elements.
Representation of Curve in Cartesian space :
Mr. S. D. Patil, Automobile Department, Government College of Engineering and Research Avasari 87

You might also like