Scaling Transformations: A 2D point can be scaled by multiplication of the coordinate values (x,y) by scaling factors Sx and Sy to produce the transformed coordinates (x,y'). Translation Transformations: A 2D point can be translated by adding the coordinate values (x,y) by Translation distances Tx and Ty to produce the transformed coordinates (x,y'). Rotation Transformations: A 2D point can be rotated by repositioning it along a circular path in the xy plane. We specify the rotation angle and the position of the rotation point about which the object is to be rotated. Multiplication of the coordinate values (x,y) by rotation matrix produce the transformed coordinates (x,y'). Now you have to design a program which will provide you with the option that which type of transformation you want to do.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Scaling Transformations:
A 2D point can be scaled by multiplication of the coordinate values (x,y) by scaling factors Sx and Sy to produce the
transformed
coordinates (x,y').
Translation Transformations:
A 2D point can be translated by adding the coordinate values (x,y) by Translation distances Tx and Ty to produce the
transformed coordinates (x,y').
Rotation Transformations:
A 2D point can be rotated by repositioning it along a circular path in the xy plane. We specify the rotation angle and the
position of the rotation point about which the object is to be rotated. Multiplication of the coordinate values (x,y) by
rotation
matrix produce the transformed coordinates (x,y').
Now you have to design a program which will provide you with the option that which type of transformation you want to
do.
Like the following,
Enter your choice:
1. Translation
2. Scaling
3. Rotation
4. Exit
After providing the choice you have to enter the number of edges of a polygon and then you have to input the
coordinates of
each vertex. Like the following,
Enter your choice: 3
Enter the no. of edges:-4
Enter the co-ordinates of vertex 1:- 30 30
Enter the co-ordinates of vertex 2:- 30 90
Enter the co-ordinates of vertex 3:- 90 90
Enter the co-ordinates of vertex 4:- 90 30
Enter the degree: 90
Enter the Mood: 1 for clockwise, 2 for anticlockwise
After that you have to draw two polygons, one is the original polygon with supplied vertices and another is the
transformed one.
Transcribed Image Text:Scaling Transformations: A 2D point can be scaled by multiplication of the coordinate values (x,y) by scaling factors Sx and Sy to produce the transformed coordinates (x,y'). Translation Transformations: A 2D point can be translated by adding the coordinate values (x,y) by Translation distances Tx and Ty to produce the transformed coordinates (x,y'). Rotation Transformations: A 2D point can be rotated by repositioning it along a circular path in the xy plane. We specify the rotation angle and the position of the rotation point about which the object is to be rotated. Multiplication of the coordinate values (x,y) by rotation matrix produce the transformed coordinates (x,y'). Now you have to design a program which will provide you with the option that which type of transformation you want to do. Like the following, Enter your choice: 1. Translation 2. Scaling 3. Rotation 4. Exit After providing the choice you have to enter the number of edges of a polygon and then you have to input the coordinates of each vertex. Like the following, Enter your choice: 3 Enter the no. of edges:-4 Enter the co-ordinates of vertex 1:- 30 30 Enter the co-ordinates of vertex 2:- 30 90 Enter the co-ordinates of vertex 3:- 90 90 Enter the co-ordinates of vertex 4:- 90 30 Enter the degree: 90 Enter the Mood: 1 for clockwise, 2 for anticlockwise After that you have to draw two polygons, one is the original polygon with supplied vertices and another is the transformed one.
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Rendering
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education