Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 of 1 COMP-3213 Computer Graphics Homework #1 Due date: 2/5/2019 Tuesday Please fill in the missing code and complete the program so that [10

image text in transcribed
1 of 1 COMP-3213 Computer Graphics Homework #1 Due date: 2/5/2019 Tuesday Please fill in the missing code and complete the program so that [10 points] the window size is 500 x 500 pixel, and name the window (title) after your name. The left-top corner of the window is located at the location of (150, 150). 1. [25 points] Add a solid cube to the 3D world. User should be able to use keys*x', 'y. and z'to rotate the object around x-, y-, and z- axis, respectively. User hits "Esc" key to terminate the program. Set the cube size appropriately (not too big and also not too small) 2. 3. [25 points] Add a mouse callback function so that every left-mouse-key click rotates the object around x-axis 10 degree counter-clockwise and every right-mouse-key click rotates the object 10 degree around x-axis clockwise. 4. [20 points] Add a special key callback function, so that hitting "left-arrow key rotates the object along x-axis counter-clockwise, and hitting "right-arrow "key rotates the object along x-axis clockwise. 4 120 points] Setup a timer in the program so that the timer rotates the 3D object around y-axis 10 degrees per second. 1 of 1 COMP-3213 Computer Graphics Homework #1 Due date: 2/5/2019 Tuesday Please fill in the missing code and complete the program so that [10 points] the window size is 500 x 500 pixel, and name the window (title) after your name. The left-top corner of the window is located at the location of (150, 150). 1. [25 points] Add a solid cube to the 3D world. User should be able to use keys*x', 'y. and z'to rotate the object around x-, y-, and z- axis, respectively. User hits "Esc" key to terminate the program. Set the cube size appropriately (not too big and also not too small) 2. 3. [25 points] Add a mouse callback function so that every left-mouse-key click rotates the object around x-axis 10 degree counter-clockwise and every right-mouse-key click rotates the object 10 degree around x-axis clockwise. 4. [20 points] Add a special key callback function, so that hitting "left-arrow key rotates the object along x-axis counter-clockwise, and hitting "right-arrow "key rotates the object along x-axis clockwise. 4 120 points] Setup a timer in the program so that the timer rotates the 3D object around y-axis 10 degrees per second

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions