SlideShare a Scribd company logo
1 of 23
Computer Graphics
Assessment
Presented By
Vishal Loungani
Bachelors of Computer Application – Second Year
Dezyne E’cole College, Ajmer
Project report on
Computer Graphics Assessment
Submitted To
Dezyne E’cole College
Towards
The Partial Fulfilment
Of 2019 Year, Bachelor of Computer Application
By
Vishal Loungani
Dezyne E’cole College
106/10, Civil Line, Ajmer
www.dezyneecole.com
Acknowledgment
I Am Vishal Loungani Student of Bachelor Of Computer Application,
Dezyne E’cole College. I Would Like To Express My Gratitude to Each
And Every Person Who Has Contributed in Encouraging Me And
Helping Me to Coordinate My Project.
I Also Thank Dezyne E’cole College Who Provided Insight And Expertise
That Greatly Assisted the Project. A Special Thanks To My Teachers,
Parents and Colleagues Who Have Supported Me at Every Step. Not
To Forget, the Almighty Who Blessed Me With Good Health Because
of Which I Worked More Efficiently And Better.
2-D Viewing
2-D Transformation ?
Changes in the Orientation ,size , shape or position
of an object, such that the coordinates values of
the object changes, is known as transformation.
The three Basic transformations are :
1. Translation.
2. Rotation.
3. Scaling.
From this basic transformation .
The two more transformation derived it is known
as Derived transformation.
1. Shearing.
2. Reflection.
1) Classic Method: In Computer Graphics we use classic
translation method in Graphs .
For classic translation First we have tx and ty given in
Question . After this we have calculate Q by using classic
Method .
1. Translation: Whenever we change the position
of an object such that the coordinates values change
then it is called translation .
Under it we follow two types of methods shown below.
1) Classic Method .
2) Homogeneous Matrix Method .
I. Q’=Q + T
Where
Q’= New Coordinates.
T=Translation Distance.
Q= Original Coordinates.
II. x’=x + tx
y’=y+ ty
2) Homogeneous Matrix Method are shown in Example .
Now we take Example….
Question . Prove that triangle Translation by using of Classic
Method and Homogeneous Matrix Method. When tx and ty is
( 2 , 3 ) .
Solution :
By use classic Method :
tx =2
ty =3
Q is = A(1,1) B(3,1) C(2,3)
Q’ = New Coordinates
A x’ = x + tx
1 + 2 = 3
y’ = y + ty
1 + 3 = 4
B x’ = x + tx
3 + 2 = 5
y’ = y + ty
1 + 3 = 4
C x’ = x + tx
2 + 2 = 4
y’ = y + ty
3 + 3 = 6
Q’ is = A(3,4) B(5,4) C(4,6)
By use of Homogeneous Matrix Method :
1 0 tx
0 1 ty
0 0 1
1 3 2
1 1 3
1 1 1
A B C
x
y
*
1 0 2
0 1 3
0 0 1
1 3 2
1 1 3
1 1 1
A B C
x
y
*
1+0+2 3+0+2 2+0+2
0+1+3 0+1+3 0+3+3
0+0+1 0+0+1 0+0+1
3 5 4
4 4 6
1 1 1
A B C
x
y Ans. Q’ is = A(3,4) B(5,4) C(4,6)
A B C
x
y
Ans.
2. Rotation: In order to rotate an object we need to rotate
each vertex of the figure individually. On rotating a point
P(x, y) by an angle A about the origin we get a point P'(x’, y’).
The values of x’ and y’ can be calculated as follows:-
We know that,
x = rcosB, y = rsinB
x’ = rcos(A+B) = r( cosAcosB – sinAsinB) =
rcosBcosA – rsinBsinA = xcosA – ysinA
y’ = rsin(A+B) = r( sinAcosB + cosAsinB) =
rcosBsinA + rsinBcosA = xsinA + ycosA
Types of Rotation:
1. Anticlockwise: The positive value of the pivot point
(rotation angle) rotates an object in a counter-clockwise
(anti-clockwise) direction.
2. Counterclockwise: The negative value of the pivot point
(rotation angle) rotates an object in a clockwise direction.
1. Matrix for rotation is a clockwise direction.
Matrix for homogeneous co-ordinate rotation (anticlockwise)
Matrix for homogeneous co-ordinate rotation (clockwise)
2. Matrix for rotation is an anticlockwise direction.
Rotation by Matrix in two Types :
Now we need a Trigonometry Table for find a value of
cos Θ and sin Θ in different degrees of angels :
Trigonometry Table
Θ 0° 30° 45° 60° 90°
sinΘ 0 0.5 0.7 0.87 1
cosΘ 1 0.87 0.7 0.5 0
Question . Prove that triangle is Rotate 60dig using
Homogeneous Matrix Method .
Now we understand it by taking a example.....
Solution:
Using by Homogeneous Matrix: Rotate 60° :
Cos Θ -Sin Θ 0
Sin Θ Cos Θ 0
0 0 1
1 3 2
1 1 3
1 1 1
A B C
x
y
*
0.50 -0.87 0
0.87 0.50 0
0 0 1
1 3 2
1 1 3
1 1 1
A B C
x
y
*
0.50+(-0.87)+0 1.50+(-0.87)+0 1+(-2.61)+0
0.87+0.50+0 2.61+0.50+0 1.74+1.50+0
0+0+1 0+0+1 0+0+1
-0.37 0.63 -1.61
1.37 3.11 3.2
1 1 1
A’ B’ C’
x
y
A’ B’ C’
x
y
Now we Round figure
it for make accuracy in
new coordinates .
0 1 -2
1 3 3
1 1 1
A’ B’ C’
x
y
Our new round figure coordinates is.
Ans. New Coordinates of object on 60dig rotation is .
X , Y
A=(0,1)
B=(1,3)
C=(-2,3)
Ans.
3. Scaling: To change the size of an object, scaling
transformation is used. In the scaling process ,
you either expand or compress the dimensions
of the object. Scaling can be achieved by multipl-
-ying the original coordinates of the object with
the scaling factor to get the desired result.
Let us assume that the original coordinates are (X,Y)
, the scaling factors are (SX, SY), and the produced
coordinates are (X’, Y’). This can be mathematically
represented as shown below −
X' = X . SX and Y' = Y . SY
The scaling factor sx, sy scales the object in X and Y
direction respectively. So, the below equation can be
represented in matrix form:
For homogeneous coordinates, the below scaling matrix may
be represented like a 3 x 3 matrix as-
Now we understand it by taking a example…..
Question . Prove that triangle is Scaling by using of General
Equation Method and Homogeneous Matrix Method. When
Sx and Sy is ( 2 , 3 ) .
Solution :
By use General Equation Method :
Sx =2
Sy =3
Q is = A(1,1) B(3,1) C(2,3)
Q’ is for = New Coordinates
A x’ = x . sx
1 * 2 = 2
y’ = y . sy
1 * 3 = 3
B x’ = x . sx
3 * 2 = 6
y’ = y . sy
1 * 3 = 3
C x’ = x . sx
2 * 2 = 4
y’ = y . sy
3 * 3 = 9
Q’ is = A(2,3) B(6,3) C(4,9)
By use of Homogeneous Matrix Method :
sx 0 0
0 sy 0
0 0 1
1 3 2
1 1 3
1 1 1
A B C
x
y
*
2 0 0
0 3 0
0 0 1
1 3 2
1 1 3
1 1 1
A B C
x
y
*
2+0+0 6+0+0 4+0+0
0+3+0 0+3+0 0+9+0
0+0+1 0+0+1 0+0+1
2 6 4
3 3 9
1 1 1
A B C
x
y Ans. Q’ is = A(2,3) B(6,3) C(4,9)
A B C
x
y
Ans.
Thank You
Presented By
Vishal Loungani
Bachelors of Computer Application
Dezyne E’cole College
www.dezyneecole.com

More Related Content

Similar to Computer Graphics Assessment 2D Transformations

29 Solution Tutorial 6 Group no.11-20.pptx
29 Solution Tutorial 6 Group no.11-20.pptx29 Solution Tutorial 6 Group no.11-20.pptx
29 Solution Tutorial 6 Group no.11-20.pptxBittuKumarSingh6
 
Curve_Fitting.pdf
Curve_Fitting.pdfCurve_Fitting.pdf
Curve_Fitting.pdfIrfan Khan
 
Paso 3: Álgebra, Trigonometría y Geometría Analítica
Paso 3: Álgebra, Trigonometría y Geometría AnalíticaPaso 3: Álgebra, Trigonometría y Geometría Analítica
Paso 3: Álgebra, Trigonometría y Geometría AnalíticaTrigogeogebraunad
 
2.1 Rectangular Coordinate Systems
2.1 Rectangular Coordinate Systems2.1 Rectangular Coordinate Systems
2.1 Rectangular Coordinate Systemssmiller5
 
Graph of a linear equation horizontal lines
Graph of a linear equation   horizontal linesGraph of a linear equation   horizontal lines
Graph of a linear equation horizontal linesjulienorman80065
 
3D computer Graphic PPT.pptx in computer graphics
3D computer Graphic PPT.pptx in computer graphics3D computer Graphic PPT.pptx in computer graphics
3D computer Graphic PPT.pptx in computer graphicsgunnugunnu162
 
Pre-Assessment-Activity.pdf
Pre-Assessment-Activity.pdfPre-Assessment-Activity.pdf
Pre-Assessment-Activity.pdfByronSmith46
 
Formato guía11
Formato guía11Formato guía11
Formato guía11litecom
 
Transformación de coordenadas
Transformación de coordenadasTransformación de coordenadas
Transformación de coordenadasJose Bello
 
icse-10-march13-maths-question-paper-with-solution-2023.pdf
icse-10-march13-maths-question-paper-with-solution-2023.pdficse-10-march13-maths-question-paper-with-solution-2023.pdf
icse-10-march13-maths-question-paper-with-solution-2023.pdfvani311954
 
Engg Mechanic Lecture 1.pptx
Engg Mechanic Lecture 1.pptxEngg Mechanic Lecture 1.pptx
Engg Mechanic Lecture 1.pptxameer408074
 
Section 0.7 Quadratic Equations from Precalculus Prerequisite.docx
Section 0.7 Quadratic Equations from Precalculus Prerequisite.docxSection 0.7 Quadratic Equations from Precalculus Prerequisite.docx
Section 0.7 Quadratic Equations from Precalculus Prerequisite.docxbagotjesusa
 
Mod9 les2 rot dil
Mod9 les2 rot dilMod9 les2 rot dil
Mod9 les2 rot dilcandicef
 
GCSE-TrigonometryOfRightAngledTriangles.pptx
GCSE-TrigonometryOfRightAngledTriangles.pptxGCSE-TrigonometryOfRightAngledTriangles.pptx
GCSE-TrigonometryOfRightAngledTriangles.pptxHasifa5
 
Q1Perform the two basic operations of multiplication and divisio.docx
Q1Perform the two basic operations of multiplication and divisio.docxQ1Perform the two basic operations of multiplication and divisio.docx
Q1Perform the two basic operations of multiplication and divisio.docxamrit47
 

Similar to Computer Graphics Assessment 2D Transformations (20)

29 Solution Tutorial 6 Group no.11-20.pptx
29 Solution Tutorial 6 Group no.11-20.pptx29 Solution Tutorial 6 Group no.11-20.pptx
29 Solution Tutorial 6 Group no.11-20.pptx
 
Curve_Fitting.pdf
Curve_Fitting.pdfCurve_Fitting.pdf
Curve_Fitting.pdf
 
Paso 3: Álgebra, Trigonometría y Geometría Analítica
Paso 3: Álgebra, Trigonometría y Geometría AnalíticaPaso 3: Álgebra, Trigonometría y Geometría Analítica
Paso 3: Álgebra, Trigonometría y Geometría Analítica
 
2D Transformation
2D Transformation2D Transformation
2D Transformation
 
Linear regression
Linear regressionLinear regression
Linear regression
 
Second Period Math Applications
Second Period Math ApplicationsSecond Period Math Applications
Second Period Math Applications
 
2.1 Rectangular Coordinate Systems
2.1 Rectangular Coordinate Systems2.1 Rectangular Coordinate Systems
2.1 Rectangular Coordinate Systems
 
Graph of a linear equation horizontal lines
Graph of a linear equation   horizontal linesGraph of a linear equation   horizontal lines
Graph of a linear equation horizontal lines
 
3D computer Graphic PPT.pptx in computer graphics
3D computer Graphic PPT.pptx in computer graphics3D computer Graphic PPT.pptx in computer graphics
3D computer Graphic PPT.pptx in computer graphics
 
Pre-Assessment-Activity.pdf
Pre-Assessment-Activity.pdfPre-Assessment-Activity.pdf
Pre-Assessment-Activity.pdf
 
Unidad 2 paso 3
Unidad 2   paso 3Unidad 2   paso 3
Unidad 2 paso 3
 
Formato guía11
Formato guía11Formato guía11
Formato guía11
 
Transformación de coordenadas
Transformación de coordenadasTransformación de coordenadas
Transformación de coordenadas
 
icse-10-march13-maths-question-paper-with-solution-2023.pdf
icse-10-march13-maths-question-paper-with-solution-2023.pdficse-10-march13-maths-question-paper-with-solution-2023.pdf
icse-10-march13-maths-question-paper-with-solution-2023.pdf
 
Engg Mechanic Lecture 1.pptx
Engg Mechanic Lecture 1.pptxEngg Mechanic Lecture 1.pptx
Engg Mechanic Lecture 1.pptx
 
Section 0.7 Quadratic Equations from Precalculus Prerequisite.docx
Section 0.7 Quadratic Equations from Precalculus Prerequisite.docxSection 0.7 Quadratic Equations from Precalculus Prerequisite.docx
Section 0.7 Quadratic Equations from Precalculus Prerequisite.docx
 
Mod9 les2 rot dil
Mod9 les2 rot dilMod9 les2 rot dil
Mod9 les2 rot dil
 
GCSE-TrigonometryOfRightAngledTriangles.pptx
GCSE-TrigonometryOfRightAngledTriangles.pptxGCSE-TrigonometryOfRightAngledTriangles.pptx
GCSE-TrigonometryOfRightAngledTriangles.pptx
 
Q1Perform the two basic operations of multiplication and divisio.docx
Q1Perform the two basic operations of multiplication and divisio.docxQ1Perform the two basic operations of multiplication and divisio.docx
Q1Perform the two basic operations of multiplication and divisio.docx
 
M112rev
M112revM112rev
M112rev
 

Recently uploaded

Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 

Recently uploaded (20)

Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 

Computer Graphics Assessment 2D Transformations

  • 1. Computer Graphics Assessment Presented By Vishal Loungani Bachelors of Computer Application – Second Year Dezyne E’cole College, Ajmer
  • 2. Project report on Computer Graphics Assessment Submitted To Dezyne E’cole College Towards The Partial Fulfilment Of 2019 Year, Bachelor of Computer Application By Vishal Loungani Dezyne E’cole College 106/10, Civil Line, Ajmer www.dezyneecole.com
  • 3. Acknowledgment I Am Vishal Loungani Student of Bachelor Of Computer Application, Dezyne E’cole College. I Would Like To Express My Gratitude to Each And Every Person Who Has Contributed in Encouraging Me And Helping Me to Coordinate My Project. I Also Thank Dezyne E’cole College Who Provided Insight And Expertise That Greatly Assisted the Project. A Special Thanks To My Teachers, Parents and Colleagues Who Have Supported Me at Every Step. Not To Forget, the Almighty Who Blessed Me With Good Health Because of Which I Worked More Efficiently And Better.
  • 4. 2-D Viewing 2-D Transformation ? Changes in the Orientation ,size , shape or position of an object, such that the coordinates values of the object changes, is known as transformation. The three Basic transformations are : 1. Translation. 2. Rotation. 3. Scaling. From this basic transformation . The two more transformation derived it is known as Derived transformation. 1. Shearing. 2. Reflection.
  • 5. 1) Classic Method: In Computer Graphics we use classic translation method in Graphs . For classic translation First we have tx and ty given in Question . After this we have calculate Q by using classic Method . 1. Translation: Whenever we change the position of an object such that the coordinates values change then it is called translation . Under it we follow two types of methods shown below. 1) Classic Method . 2) Homogeneous Matrix Method . I. Q’=Q + T Where Q’= New Coordinates. T=Translation Distance. Q= Original Coordinates. II. x’=x + tx y’=y+ ty 2) Homogeneous Matrix Method are shown in Example .
  • 6. Now we take Example…. Question . Prove that triangle Translation by using of Classic Method and Homogeneous Matrix Method. When tx and ty is ( 2 , 3 ) .
  • 7. Solution : By use classic Method : tx =2 ty =3 Q is = A(1,1) B(3,1) C(2,3) Q’ = New Coordinates A x’ = x + tx 1 + 2 = 3 y’ = y + ty 1 + 3 = 4 B x’ = x + tx 3 + 2 = 5 y’ = y + ty 1 + 3 = 4 C x’ = x + tx 2 + 2 = 4 y’ = y + ty 3 + 3 = 6 Q’ is = A(3,4) B(5,4) C(4,6)
  • 8. By use of Homogeneous Matrix Method : 1 0 tx 0 1 ty 0 0 1 1 3 2 1 1 3 1 1 1 A B C x y * 1 0 2 0 1 3 0 0 1 1 3 2 1 1 3 1 1 1 A B C x y * 1+0+2 3+0+2 2+0+2 0+1+3 0+1+3 0+3+3 0+0+1 0+0+1 0+0+1 3 5 4 4 4 6 1 1 1 A B C x y Ans. Q’ is = A(3,4) B(5,4) C(4,6) A B C x y
  • 10. 2. Rotation: In order to rotate an object we need to rotate each vertex of the figure individually. On rotating a point P(x, y) by an angle A about the origin we get a point P'(x’, y’). The values of x’ and y’ can be calculated as follows:- We know that, x = rcosB, y = rsinB x’ = rcos(A+B) = r( cosAcosB – sinAsinB) = rcosBcosA – rsinBsinA = xcosA – ysinA y’ = rsin(A+B) = r( sinAcosB + cosAsinB) = rcosBsinA + rsinBcosA = xsinA + ycosA Types of Rotation: 1. Anticlockwise: The positive value of the pivot point (rotation angle) rotates an object in a counter-clockwise (anti-clockwise) direction. 2. Counterclockwise: The negative value of the pivot point (rotation angle) rotates an object in a clockwise direction.
  • 11. 1. Matrix for rotation is a clockwise direction. Matrix for homogeneous co-ordinate rotation (anticlockwise) Matrix for homogeneous co-ordinate rotation (clockwise) 2. Matrix for rotation is an anticlockwise direction. Rotation by Matrix in two Types :
  • 12. Now we need a Trigonometry Table for find a value of cos Θ and sin Θ in different degrees of angels : Trigonometry Table Θ 0° 30° 45° 60° 90° sinΘ 0 0.5 0.7 0.87 1 cosΘ 1 0.87 0.7 0.5 0
  • 13. Question . Prove that triangle is Rotate 60dig using Homogeneous Matrix Method . Now we understand it by taking a example.....
  • 14. Solution: Using by Homogeneous Matrix: Rotate 60° : Cos Θ -Sin Θ 0 Sin Θ Cos Θ 0 0 0 1 1 3 2 1 1 3 1 1 1 A B C x y * 0.50 -0.87 0 0.87 0.50 0 0 0 1 1 3 2 1 1 3 1 1 1 A B C x y * 0.50+(-0.87)+0 1.50+(-0.87)+0 1+(-2.61)+0 0.87+0.50+0 2.61+0.50+0 1.74+1.50+0 0+0+1 0+0+1 0+0+1 -0.37 0.63 -1.61 1.37 3.11 3.2 1 1 1 A’ B’ C’ x y A’ B’ C’ x y Now we Round figure it for make accuracy in new coordinates .
  • 15. 0 1 -2 1 3 3 1 1 1 A’ B’ C’ x y Our new round figure coordinates is. Ans. New Coordinates of object on 60dig rotation is . X , Y A=(0,1) B=(1,3) C=(-2,3)
  • 16. Ans.
  • 17. 3. Scaling: To change the size of an object, scaling transformation is used. In the scaling process , you either expand or compress the dimensions of the object. Scaling can be achieved by multipl- -ying the original coordinates of the object with the scaling factor to get the desired result. Let us assume that the original coordinates are (X,Y) , the scaling factors are (SX, SY), and the produced coordinates are (X’, Y’). This can be mathematically represented as shown below − X' = X . SX and Y' = Y . SY The scaling factor sx, sy scales the object in X and Y direction respectively. So, the below equation can be represented in matrix form:
  • 18. For homogeneous coordinates, the below scaling matrix may be represented like a 3 x 3 matrix as-
  • 19. Now we understand it by taking a example….. Question . Prove that triangle is Scaling by using of General Equation Method and Homogeneous Matrix Method. When Sx and Sy is ( 2 , 3 ) .
  • 20. Solution : By use General Equation Method : Sx =2 Sy =3 Q is = A(1,1) B(3,1) C(2,3) Q’ is for = New Coordinates A x’ = x . sx 1 * 2 = 2 y’ = y . sy 1 * 3 = 3 B x’ = x . sx 3 * 2 = 6 y’ = y . sy 1 * 3 = 3 C x’ = x . sx 2 * 2 = 4 y’ = y . sy 3 * 3 = 9 Q’ is = A(2,3) B(6,3) C(4,9)
  • 21. By use of Homogeneous Matrix Method : sx 0 0 0 sy 0 0 0 1 1 3 2 1 1 3 1 1 1 A B C x y * 2 0 0 0 3 0 0 0 1 1 3 2 1 1 3 1 1 1 A B C x y * 2+0+0 6+0+0 4+0+0 0+3+0 0+3+0 0+9+0 0+0+1 0+0+1 0+0+1 2 6 4 3 3 9 1 1 1 A B C x y Ans. Q’ is = A(2,3) B(6,3) C(4,9) A B C x y
  • 22. Ans.
  • 23. Thank You Presented By Vishal Loungani Bachelors of Computer Application Dezyne E’cole College www.dezyneecole.com