CSE423 Lab 1 Solved

25.00 $

Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: . zip solution files instantly, after Payment


Rate this product

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

We are to demonstrate a coin toss with two sides: Heads or Tails. Depending on the last digit of Brac University Student Id, the output of the coin toss will be determined.

If the last digit is an odd number, then the output of the coin will be H (head), or else T (tail) for an even number. You can consider 0 as an even number.

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_POINTS, GL_LINES or

Sample Example 1: Student Id: 20311212 Output:

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:

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.