Professional Documents
Culture Documents
University of Asia Pacific - Uap Department of Computer Science and Engineering
University of Asia Pacific - Uap Department of Computer Science and Engineering
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.
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
I also handled when I press keys anything but C the console says something like this:
Unhandled key press t.
It is my 1st task.
In my second task the light position changing I have defined two floating point
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: