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

Bit20203 - Graphics Programming SEMESTER 1 SESSION 2019/2020

This document provides instructions for a lab assignment on drawing geometric primitives and a vehicle using OpenGL. Students will draw lines, triangles, rectangles, and polygons using OpenGL functions. They will then design and draw a vehicle using the learned geometric primitives. The vehicle drawing must be presented in a report including source code and an output screenshot. The report is due by October 16th 2019 and must be submitted via Edmodo using a specific file naming convention.

Uploaded by

Ahsan Hridoy
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)
64 views3 pages

Bit20203 - Graphics Programming SEMESTER 1 SESSION 2019/2020

This document provides instructions for a lab assignment on drawing geometric primitives and a vehicle using OpenGL. Students will draw lines, triangles, rectangles, and polygons using OpenGL functions. They will then design and draw a vehicle using the learned geometric primitives. The vehicle drawing must be presented in a report including source code and an output screenshot. The report is due by October 16th 2019 and must be submitted via Edmodo using a specific file naming convention.

Uploaded by

Ahsan Hridoy
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/ 3

LABSHEET #4 Drawing OpenGL Geometric Primitives BIT20203

BIT20203 – GRAPHICS PROGRAMMING


SEMESTER 1 SESSION 2019/2020

labsheet #4
Title : Drawing OpenGL Geometric Primitives
Objectives : At the end of the lab session, students should be able to:
(i) set up the OpenGL viewport via orthographic
projection.
(ii) draw a single straight line.
(iii) draw other types of geometric primitives such
triangle, rectangle and polygon.
(iv) assign different color to each geometric primitive.
Date : 9 October 2019 (Wednesday) – S2 & S3
10 October 2019 (Thursday) – S1

INSTRUCTIONS

This labsheet is divided into two exercises as follows:

EXERCISE 1 : Drawing Geometric Primitives

Based on the codes written in the PowerPoint slides (Introduction to OpenGL) in the previous lab
session,

1. Replace the window’s name to Exercise 1 : Drawing Geometric Primitives.


2. Replace function void lineSegment(void) to void display(void). Please change the parameter
for glutDisplayFunc( ) accordingly.
3. Draw the following geometric primitives using different OpenGL parameters in void display().
a. All 4 geometric types (in the next page) must be displayed in one output screen, not in
separate screens/windows).
b. Tips: Firstly, sketch the coordinates (x,y) for all geometric primitives on the paper
and then transfer all the x & y values in your codes.

1
LABSHEET #4 Drawing OpenGL Geometric Primitives BIT20203

(a) (b)

(c) (d)

4. Sample output:

EXERCISE 2 : Drawing a Vehicle

Write an OpenGL program that would be able draw a vehicle (car, motorcycle, bicycle, lorry, etc.)
using the geometric primitives that you have been learned in Exercise 1. You should be able to:

1. Use your creativity to design the vehicle.


2. Set a series of coordinates to create the vehicle geometry.
3. Apply different colors for background and related geometric objects that represent the vehicle.
4. Sample output:

2
LABSHEET #4 Drawing OpenGL Geometric Primitives BIT20203

5. After completing this exercise (Exercise 2 only), you must submit your work and it will be
evaluated by your lecturer. Please consider the following requirements:
a. Prepare a report in Microsoft Word / PDF format.
b. The report must include the
i. Cover page. Write down your particular details such as name, matric no, etc.
ii. Source codes. Copy your code from CodeBlock and paste it in the report.
iii. Sample output. Capture the screenshot image of the output and put it in the
report.
c. Submission deadline: 16 October 2019 (11.59pm).
d. Submit softcopy of your report via Edmodo account using the following naming
convention; LabAssignment2_matrik-no.docx/pdf.

You might also like