how can i build this as problem 2 of my code? #include #include #include #include #include "./freeglut-3.4.0/include/GL/freeglut.h" using namespace std; bool leftDown = false, rightDown = false; int lastPos[2]; float cameraPos[4] = { 0,1,4,1 }; int windowWidth = 640, windowHeight = 480; double xRot = 0; double yRot = 0; int curProblem = 1; // TODO: change this number to try different examples float specular[] = { 1.0, 1.0, 1.0, 1.0 }; float shininess[] = { 50.0 }; void problem1() { // TODO } void problem2() { //FIX HERE } void problem3() { //TO DO } void problem4() { //TO DO } void display() { glClearColor(0, 0, 0, 0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glDisable(GL_LIGHTING); glEnable(GL_DEPTH_TEST); glBegin(GL_LINES); glColor3f(1, 0, 0); glVertex3f(0, 0, 0); glVertex3f(1, 0, 0); // x axis glColor3f(0, 1, 0); glVertex3f(0, 0, 0); glVertex3f(0, 1, 0); // y axis glColor3f(0, 0, 1); glVertex3f(0, 0, 0); glVertex3f(0, 0, 1); // z axis glEnd(/*GL_LINES*/); glEnable(GL_LIGHTING); glShadeModel(GL_SMOOTH); glMaterialfv(GL_FRONT, GL_SPECULAR, specular); glMaterialfv(GL_FRONT, GL_SHININESS, shininess); glEnable(GL_LIGHT0); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glViewport(0, 0, windowWidth, windowHeight); float ratio = (float)windowWidth / (float)windowHeight; gluPerspective(50, ratio, 1, 1000); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); gluLookAt(cameraPos[0], cameraPos[1], cameraPos[2], 0, 0, 0, 0, 1, 0); glLightfv(GL_LIGHT0, GL_POSITION, cameraPos); glRotatef(xRot, 1, 0, 0); glRotatef(yRot, 0, 1, 0); if (curProblem == 1) problem1(); if (curProblem == 2) problem2(); if (curProblem == 3) problem3(); if (curProblem == 4) problem4(); glutSwapBuffers(); } void mouse(int button, int state, int x, int y) { if (button == GLUT_LEFT_BUTTON) leftDown = (state == GLUT_DOWN); else if (button == GLUT_RIGHT_BUTTON) rightDown = (state == GLUT_DOWN); lastPos[0] = x; lastPos[1] = y; } void mouseMoved(int x, int y) { if (leftDown) { xRot += (y - lastPos[1]) * .1; yRot += (x - lastPos[0]) * .1; } if (rightDown) { for (int i = 0; i < 3; i++) cameraPos[i] *= pow(1.1, (y - lastPos[1]) * .1); } lastPos[0] = x; lastPos[1] = y; glutPostRedisplay(); } void keyboard(unsigned char key, int x, int y) { curProblem = key - '0'; if (key == 'q' || key == 'Q' || key == 27) { exit(0); } glutPostRedisplay(); } void reshape(int width, int height) { windowWidth = width; windowHeight = height; glutPostRedisplay(); } int main(int argc, char** argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); glutInitWindowSize(windowWidth, windowHeight); glutCreateWindow("HW2"); glutDisplayFunc(display); glutMotionFunc(mouseMoved); glutMouseFunc(mouse); glutReshapeFunc(reshape); glutKeyboardFunc(keyboard); glutMainLoop(); return 0; }.