# SUPERSTARWEBTECH

There is no elevator to success. You have to take the stairs. Take your first steps with SSWT!

# CS602-Computer Graphics Assignment no. 2 Solution SPRING 2019 Due date: 26 May, 2019

Subject: CS602-COMPUTER GRAPHICS
Semester: SPRING 2019
Assignment No. 1
Due date: 26 May 2019

 CS602 ASSIGNMENT 2 SOLUTION SPRING 2019

CS602-Computer Graphics Assignment 2 Solution #Question

This task is based on the concepts of basic transformations like translation, scaling, and reflection (along the axis) of a rigid body. For this purpose you have to implement the following:

1)      You first have to divide your screen into four quadrants as shown in the figure:
 CS602 ASSIGNMENT 2 SOLUTION 2019

2)      Take three points x1(1,0), x2(3,0) and x3(3,2) as three coordinates and draw a triangle in the first quadrant. (Hint: Can use line function or fillpoly function of graphics.h to draw a triangle)

 CS602 ASSIGNMENT 2 SOLUTION SPRING 2019

3)      Now translate the above triangle to a new location with tx=2 and ty=1.
 CS602 ASSIGNMENT 2 SOLUTION SPRING 2019
4)      Now scale the translated triangle by sx=2 and sy=2. The yellow triangle in fig is the scaled one.
 CS602 ASSIGNMENT NO 2 SOLUTION SPRING 2019
5)      Take reflection along the x-axis of the scaled triangle (the yellow one) from step 4. This will be the blue triangle in the figure.
 CS602 ASSIGNMENT NO 2 SOLUTION SPRING 2019

6)      Take reflection along the y-axis of the scaled triangle (the yellow one) from step 4. This will be the magenta triangle in the figure.
 CS602 ASSIGNMENT 2 SOLUTION SPRING 2019

Write a code in c++ to implement the above functions. It will be a good programming practice that you implement it by creating a triangle class.

ðŸ‘‰ IMPORTANT NOTE: WATCHðŸ‘€ THIS TUTORIAL FIRST. Then you will be able to solve your assignment.

 CS602 ASSIGNMENT 2 SOLUTION SPRING 2019 OUTPUT PREVIEW

CS602-Computer Graphics Assignment 2 Solution Watch Video!

CS602-Computer Graphics Assignment 1 Solution! Download!

ðŸ‘‰ IMPORTANT NOTE: WATCHðŸ‘€ THIS TUTORIAL FIRST. Then you will be able to solve your assignment.
CS602 Assignment_2 Solution SPRING_2019 ———————- Download

## Author

### Anam Afzal

Hi, I'm a Pakistani freelancer with a passion for helping businesses achieve their online goals through no-code solutions. I specialize in WordPress customization and ManyChat automation, and I'm always on the lookout for new ways to use technology to make businesses more efficient and successful. I'm also a big believer in the power of no-code tools to democratize technology and make it accessible to everyone. I'm passionate about sharing my knowledge and helping others learn how to use no-code tools to create their own websites, automate their workflows, and grow their businesses. If you're looking for a reliable and experienced no-code developer, I'm here to help. Please feel free to contact me to discuss your project requirements.
SHARE THIS POST
Blog

Blog

Blog