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); //Rotate
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); //Rotate 180 glColor3f(1.0, 0.0, 0.0); //red color glutSolidTeapot(3); //Draw Teapot
glTranslatef(-1.0 , -1.0 , 0.0); //set translation parameter glColor3f(0.0 ,1.0 ,0.0 ); //green color glutSolidTeapot(3); //Redraw the Teapot
glScalef(0.3 ,0.3 , 0.0); //Scale the teaput glColor3f(0.0 ,0.0 , 1.0); //blue color glutSolidTeapot(1); //Redraw the Teapot
glFlush();
I need a picture for the 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