Description
CSE423: Computer Graphics
Spring2022
Lab Assignment 1
Important Instructions for the Assignment:
● For this assignment, you can choose either Java or Python environments.
● Before starting this assignment, please make sure you have installed the mentioned OpenGL libraries in your Java or Python System.
● The skeleton code will be provided. You can use that for completing the tasks or design your own.
● Compress your source code along with the screenshots of the output image into one ZIP/RAR file. Upload your file in the form.
Assignment Submission Link: https://forms.gle/chNpNueXaNoudQtX6
Task 1: Drawing Pixels
You are supposed to draw 50 pixels (coordinate points). For this you need to generate 100 random values (50 x – coordinates and 50 y – coordinates). You do not need to join any pixels for this task.
Task 2: House Building
You are to draw a House using the base primitives: points, lines, or triangles. You can use GL_POINTS, GL_LINES or GL_TRIANGLES for designing this house. A diagram has been provided as an example. You can modify the house design to your liking.
Task 3: Coin Toss using Digital Differential Analyzer (DDA) Line Drawing Algorithm
Special Instructions:
● You are to have at least one dashed line while designing the desired output. The other lines can be straight lines. An example has been attached for your better understanding.
● For designing the dashed line, you can give some pixel gaps. ● You cannot use GL_LINES or GL_TRIANGLES.
Sample Example 1: Student Id: 20311212
Output:
Explanation: The last digit of 20311212 is 2, which is an even number and thus your output will be Tails. Notice the upper line is dashed. You can have either one of the lines as dashed or both.
Sample Example 2: Student Id: 15101111
Output:
Explanation: As the last digit of 15101111 is odd, so it will generate Heads. Again you can have any amount of dashed lines, but a minimum of one is mandatory.




Reviews
There are no reviews yet.