0% found this document useful (0 votes)
2 views3 pages

Midterm Assignment

The CSE423 Midterm Assignment requires students to perform various calculations and transformations using their student ID digits as variables A, B, C, and D. Tasks include finding perpendicular vectors, applying line drawing algorithms, performing clipping operations, and executing composite transformations in both 2D and 3D. Students must submit handwritten answers in a scanned PDF format, adhering to specific guidelines and deadlines.

Uploaded by

noobgaming156
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)
2 views3 pages

Midterm Assignment

The CSE423 Midterm Assignment requires students to perform various calculations and transformations using their student ID digits as variables A, B, C, and D. Tasks include finding perpendicular vectors, applying line drawing algorithms, performing clipping operations, and executing composite transformations in both 2D and 3D. Students must submit handwritten answers in a scanned PDF format, adhering to specific guidelines and deadlines.

Uploaded by

noobgaming156
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

CSE423​

Midterm Assignment

To answer the question, you will need four variables A, B, C and D which are
sequentially the first, second, third and fourth pair of digits from the left in your student ID.
For example, if your ID is 15101208, then A= 15, B= 10, C= 12 and D= 8.
[ Incorrect Calculation of such pairs will result in a -50% penalty in the assignment
mark. ]

1.​ Find 3D vectors V1’ and V2’ perpendicular to the vector V1(A, B,C) and V2(B, C, D)
respectively and show whether V1’ and V2’ are perpendicular to each other or not.

2.​ Consider a line having endpoints from (D, C) to (B, A). Find out all or first 10 pixels
(whichever is less) of the line using the midpoint line drawing algorithm.

3.​ Consider a rectangular clip region defined by the points (-100, min(A, B)) and (50,
max(A, B)). For the given clip region, find out whether the line having endpoints (0, 423)
and (C, D) is completely inside/outside or clipped only from the outcodes of Cohen
Sutherland Algorithm. (that means you don’t need to go to the third step, trivial
acceptance/rejection is enough). Then verify your claim using Cyrus Beck Line
Clipping Algorithm and if the line is clipped, find out the clipped coordinates of the
line.

4.​ A composite transformation is defined by a 90-degree clockwise rotation about point


(A, B), followed by a shearing along both axis by a shearing factor of (C, D) about
point (B, 0), followed by a uniform scaling by factor C, followed by a reflection about
the line Ax + By + C = 0 and finally followed by a translation of (B, D). If a point P is
transformed into P’ with the above transformation, write down the composite
transformation matrix representation for transforming P to P’ in the correct sequence of
matrix multiplications.

5.​ Suppose a line segment starts at (C, D) and ends at (423, 428). If we draw this problem
using the DDA algorithm, determine the number of times x will be increased. How many
pixels will be needed to draw this line?
𝑥/7 + 𝑦/12 = 5
6.​ Suppose a line segment has the equation above, and the starting point is at y = D and the
ending point is at y = 0. Find the first 6 pixels using the Midpoint Line Algorithm.
7.​ A clipping window is C units wide and A units tall, and has its center at (B, D). The
endpoints of a line segment are (-45, 65) and (23, -10). Apply Cohen-Sutherland
Algorithm, and identify whether the line is "partially inside", "completely inside", or
"completely outside". If it is the first case, run the algorithm to calculate new endpoints
for the line segment so that it is inside the clipping window. Does Cyrus-Beck line
clipping algorithm produce the same output?

8.​ Arya drew a triangle on a coordinate plane with vertices A(3, 2), B(5, 1) and C(4, 3). She
performed the following transformations in sequence: At first, she translated the triangle
by (−2, 3). Then, rotate the triangle 90° counterclockwise about the point (C, D). After
that, she reflected the triangle on the x-axis. Finally, she scaled the triangle uniformly
by a factor of 2 about the point (1, −1). After applying these transformations, the new
location of one vertex was found to be (a, b).
a.​ Now, identify the position of the vertices before only the reflection is applied.
(That means only translation and rotation are applied to each of the vertices).
b.​ Write the composite matrix formulation for all transformations applied to the
triangle. (You do not need to perform matrix multiplication.)
c.​ Which geometric properties are preserved after each transformation?

9.​ A 3D composite transformation is defined by a shearing along the X axis by a shearing


factor of (2, 4) about point (423, 0, 0), followed by a uniform scaling by factor 3 again,
followed by a 30-degree counterclockwise rotation on the X axis about point (2, 10, 12)
and finally followed by a translation of (-4, -2, -3). A point P is transformed into P’ with
the above transformation. Now, write down the composite transformation matrix
representation for P’ in the correct sequence of matrix multiplications. [N.B. The
shearing factor will be ShY = 2 and Shz = 4. Go sequentially if it is not mentioned.]

10.​A composite transformation is defined by a scaling on the X-axis and Y-axis (first
transformation) followed by a second transformation, via the following equations:
x′ = 5x - 11
y′ = 10y + 22
z′ = 33 + z
a.​ Find the composite transformation matrix. What was the second
transformation after scaling?
b.​ Write down the scaling matrix from the above composite transformation.
c.​ If a 3D point M has the coordinate (B, C, D), what is the new coordinate of the
point M’, after the transformation defined by the equations?
Submission Guidelines:
●​ You MUST write the answers on the paper by hand. You can also use a Tab.
●​ Make a cover page including your Assignment Number, Name, ID, Section, and
Date.
●​ Scan the pages and make a PDF. The file name should follow the format:
StudentID_Section_Assignment_1 (eg 10301040_6_Assignment_1)
●​ No late submissions will be accepted.
●​ Upload the PDF to the Google form.

You might also like