Unit 2
Unit 2
Unit 2
GEOMETRIC MODELLING
Aim: To understand the various requirements for the information that is generated during the
geometric modelling stage.
Objective:
To Study various types of geometric models possible and their applications
Recognise the various types of surfaces and their applications as used in geometric
modelling
Appreciate the concept of parametric modelling which is the current mainstay of most of
the 3D modelling systems
Pre-test MCQ:
1. Basic entities of CAD modelling
a. Line
b. Arc
c. Circle
d. All of the other options
2. Which of the algorithm is very familiar in projection of lines?
a. Genetic algorithm
b. Fuzzy algorithm
c. DDA algorithm
d. ABC algorithm
3. Colour raster display uses three electron guns, namely:
a. Red, green and blue
b. Red, green and yellow
Page 1 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
The total product cycle in a manufacturing environment involves a large number of interconnected
functions. The concept of a product originates in the designer’s mind. If it is to be translated into
reality, he needs to present it in a relevant form for the manufacturing engineer to understand and
carry out the necessary operations on it for its production (Fig. 2.1). The total process will have to
be carefully integrated such that a large amount of duplication of work is avoided. This may consist
of some kind of a problem identification based on market research, product feedback or some
innovative new idea. Based on this input, some preliminary ideas could be developed. These
preliminary ideas can then be expanded into some preliminary designs, which are basically gross
designs, without going really into the various principles involved. Based on all this, one or more
candidate designs could be generated which needs further exploration. For all these activities,
geometric modelling becomes the central part that is manipulated at all these stages as shown in
Fig. 2.1. Traditionally, product drawings were made together with the prototypes for passing across
the information. However, in a computerised environment, the information a designer generates
can form the basic unit which is accessed by a number of other elements of a CAM system, as
explained in the first chapter. Hence, it is important that the geometric model generated should be
as clear and comprehensive as possible so that the other modules of the modelling and
manufacturing system are able to use this information in the most optimal way. The functions that
are expected of geometric modelling are
Page 2 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
Manufacturing
• Parts classification
• Process planning
• Numerical-control data generation and verification
• Robot program generation
Production Engineering
• Bill of materials
• Material requirement
• Manufacturing resource requirement
• Scheduling
Inspection and Quality Control
• Program generation for inspection machines
• Comparison of produced part with design
In view of such varied applications, the geometric-modelling technique used has to provide all
such facilities for interaction. The modelling system should be able to describe the parts,
assemblies, raw material used, and the manufacturing requirements. From geometric models (of
parts, assemblies, stock and tools), it is possible to obtain manufacturing, assembly and inspection
plans and command data for numerically controlled machine tools. Another important aspect to be
considered with geometric modelling is the fact that the ways of traditional designers are followed
as far as possible. This is easier said than done. But what brings out this interaction is the
‘interactive graphic environments’ provided by most of the operating systems. The user (designer)
is able to see his designing process instantly, and is thereby in a position to take any corrective
action as required. However, in the batch mode of operation, which was prevalent in most of the
earlier modelling systems, this aspect was missing. Therefore, it becomes necessary for the
geometric modelling system to provide complete information on all aspects related with the further
use of the system and at the same time be simple and in tune with the designer’s methods. Requicha
and Voelker [1981] specified the following properties to be desired of in any geometric modelling
(solids) system.
1. The configuration of the solid (geometric model) must stay invariant with regard to its location
and orientation.
Page 3 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
2. The solid must have an interior and must not have isolated parts.
3. The solid must be finite and occupy only a finite shape.
4. The application of a transformation or other operation that adds or removes parts must produce
another solid.
5. The model of the solid in E3 (Euler space) may contain infinite number of points. However, it
must have a finite number of surfaces which can be described.
6. The boundary of the solid must uniquely identify which part of the solid is exterior and which
is interior.
GEOMETRIC MODELS
There are a large number of geometric modelling methods that have been represented in the
literature referenced in the end. All these models satisfy the requirements presented in the
previous article.
Page 4 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
Of these, the line model is the simplest and is used in low cost designing systems. The complete
object is represented by a number of lines with their endpoint coordinates (x, y, z), and their
connectivity relationships. This is also called wireframe representation. Though it appears simple,
as seen in Fig. 2.3, there is an ambiguity possible as it is difficult to understand
the outside of the solid represented by the wireframe model in Fig. 2.4. Thus, the line model or
wireframe model is inadequate for representing the more complex solids. It is also possible to draw
some impossible solid objects using wireframe modelling as shown in Fig. 2.5. However, in view
of the simpler manipulation methods used in organizing the wireframe models, these are used in
low-end designing and manufacturing systems. Examples could be AutoCAD, Versa CAD,
Personal designer of Computer Vision, Micro Station, CADKEY, etc. To fully describe the nature
of the solid, it is essential to store further information in addition to the vertex data.
Most of these systems have now progressed to provide comprehensive three-dimensional facilities
in addition to the two-dimensional methods described above.
Page 5 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
Figure 2.5 impossible objects that can be modelled using a wireframe model
Page 6 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
Page 7 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
Surface modeling has been particularly useful in the development of manufacturing codes for
automobile panels and the complex doubly curved shapes of aerospace structures and dies and
moulds.
• bounded
• homogeneously three dimensional
• finite
Page 8 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
(i) Spatial Enumeration: In this simplest form of 3D volumetric raster model, a section of
3D space is described by a matrix of evenly spaced cubic volume elements called voxels.
(ii) Cell Decomposition: This is a hierarchical adaptation of spatial enumeration. 3D space is
sub-divided into cells. Cells could be of different sizes. These simple cells are glued
together to describe a solid object.
(iii)Boundary Representation: The solid is represented by its boundary which consists of a
set of faces, a set of edges and a set of vertices as well as their topological relations.
(iv) Sweep Methods: In this technique a planar shape is moved along a curve. Translational
sweep can be used to create prismatic objects and rotational sweep could be used for
axisymmetric components.
(v) Primitive Instancing: This modeling scheme provides a set of possible object shapes
which are described by a set of parameters. Instances of object shape can be created by
varying these parameters.
(vi) Constructive Solid Geometry (CSG): Primitive instances are combined using Boolean
set operations to create complex objects.
In most of the modeling packages, the approach used for modeling uses any one of the following
three techniques:
Page 9 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
Page 10 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
𝑋 𝑋1 𝑋2 𝑋1
{𝑌 } = { 𝑌1 } + 𝑢 [{ 𝑌2 } − { 𝑌1 }]
𝑍 𝑍1 𝑍2 𝑍2
Page 11 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
called interpolated curve. The smoothness of the curve is the most important requirement of a
synthetic curve. The most popular synthetic curves are hermite cubic, Bezier and B- Spline.
Hermite Cubic Curve
The Hermite cubic curve is determined by defining two positions and two tangent vectors at the
data points (Figure 2.11). The Hermite cubic curve is also known as a parametric cubic curve, and
cubic spline. This curve is used to interpolate given data points but not a free-form curve, unlike
the Bezier and B-spline curves. The most commonly used cubic spline is a three-dimensional
planar curve (not twisted). It is represented by a cubic polynomial. Several cubic splines can be
joined together by imposing the slope continuity at the common points. The parametric equation
of a cubic spline is given by:
Page 12 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
P0=P(0)=a0
P1=P(1)=a0+a1+a2+a3
P’0=P’(0)=a1 (10)
P’1=P’(1)=a1+2a2+3a3
Solving these four equation simultaneously for the coefficients we get
a0 = P0
a1 = P’0
a2 = 3(P1 – P0) – (2P’0 + P’1) (11)
a3 = – 2(P1 – P0) + P’0 + P’1
Substituting Equations (11) into Equation (2) and re-arranging gives:
P(u) = (2u3 –3u2 + 1) P0 + (–2u3 + 3u2) P1 + (u3 –2u2 + u) P’0 + (u3–u2 )P’1 0 ≤u≤ 1 (12)
The tangent vector is
P(u) = (6u2 –6u ) P0 + (–6u2 + 6u) P1 + (3u2 –4u + 1) P’0 + (3u2–2u)P’1 0 ≤u≤ 1 (13)
The functions of u is equations (12) and (13) are called blending functions
The matrix form of equation (12) can be written as
2 2 1 1 𝑃0
−3 3 −2 −1 𝑃1
P(u) = [u3 u2 u1] [ ]{ } (14)
0 0 1 0 𝑃′0
1 0 0 0 𝑃′1
The matrix form of equation (13) can be written as
0 0 0 0 𝑃0
6 −6 3 3 𝑃1
P(u) = [u3 u2 u1] [ ]{ } (15)
−6 6 −4 −2 𝑃′0
0 0 1 0 𝑃′1
1. The curve cannot be modified locally, i.e., when a data point is moved, or an end slope is
changed, the entire curve is affected as shown in Figure 2.12.
Page 13 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
2. The order of the curve is always constant (cubic), regardless of the number of data points. An
increase in the number of data points increases shape flexibility, However, this requires more data
points, creating more splines that are joined together (only two data points and slopes are utilized
for each spline).
Page 14 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
2. P(u) passes through P0 and Pn : This is shown in Figure 2.13. The curve passes though the
first and the last control points.
3. Non-negativity: All basis functions are non-negative.
4. Partition of unity: The sum of the basis functions at a fixed u is 1. It is not difficult to verify
that the basis functions are the coefficients in the binomial expansion of the expression 1 = [u + (1
– u)] n . Hence, their sum is one. Moreover, since they are nonnegative, we conclude that the value
of any basis function is in the range of 0 and 1. Since all basis functions are in the range of 0 and
1 and add to one, they can be considered as weights in the computation of a weighted average.
More precisely, we could say “to compute P(u), one takes the weight Bn,i (u) for control point Pi
and sum them together.”
5. Convex hull property: This means that the Bezier curve defined by the given n + 1 control
points lies completely in the convex hull of the given control points. The convex hull of a set of
points is the smallest convex set that contains all points. In Figure 2.14, the convex hull of the 11
control points is shown. Note that not all control points are on the boundary of the convex hull.
For example, control points 3, 4, 5, 8 and 9 are in the interior. The curve, except for the first two
end points, lies completely in the convex hull. This property is important because we are
guaranteed that the generated curve will be in an understood and computable region and will not
go outside of it.
Page 15 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
Q(u) = ∑𝑘−1 𝑛
𝑖=0 𝐵𝑛,𝑖 (𝑢)𝑃𝑖 + 𝐵𝑛,𝑘 (𝑢)(𝑃𝑘 + 𝑣) + ∑𝑖=𝑘+1 𝐵𝑛,𝑖 (𝑢)𝑃𝑖
Page 16 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
This means:
The corresponding point of u on the new curve is obtained by translating the corresponding point
of u on the original curve in the direction of v with a distance of |Bn,k (u)v|.
More precisely, given a u, we have point P(u) on the original curve and Q(u) on the new curve
and Q(u) = P(u) + Bn,k (u)v. Since v gives the direction of movement, Q(u) is the result of moving
P(u) in the same direction. The length of this translation is, of course, the length of vector Bn,k
(u)v. Therefore, when Bn,k (u) reaches its maximum, the change from P(u) to Q(u) is the largest.
Figure 2.18 illustrates this effect. Both the curves –1 and –2 are Bezier curves of degree 8 defined
by nine control points. Curve 1 is the original curve. If its control point 3 is moved to a new
position, the curve 1 changes to curve 2. On each of these two curves there is the point
corresponding to u = 0.5. It is clear that P(0.5) moves in the same direction to Q(0.5). The distance
between P(0.5) and Q(0.5) is the length of vector B8,3 (0.5)v = 8!/(3!(8 – 3)!) X 0.5 3 (1 – 0.5) 8–
3 v = 0.22v. Hence, the distance is about 22 per cent of the distance between the original control
point 3 and the new control point 3 as shown in the figure.
Letting u = 0 and u = 1 gives P’(0) = n(P1 – P0 ) and P’(1) = n(Pn – Pn-1) The first means that the
tangent vector at u = 0 is in the direction of P1 – P0 multiplied by n. Therefore, the first leg in the
indicated direction is tangent to the Bezier curve. The second means that the tangent vector at u =
Page 17 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
1 is in the direction of Pn – Pn–1 multiplied by n. Therefore, the last leg in the indicated direction is
tangent to the Bezier curve. Figure 2.19 shows this property well.
B - SPLINE CURVES
B - spline curves gives another effective method, besides that of Bezier curves. Moreover, B -
spline curves are the proper and powerful generalization of Bezier curves. B - spline curve has the
ability to interpolate or approximate a set of given data points. In addition to Bezier curves, the B
-spline curve separates the degree of the resulting curve from the number of the given control
points. The flexibility in the degree of the resulting curve is achieved by choosing the blending
function of B - spline curves with an additional degree of freedom that does not exist in Bernstein
polynomials. Similar to Bezier curves, the B - spline curve defined by n + 1 control points Pi is
given by
𝑛
∑ 𝑁𝑖,𝑘 (𝑆) = 1
𝑖=0
Positivity: This property ensures that the curve segment lies completely with in the convex hull
of Pi.
Ni, k(S) = 0 if S [Si+Si+k+1
Continuity:
Nik(S) is (k-2) time continuously differentiable.
Page 18 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
The characteristics of B - spline curves that are useful in design can be summarized as follows:
1. The local control of the curve can be achieved by changing the position of control points, using
multiple control points by placing several points at the same location, or by choosing a different
degree (k - 1). The local control for a cubic B - spline curve by moving P3 to P3* and P3** is
shown in Fig. 2.20. The four curve segments surrounding P3 change only.
2. A non-periodic B - spline curve passes through the first and last control points P0 and Pn+1 and
it is tangent to the first (P1 - P0) and last (Pn+1 – Pn) segment of control polygon, similar to the
Bezier curve, as shown in Fig. 2.20.
3. Generally the lesser the degree, the closer the curve gets to the control points as shown in Fig.
2.21.
4. The second-degree curve is always tangent to the mid points of all the internal polygon segments
as shown in Fig. 2.21.
5. If K equals the number of control points (n + 1), then the resulting B - spline curve becomes a
Bezier curve as shown in Fig. 2.22.
(a) No multiple control points
(b) Multiple control points
6. Multiple control points induces the regions of high curvature of a B - spline curve.
Page 19 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
Page 20 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
Page 21 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
Figure 2.24 Creating a solid with 3D primitives in solid modelling and the model shown in
the form of Constructive Solid Geometry (CSG)
As explained earlier, the data structure for b-rep is based on the winged-edge structure while the
CSG representation is based on the concept of graphs and trees. A graph is defined as a set of
nodes connected by a set of branches or lines. If the pairs of nodes in a graph are ordered pairs
then the graph is called diagraph. In a diagraph, branches become arrows indicating the direction
of going from one node to another. A CSG tree is called as inverted ordered binary tree, where the
leaf nodes are primitives, and the interior nodes are regularised set operations. The total number
of nodes in a CSG tree indicates the number of primitives the solid is composed of. If the solid has
n primitives then it will have (n – 1) Boolean operations. The CSG tree then will have a total of
(2n – 1) nodes.
Page 22 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
producing direct rendered image from a CSG tree. For this purpose, the CSG representation has to
be converted to b-rep before rendering. Hence, many solid modellers use internally b-rep but the
user interface is based on the CSG representation. An object is stored as a tree with operators at
the internal nodes and simple primitives at the leaves. Some nodes represent Boolean operators,
whereas others perform translation, rotation, and scaling. To determine physical properties or to
make pictures, it is necessary to combine the properties of the leaves to obtain the properties of the
root by following the depth-first tree method. The complexity of this task depends on the
representation in which the leaf objects are stored. In some implementations, the primitives are
simple solids, such as cubes, cones or cylinders, ensuring that all regularised combinations are
valid solids as well. In other systems, primitives include half-spaces, which themselves are
unbounded solids. Using half spaces introduces a validity problem, since not all combinations
produce solids. The notion of a regular set is introduced in geometric modelling to ensure the
validity of objects they represent and, therefore, eliminate nonsense objects. A regular set is
defined as a set that is geometrically closed. Under geometric closure, a regular set has interior
and boundary subsets. The boundary contains the interior and any point on the boundary is in
contact with a point in the interior. The main building operators in the CSG scheme are regularised
union (∪∗), difference (–*), and intersection (∩*). These are the set operators which are also called
Boolean operators.
For example, let us assume that we are using two primitives, a block and a cylinder which are
located in space as shown in Fig. 2.26. A “union” operation (A ∪ B) will combine the two to
convert them into a new solid. (Fig. 2.26 (c)) The difference operation (A – B) will create a block
with a hole (Fig. 2.26. (D)). An intersection operation (A ∩ B) will yield the portion common to
the two primitives. (Fig.2.26(E)).
Page 23 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
Post – MCQ
1. Which of function is under geometric modelling in a manufacturing environment?
a. Design analysis
b. Drafting
c. Manufacturing
d. All of the other options
2. Geometric models are categorized into
a. 2 - dimensional & 3 - Dimensional
b. 1 - dimensional & 2 – dimensional
c. 1 – dimensional & 3 dimensional
d. None of the other options
3. Which of the principal is the right 3D representation techniques?
a. Wireframe model
b. Surface model
c. Solid model
d. All of the other options
4. The surface model is constructed essentially from
a. Hollow surfaces
b. Rotated curved surfaces
c. Solid plane surfaces
d. Cubical surfaces
5. Which of the surface is under non analytical surfaces?
a. Plane surface
b. Cubical surface
c. Curved surface
d. Sculptured surface
6. Automatic view generation is possible in
a. Line model
b. Surface model
c. Volume model
d. None of the other options
7. NURBS is an acronym of Non uniform rational B-splines.
a. True
b. False
c. Don’t know
d. None of the other options
8. Which of the common representation is under modeling?
a. Spatial enumeration
b. Cell decomposition
c. Sweep representation
d. All of the other options
9. An interpolated curve is drawn by interpolating the given data points and has a fixed
form, dictated by the given data points is called
a. Analytical curves
b. None of the other options
c. Synthetic curves
Page 24 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
d. Planer curves
10. The curve passes through all the data points, it is called
a. Interpolated curve
b. Planer curve
c. Cubic curve
d. None of the other options
11. Hermite cubic curve is also known as a
a. Parametric cubic curve
b. Analytical curves
c. None of the other options
d. Synthetic curves
12. Bezier curve is defined by approximating a set of
a. Data points
b. Control points
c. Control curves
d. None of the other options
13. Convex hull property means that the Bezier curve defined by the given
a. n + 2 control points lies completely in the convex hull of the given control points
b. n + 1 control points lies completely in the convex hull of the given control
points
c. n + 4 control points lies completely in the convex hull of the given control points
d. n + 3 control points lies completely in the convex hull of the given control points
14. Variation diminishing property means
a. No Curved line intersects a Bézier curve more times than it intersects the
characteristics polygon
b. No straight line intersects a Cubic curve more times than it intersects the
characteristics polygon
c. No straight line intersects a Bezier curve more times than it intersects the
characteristics polygon
d. No tangent circles intersects a Bézier curve more times than it intersects the
characteristics polygon
https://youtu.be/Gsa7jnI5D50
https://youtu.be/hCiu-NERMy4
SUMMARY
Geometric modelling plays a crucial part in the overall application of CAD/CAM systems in
manufacturing industries. However, it is important to consider a number
of factors before finalising the selection of a CAD/CAM system that suits a given
purpose.
Page 25 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
ASSIGNMENT QUESTIONS
1. Explain the following with an example,
a. Bezier curve
b. B-Spline curve
2. Explain Constructive solid geometry with neat sketch.
3. Explain the parametric representation of synthetic curves.
4. Explain the following
a. Wireframe modeling
b. Surface modeling
c. Solid modeling
Page 26 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
CAD STANDARDS
Aim:
A large number of applications are used in CAD/CAM, which are manufactured by different
vendors. Therefore, there is a need to establish standards in CAD that help in linking different
hardware and software systems from different vendors to be integrated to serve the requirements
of the industry.
Objective:
To understand, the
Need for CAD data standardization
The graphic kernel system and its extensions for developing the graphic software systems
Requirements of graphic data exchange formats and their details such as IGES, DXF and
STEP.
Dimensional measurement interface specification for communication between coordinate
measuring machine and the CAD data.
Pre-requisites
To have basic knowledge of CAD modelling.
Page 27 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
occurs onto the display device or workstation. This is obtained through the coordinates
transformations, also referred to as viewing transformations.
Cartesian coordinate system
Cartesian coordinate system is mostly followed by the graphics software design. If coordinates of
an image is defined in other coordinate system (eg., cylindrical or spherical coordinate system),
they must be converted into the cartesian coordinates before using in the graphics software. Fig.
2.27 shows the viewing transformation sequence from local coordinates to the device coordinates.
Broadly, three types of coordinate system are required to input display and store the geometry of
graphics model during the modeling process.
World coordinate system.
World coordinate system (WCS) is the working or user coordinate system, which describes the
image in cartesian coordinates. Firstly the shape of objects is created in the form of graphics of
image, using separate coordinate reference frames, known as local coordinate system. The units
are the user units, which can be anything like mm, m, km, foot, etc., Once all the objects in graphics
images are described by their individual local coordinate systems, they can be placed in the
graphics images with reference to one single reference frame, i.e, cartesian coordinates. The WCS
may
(i) have numerical values that depend on the type of problem.
(ii) have positive values or negative values.
(iii) have range from -α to +α in both x and y directions.
(iv) be represented by floating point numbers. (e.g. 0.125 x 103; mantissa = 0.125 and
exponent = 3)
Normalised coordinate system
For modeling, each graphics output device may follow different coordinates. In some images, we
might want to specify objects dimensions in fraction of a foot, while for some other applications
it may be ‘mm’ (or) ‘km’. It is, therefore, desirable to convert the world coordinates into the
normalized coordinates. i.e, Normalized coordinate system (NCS), to make the coordinate system
independent of several graphics output devices. Normalization may be done from (0,0) to (1,1)
with origin at (0,0) in the lower left corner and co-ordinate (1,1) on the right top corner of the
display devices. To accommodate the differences in scales and aspect ratios, the mapping of
normalized coordinates into square area of the displays is required to maintain the proper
proportions of various images.
Device coordinate system
The device coordinate system is one in which the image of normalized coordinate system will be
displaced in the output device like monitor (soft device), printer/plotter (hard device). A graphics
device understands the device coordinate system in terms of pixels, cm, inch, etc. Depending upon
the pixel density, the DCS would vary from one system to another. The features of device control
system are follows:
Page 28 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
(i) The pixel density (eg: 1024 X 1024) of the display device depends on the maximum
size.
(ii) Positive values have to be considered.
(iii) Always fixed in size (i.e. size of display surface) irrespective of the problem.
(iv) It should be always represented by an integer number.
Figure 2.27 Viewing transformation sequence from local coordinates to device coordinates
Page 29 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
where,
S - Scaling matrix
Sx - Scaling in x direction
Sy - Scaling in y direction
Sx and Sy need not be equal. A circle can be transformed into an ellipse by unequal scaling
factors Sx and Sy. If the scaling factors are less than 1, it will reduce the size of the object and
Page 30 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
the object is moved towards the origin. If it is greater than 1, then it will enlarge the size of the
object and object is moved away from the origin.
P′ = [𝑋 ′ , 𝑌′] = [𝑆𝑥 × 𝑥, 𝑆𝑦 × 𝑦]
The above equation can be represented in a matrix form as follows:
𝑆𝑥 0 𝑥
P′ = [ 0 𝑆𝑦 ] [𝑦]
P′ = [S].[P]
While zooming or magnifying the object, uniform scaling ((i.e) Sx = Sy) is applied. Zooming or
magnifying is only a display attribute and is used only to the display and not stored in actual
geometric database.
Rotation
Rotation is also an another important transformation. In this transformation, all the points of an
object are rotated about the origin (or) about any base point by an angle. For a positive angle, the
object is rotated in anticlockwise direction and vice versa.
Consider a point P in xy plane. P is rotated in the anticlockwise direction to get new position P′
through an angle of Ɵ as shown in Fig. 2.29
𝑐𝑜𝑠Ɵ 𝑠𝑖𝑛Ɵ
R=[ ] → Rotation matrix
−𝑠𝑖𝑛Ɵ 𝑐𝑜𝑠Ɵ
Scaling
The scaling transformation is given by,
𝑚 0 0
S = [0 𝑛 0]
0 0 𝑝
where,
m, n and p are the units needed, to be scaled. For equal values of m, n and p, the scaling is linear.
Rotation
For each axis, the rotation in three dimensions varies.
For Z axis
Rotation about the Z axis by angle Ɵ is given by the matrix
𝑐𝑜𝑠𝜃 −𝑠𝑖𝑛𝜃 0
Rz = [ 𝑠𝑖𝑛𝜃 𝑐𝑜𝑠𝜃 0]
0 0 1
For Y axis
Rotation about the Y axis by angle Ɵ is given by the matrix
𝑐𝑜𝑠𝜃 0 𝑠𝑖𝑛Ɵ
Ry = [ 0 1 0 ]
−𝑠𝑖𝑛Ɵ 0 𝑐𝑜𝑠Ɵ
Rotation about the x axis by angle Ɵ is given by the matrix
1 0 0
Rx = [0 𝑐𝑜𝑠Ɵ −𝑠𝑖𝑛Ɵ]
0 𝑠𝑖𝑛Ɵ 𝑐𝑜𝑠Ɵ
Page 32 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
Post – MCQ
https://youtu.be/iWxS2zpaRjk
https://youtu.be/I8o4kK9QRL4
SUMMARY
Page 33 of 34
Principle of computer graphics Dept. of Mech Engg, SCSVMV
ASSIGNMENT QUESTIONS
REFERENCES
1. P.N. Rao, CAD/CAM: Principles and Applications 3rd Edition, Tata McGraw Hill, India,
2010.
2. Ibrahim Zeid and R. Sivasubramaniam, Mastering CAD/CAM, 2nd Edition, Tata McGraw
Hill, India, 2009
Page 34 of 34