Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Report on CSE 425

UNIVERSITY OF ASIA PACIFIC - UAP

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

Submitted By: Submitted To:

Name – Tazzina Afroze Hassan Prof. Dr. Bilkis Jamal Ferdosi

Student ID – 16101025 Head of the Department of Computer


Science & Engineering
Section – (A)
University of Asia Pacific - UAP
Course Title: Computer Graphics

Date of Submission: 15.08.2020


Name of the Experiment: Teapot in Graphics.

Introduction: In this assignment I was assigned to do four requirements of Teapot in


graphics. I was given a document of the fours requirements, they are:

 Color Changes
 Light Position Changes
 Additional Tasks
 Optional Tasks.

I did first two of the requirements Color changes and Light Position Changes. To do this
Assignment I took help from our given skeleton code and watched Youtube and some
documents from Google and then implemented the code.

Used Language and IDE:

Language – C++ programming language.

IDE – Microsoft Visual Studio Community 2019.

Description:

Color Changes:

To do this first of all I took a global variable called colorChangingmethod and made this

as an integer value.

I added the functions to change the color of the displayed model.I used c key to change

the teapot into several other colors. In diffColors Matrix I took twelve colors manually

and my output is also showing twelve different colors by pressing ‘C’ key. And also

handled by pressing for a long time color also changes continuously one by one.But after

changing the last color it starts from the first one. I incremented the variable

colorChangingmethod in case ‘C’ which is in the function KeyboardFunc.

I also handled when I press keys anything but C the console says something like this:
Unhandled key press t.

Unhandled key press a.

Unhandled key press z.

Unhandled key press z.

Unhandled key press e.

Unhandled key press n.

Unhandled key press a.

The code that prints these messages is in the keyboardFunc function.

It is my 1st task.

Light Positions Changes:

In my second task the light position changing I have defined two floating point

variables. I declared them as leftrightArrow, updownArrow. I assigned them in the first

two values of light position array. And implement the in the function named specialFunc

Then every time the user presses the arrow keys the value leftArrow/rightArrow of the

defined values are incremented/decremented the first value of the position by 0.5, and

the upArrow/downArrow keys should do the same for the second value.

Future Works:

 Implementing Additional Tasks.

 Implementing Optional Tasks.

You might also like