Download as pdf or txt
Download as pdf or txt
You are on page 1of 82

Chapter 3

“Transformation, Manipulation and


Data Storage”

19/02/2020 Miss.Neepa M. Patel 1


References

 CAD/CAM & Automation


By Farazdak Haideri.
 Computer Graphics
By A.P. Godse, D.A. Godse.

19/02/2020 Miss.Neepa M. Patel 2


Introduction of Computer Graphics

2D and 3D Transformations

Translation, Rotation, Scaling etc.

Concatenations, Matrix representation

Object Transformation, Mirror transformation

Bill of Materials

Engg. Data management system

SQL, Design Info System

19/02/2020 Miss.Neepa M. Patel 3


Introduction of Computer Graphics
 It deals with the generation of 2D & 3D models---
by using graphics software or an application
software or both.
User can generate a model either with the help
of a programming or by using the user friendly specialized
software.
 Application of Computer Graphics :

 Science, Advertising,
 Engineering, Education,
 Medicine, Art,
 Business, Entertainment,
 Industry etc.

19/02/2020 Miss.Neepa M. Patel 4


Introduction of Computer Graphics
CAD/CAM hardware would be useless without the software
to support it. Any software normally consists of two parts:
1) Graphics software : It is the collection of programs
which are written to operate the computer graphic
system. It includes programs to generate images on the
screen ,to manipulate the image...AutoCAD, PRO-
E,SOLID WORKS, SOLID EDGES, CATIA etc. are the
examples
2) Application software : It is the collection of programs
which are written for implementing certain specialized
function related to CAD/CAM. It includes programs for
FEA, Dynamic analysis of mechanical
system,ANSYS,CAMWORKS,HYPERMESH etc.

19/02/2020 Miss.Neepa M. Patel 5


2D Transformations
 What is transformations?
 The geometrical changes of an object from a
current state to modified state.
 The major adv. Of computer graphics is that
the alterations can be done easily in the
drawing.
 To generate graphic image, data base is
created.
 And this data base can be modified by
mathematical operations called
transformations.
19/02/2020 Miss.Neepa M. Patel 6
2D Transformations
 Why the transformation is needed?
 To manipulate the initially created object and
to display the modified object without having
to redraw it.
 The basic 2D Transformations are:
1. Translation.
2. Rotation.
3. Scaling.
4. Reflection.(Mirror)
5. Shear.

19/02/2020 Miss.Neepa M. Patel 7


19/02/2020 Miss.Neepa M. Patel 8
Reflection

19/02/2020 Miss.Neepa M. Patel 9


Translation
 Moving drawing or model across the
screen
y
P

P x
x  x  t x , y   y  t y

 x  x  t x 
P    , P    , T   
 y  y t y 
P  P  T
19/02/2020 Miss.Neepa M. Patel 10
Scaling
 Changing the dimensions of window and
viewport to alter the size of drawing

 Used to enlarge or reduce the size of an


element

 Not necessarily be done equally in x and y


directions.

19/02/2020 Miss.Neepa M. Patel 11


Scaling
x  x  s x , y   y  s y
Sx
 x   s x 0   x
 y   0 s y   y 
Sy   
P  S  P
y

x  x  sx  x f 1  sx 

y  y  s y  y f 1  s y 
x f , yf 
x
P  P  S  P f   1 - S 

19/02/2020 Miss.Neepa M. Patel 12


Rotation

19/02/2020 Miss.Neepa M. Patel 13


Rotation
 Rotation of a drawing about a pivot point.

 Point V can be rotated about the origin through an


angle θ in the anti clockwise direction to position V’

 The coordinates of V’ can be obtained by


multiplying the coordinates of V by matrix-

cos 𝜃 −𝑆𝑖𝑛𝜃
𝑆𝑖𝑛𝜃 𝐶𝑜𝑠 𝜃

19/02/2020 Miss.Neepa M. Patel 14


y
Rotation in angle  about a

pivot (rotation) point  xr , yr  .



yr
x
xr
x  xr   x  xr  cos    y  yr  sin 
 x, y
y
y  yr   x  xr  sin    y  yr  cos 

 x, y  P  Pr  R   P  Pr 

cos   sin  
 xr , yr  x R
 sin  cos  

19/02/2020 Miss.Neepa M. Patel 15


19/02/2020 Miss.Neepa M. Patel 16
Mirror Transformation
 In modeling operations, one frequently
used operation is mirroring an object.

 Mirroring is a convenient method used


for copying an object while preserving its
features.

 The mirror transformation is a special


case of a negative scaling.

19/02/2020 Miss.Neepa M. Patel 17


Mirror/Reflection
Y Y

(1,1)
(-1,1) (1,1)

X
X

(1,-1)

Reflection about X - axis Reflection about Y - axis


x  x y    y x   x y   y
1 0 0   1 0 0
M x  0  1 0 M y   0 1 0
0 0 1  0 0 1

19/02/2020 Miss.Neepa M. Patel 18


Other transformations
Reflection:
x-axis y-axis

1 0 0
0  1 0 
 
0 0 1

  1 0 0
 0 1 0
 
 0 0 1

19/02/2020 Miss.Neepa M. Patel 19


Reflection:

origin line x=y

  1 0 0 0 1 0 
 0  1 0 1 0 0
   
 0 0 1 0 0 1

19/02/2020 Miss.Neepa M. Patel 20


Shearing Transformation

1 a 0 1 0 0 1 a 0
SH x  0 1 0 SH y  b 1 0 SH xy  b 1 0
0 0 1 0 0 1 0 0 1

Sheared in X Sheared in Y Sheared in both X


unit cube
direction direction and Y direction

19/02/2020 Miss.Neepa M. Patel 21


Shear:

x-direction y-direction
1 shx 0  1 0 0
0 1 0   sh 1 0
   y
0 0 1  0 0 1

19/02/2020 Miss.Neepa M. Patel 22


19/02/2020 Miss.Neepa M. Patel 23
19/02/2020 Miss.Neepa M. Patel 24
19/02/2020 Miss.Neepa M. Patel 25
19/02/2020 Miss.Neepa M. Patel 26
19/02/2020 Miss.Neepa M. Patel 27
19/02/2020 Miss.Neepa M. Patel 28
19/02/2020 Miss.Neepa M. Patel 29
19/02/2020 Miss.Neepa M. Patel 30
19/02/2020 Miss.Neepa M. Patel 31
19/02/2020 Miss.Neepa M. Patel 32
19/02/2020 Miss.Neepa M. Patel 33
Miss.Neepa M. Patel
19/02/2020 34
19/02/2020 Miss.Neepa M. Patel 35
Concatenation/composite
 To combine the individual transformations in order
to achieve the required results.

 The combined transformation matrix can be


obtained by multiplying the respective
transformation matrices

 The order of the matrix multiplication be the same


as that of transformation

19/02/2020 Miss.Neepa M. Patel 36


Concatenation
 One advantage of using matrices is that you can
combine the effects of two or more matrices by
multiplying them.
 This means that, to rotate a model and then translate it
to some location, you do not need to apply two matrices.
Instead, you multiply the rotation and translation
matrices to produce a composite matrix that contains all
of their effects.
 This process, called matrix concatenation, can be written
with the formula.
 [CT] = [Th]-1 [R] [Th]

19/02/2020 Miss.Neepa M. Patel 37


19/02/2020 Miss.Neepa M. Patel 38
19/02/2020 Miss.Neepa M. Patel 39
19/02/2020 Miss.Neepa M. Patel 40
19/02/2020 Miss.Neepa M. Patel 41
19/02/2020 Miss.Neepa M. Patel 42
19/02/2020 Miss.Neepa M. Patel 43
3D Transformations
 Homogeneous coordinates: (x,y,z)=(wx,wy,wz)

 Transformations are now represented as 3x3


matrices

 Typical graphics packages allow for specification


of translation, rotation, scaling and arbitrary
matrices

 Translation, Rotation, Scaling, Reflection

19/02/2020 Miss.Neepa M. Patel 44


3D Transformations

 Very similar to 2D.

 Same general procedure are applied.

 Using 3x3 matrices rather than 2x2.

19/02/2020 Miss.Neepa M. Patel 45


3D Translation

 The translational matrix for a point defined


in three dimensions would be –
T = (m n p)

 It would be applied by adding the


increments m, n, p to the respective
coordinates of each of points defining the
3D geometry element.

19/02/2020 Miss.Neepa M. Patel 46


3D Translation

x  x  t x
y
y  y  t y

z  z  tz

 x, y, z  x   1 0 0 tx   x 


 x, y, z   y 0
  1 0 t y   y 

 z  0 0 1 tz   z 
z x      
 1  0 0 0 1  1 

19/02/2020 Miss.Neepa M. Patel 47


3D Scaling
y y
x  x  S x

y  y  S y

z  x  S z

z x z x
Enlarging object also moves it from origin

 x   S x 0 0 0  x 
 y  0 Sy 0 0  y 
P        SP
 z   0 0 Sz 0  z 
     
1  0 0 0 1  1 

19/02/2020 Miss.Neepa M. Patel 48


3D Rotation

19/02/2020 Miss.Neepa M. Patel 49


3D Reflection
 Transformation matrix for a reflection through X-Y plane
is

 Transformation matrix for a reflection through Y-Z plane


is:

 Transformation matrix for a reflection through Z-X plane


is:

19/02/2020 Miss.Neepa M. Patel 50


Shear in 3D

19/02/2020 Miss.Neepa M. Patel 51


General 3D Rotations (extra)
1. Translate the object such that rotation axis passes
through the origin.

2. Rotate the object such that rotation axis coincides with


one of Cartesian axes.

3. Perform specified rotation about the Cartesian axis.

4. Apply inverse rotation to return rotation axis to


original direction.

5. Apply inverse translation to return rotation axis to


original position.

19/02/2020 Miss.Neepa M. Patel 52


(extra)

y y y
P2
P2
P1
P1 P1
x x x
P2
z z z

y y y
P2 P2

P1 P1 P1

P2 x x x

z z z

19/02/2020 Miss.Neepa M. Patel 53


Bill Of Materials
 Bill of materials (BOM): a listing of all of the raw
materials, parts, subassemblies, and assemblies needed
to produce one unit of a product.
 Each finished product has its own bill of materials.

 Product structure tree: Visual description of the


requirements in a bill of materials, where all
components are listed by levels.

 Basically, a bill of material (BOM) is a complete list of


the components making up an object or assembly.

19/02/2020 Miss.Neepa M. Patel 54


Definition of Bill of material :

 A comprehensive list of raw materials,


components and assemblies required to build
or manufacture a product.
 A bill of materials (BOM) is usually in a
hierarchical format, with the topmost level
showing the end product, and the bottom
level displaying individual components and
materials.

19/02/2020 Miss.Neepa M. Patel 55


Structure of a BOM

19/02/2020 Miss.Neepa M. Patel 56


Difference between BOM and
Product structure tree

19/02/2020 Miss.Neepa M. Patel 57


Product Structure tree

19/02/2020 Miss.Neepa M. Patel 58


Structure of a BOM

19/02/2020 Miss.Neepa M. Patel 59


Types of BOMs
1.)Static (fixed) bill
 A bill of material for a part that is normally
made from the same components, labor and raw
materials.

 Example:
 A bill of materials for a standard chair

19/02/2020 Miss.Neepa M. Patel 60


Types of BOMs
2.)Dynamic (parametric) bill
 A bill of material for a product or part for
which size, color, laminate, and other
options can be selected.

 Example:
 A bill of materials for a Dell computer

19/02/2020 Miss.Neepa M. Patel 61


What information is on a BOM?

1. Quantity

2. Item ID

3. Description of Item

4. Cost of Item

5. Total Project Cost

19/02/2020 Miss.Neepa M. Patel 62


Engineering Data Management
(EDM)
 Engineering Data Management (EDM) is the
administration of documents or data related to
engineering applications using computers and
electronic storage media.

Engineering Data Management comprises subjects like,


 documentation
 communication
 collaborative work
These subjects are not at all limited to engineering issues, they
are useful in many other fields too.

19/02/2020 Miss.Neepa M. Patel 63


Engineering Data management system

 Objective of EDMs :
1. Reduce redundant data.(Data redundancy is
defined as the storing of the same data in multiple
locations.)
2. Integrate existing Data
3. Provide Security
4. Share data among users
5. Simplify the method of using data

19/02/2020 Miss.Neepa M. Patel 64


Engineering Data management system
 Data Base Models
 Hierarchical Database
 Network Database
 Relational Database

19/02/2020 Miss.Neepa M. Patel 65


19/02/2020 Miss.Neepa M. Patel 66
What you mean by SQL ?

 It Stands for "Structured Query Language," and


can be pronounced as either "sequel" or "S-Q-
L.“
 It is a query language used for accessing and
modifying information in a database. Some
common SQL commands include "insert,"
"update," and "delete."
 SQL is a standard computer language for
relational database management and data
manipulation.
19/02/2020 Miss.Neepa M. Patel 67
19/02/2020 Miss.Neepa M. Patel 68
SQL Environment
 Data Manipulation Language (DML) is used to
add, update or delete data
 Data Definition Language (DDL) is used for
managing tables and index structures. Examples
of DDL statements include CREATE, ALTER, and
DROP.
 Data Control Language (DCL) is used to assign
and revoke database rights and permissions. Its
main statements are GRANT and REVOKE.

69
19/02/2020 Miss.Neepa M. Patel
19/02/2020
70 Miss.Neepa M. Patel
Design Information Systems
 A logical series of development phases
followed in an organisation to conduct all
the steps necessary to analyse, design,
implement & maintain information systems.

 These logical series of development phases


- known as System Development Life Cycle
(SDLC).

19/02/2020 Miss.Neepa M. Patel 71


Systems Development Life Cycle (SDLC)

Scope & objectives

Feasibility

Analysis
Time
Design

Implement

Maintain

Review

19/02/2020 Miss.Neepa M. Patel 72


University Questions
1) Explain in details any four 3D transformations.

2) Explain with diagram Engineering Data Management System.

3) Write a short note on Bill of Materials.

4) What is Structured Query Language ?

5) Why are Concatenated transformation matrices used in CAD ?

6) Explain in details 2D transformations. Enlist its benefits.

19/02/2020 Miss.Neepa M. Patel 73


University Questions
 Find the transformed homogenous coordinates when a
square [(1,1), (2,1), (1,2),(2,2)] is rotated through one of its
vertex (1,1) and 30 degree clockwise direction. Also give its
concatenated matrix .
 A point (4,3) is to be scaled by factor of 4 and rotated by 30
degree .find the new coordinates of the point. Also find the
concatenated transformation matrix to the original point.
 A triangle is defined by its three vertices (0,2),(1,2) and (0,3).
Express this in matrix notation and perform the following
transformation succession. i) Rotate the triangle about its
vertex (0,2) by 45 degree clockwise. ii) give the concatenated
matrix for this overall transformation.
 A point P (2, 4, 8) is translated by d= 4i-5j-7k and then scaled
uniformly by S= 2. Determine the transformed point P’.

19/02/2020 Miss.Neepa M. Patel 74


University Questions
 A point (7, 9) is to be scaled by factor of 4, find the new coordinates of the
point, by homogenous transformation matrix.
 Write down any four operations of 3D/2D transformation matrix.
 A rectangle is formed by four points whose coordinates are:
A(50,50),B(100,50),C(100,80) and D(50,80). Determine its new coordinates
when shear factor is 0.5 and 0.6 along X and Y directions respectively.
 A triangle PQR with vertices P (2,1), Q(4,4) and R(1,3) is to be translated by
2 units and 4 units in X and Y directions respectively. Find the new
coordinates.
 A triangle A(2,2) ,B(4,4) and C( 3,5) has undergone the following
operations:
1) Mirrored about line y=x;
2)Rotated by 45o in clockwise direction about (2, 2).
3)Derive composite matrix and its new coordinates.
 A rectangle ABCD having diagonal corner A (2,2) and C(10,8) is to be
reflected about line y= 1.7321 x -3.Determine composite transformation
matrix and the new coordinates of A and C.

19/02/2020 Miss.Neepa M. Patel 75


University Questions

19/02/2020 Miss.Neepa M. Patel 76


University Questions

19/02/2020 Miss.Neepa M. Patel 77


University Questions

19/02/2020 Miss.Neepa M. Patel 78


University Questions

19/02/2020 Miss.Neepa M. Patel 79


University Questions
 Magnify the triangle with vertices A(0,0),B(1,1) and C(8,2) to
double its size keeping vertex C as fixed.
 A line is defined by its two end points (1,2) and (6,4).Express
this in matrix notation and perform the following
transformation in succession. i) Rotate the line by 90 degree
clockwise about origin. ii)Translate the line by 2 units in x
direction and 3 units in y direction. iii) Also give the
concatenated matrix for this overall transformation.
 A triangle PQR with vertices P (2, 5), Q (6, 7), and R (2, 7) is
to be reflected about the Line y=0.5x+3. Determine the
composite transformation matrix.

 Note :-Refer Lecture note for 2D/ 3D transformation


problems.

19/02/2020 Miss.Neepa M. Patel 80


19/02/2020 Miss.Neepa M. Patel 81
Thank You…

19/02/2020 Miss.Neepa M. Patel 82

You might also like