66251f6fd85fd1d2042522b6 Lab1 13 09 2024
66251f6fd85fd1d2042522b6 Lab1 13 09 2024
Learning Outcomes:
Upon successful completion of this workshop, you will have demonstrated the abilities
to:
• Practice basic Python language syntax and semantics to write python programs.
• Use concepts geometric primitives to draw rectangle.
• Learn about transformations and write a program to perform transformations like
translation, rotation, scaling
• Compile and run a program.
Requirements:
In this assignment, students will learn the basics of geometric primitives and
transformations. By writing a program that draws a rectangle, and performs 2D
transformations.
1
Function 2(15pts): Translation transformation (x = 15, y = 20 )
theta_deg = 60 # in degree
2
Function 4(15pts): Scaling transformation:
3
Function 5 (20pts): Select the scaling transformation: enter the scaling factors
information to draw a new rectangle corresponding to the new coordinates.
4
Function 6 (20pts):
Given Point at location P(2,3), find and draw the relection point accorss x-asis, y-axis,
and the across line y = x as. The Relection Matrix is defined as follows:
Function 7:
Given the source image (you must to change to your image) and destination image,
please develop a program to project the source image to the destination image as
follows:
5
Hình 1 Source Image
6
Hình 3 Result Image