0% found this document useful (0 votes)
11 views7 pages

66251f6fd85fd1d2042522b6 Lab1 13 09 2024

Uploaded by

truonglnce181823
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views7 pages

66251f6fd85fd1d2042522b6 Lab1 13 09 2024

Uploaded by

truonglnce181823
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Lab #1: Geometric primitives and transformations

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.

Instructions are as follows:

Function 1(10pts): Create a white background and points as follows:

1
Function 2(15pts): Translation transformation (x = 15, y = 20 )

Function 3(20pts):. Rotation transformation

theta_deg = 60 # in degree

2
Function 4(15pts): Scaling transformation:

# scale x: 3; scale y: 0.5, translate x: 15; translate y: 20

3
Function 5 (20pts): Select the scaling transformation: enter the scaling factors
information to draw a new rectangle corresponding to the new coordinates.

T = np.array([[5, 5, 10], [5, 7, 70], [0.25, 0.5, 1]])

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

Hình 2 Destimation image

6
Hình 3 Result Image

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy