Question
void Draw() { glClear(GL_COLOR_BUFFER_BIT); gluLookAt(0, 3, 5, 0, 1, 0, 0, 1, 2); glColor3f(1.0,0.5,0.5); //Pink Color glutSolidTeapot(4); //Draw the Teapot glRotatef(180, 0, 1, 0); //
void Draw() { glClear(GL_COLOR_BUFFER_BIT); gluLookAt(0, 3, 5, 0, 1, 0, 0, 1, 2);
glColor3f(1.0,0.5,0.5); //Pink Color glutSolidTeapot(4); //Draw the Teapot
glRotatef(180, 0, 1, 0); //Rotating the teapot by 180 degrees on y glColor3f(0.0, 1.0, 0.0)); //green color glutSolidTeapot(3); //reDraw the teabot
glTranslatef(-1.0 , -1.0 , 0.0); //Translating the teapot by -1 on x and -1 on y glColor3f(0.0,0.0,1.0); //blue color glutSolidTeapot(3); //redraw the teapot
glScalef(0.3 ,0.3 , 0.0); //scaling the teapot by 0.3 glColor3f(1.0, 0.0, .0.0 ); //red color glutSolidTeapot(1); //redraw the teapot
glFlush(); }
I need a picture of output
in opengl
computer graphics
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started