Using Visual Studio, OpenGL, and the provided files. Complete the three tasks

Job ID: 31727289

Budget: $10 – $30 USD

Using the provided solution file (spin.c is already loaded within), and the provided .txt files that contain the code, complete the following task for each respective .txt file. The majority of the code is already provided, each file will just need a bit of modification to complete each task. Any modification should be commented:

1. In the program square.c, the user draws a new square by clicking the mouse left button. New squares are not drawn when the user moves the mouse. Modify the program so that new squares are drawn under the following conditions:
1) when the user moves the mouse with no mouse buttons being pressed.
2) when the user moves the mouse with one or more mouse buttons being pressed.

2. In the program spin.c, the rotation speed of the square is controlled by the increment of the rotation angle in the function spinDisplay(). However, in many situations, it is not convenient to control animation speed using such methods. Instead, a timer should be used. GLUT provides a timer function glutTimerFunc(). Modify the program spin.c using glutTimerFunc() so that the square rotates by 30 degrees per second.

3. Implement the rubber rectangle program based on the rubber band program. Create a rectangle rather than a line.


I will just need the modified .c file of each section (square.c, spin.c, rubberband.c).