SlideShare a Scribd company logo
#include
float angle, move, scene, roadmove,turn, on=1;
int i, start;
void init(GLvoid)
{
glClearColor(0, 0, 0, 0); //set the Background Color
BLACK
glEnable(GL_DEPTH_TEST);
glShadeModel(GL_SMOOTH); // Enable Smooth
Shading
}
void wall()
{
glRectf(0, 0, 14, 10);
}
void Stars()
{
glPointSize(2);
glBegin(GL_POINTS);
glVertex2f(0,0);
glVertex2f(0,0.30);
glVertex2f(0.1,0.45);
glVertex2f(0,0.65);
glVertex2f(0.1,0.85);
glEnd();
}
void Moon()
{
glutSolidSphere(.5, 10, 10);
}
void Tree(){
glPushMatrix();
glTranslatef(4.75,.25,3);
//glRotatef(a, 0, 1, 0);
glColor3f(0.133333, 0.545098 , 0.133333);
glutSolidCone(1.5,2, 10, 2);
glPopMatrix();
glPushMatrix();
glTranslatef(4.75,.25,3.9);
//glRotatef(a, 0, 1, 0);
glColor3f(0.133333, 0.545098 , 0.133333);
glutSolidCone(1.5,2, 10, 2);
glPopMatrix();
glPushMatrix();
glTranslatef(4.75,.25,4.75);
//glRotatef(a, 0, 1, 0);
glColor3f(0.133333, 0.545098 , 0.133333);
glutSolidCone(1.5,2, 10, 2);
glPopMatrix();
glPushMatrix();
glTranslatef(5,-0.6,0);
glRotatef(90, 1, 0, 0);
glColor3f(0.823529,0.411765,0.117647) ;
glRectf(0, 0, -.5, 3);
glPopMatrix();
glEnd();
}
void groundroad() //GroundRoad
{
glColor3f(0, 1, 0);
glPushMatrix();
glScalef(1, 50, 0);
wall(); //Green BackGround
//glPopMatrix();
glColor3f(0, 1, 0);
//glPushMatrix();
glScalef(1.1, 10, 0);
wall(); //Green BackGround
glPopMatrix();
glPushMatrix();
glColor3f(0, 1, 0);
glScalef(-1, 50, 0);
wall(); //Green BackGround
glPopMatrix();
glTranslatef(5, 0, .01);
glPushMatrix();
glScalef(.25, 50, 1);
glColor3f(0.411765,0.411765,0.411765);
wall(); //Black Road
glPopMatrix();
glPushMatrix();
glTranslatef(1.5, -1.3, .01);
glColor3f(1, 1, 1);
for (i = 0; i < 250; i++)
{
glTranslatef(0, 2, 0);
glRectf(0, 0, .5, 1); //White Bricks on Road
}
glPopMatrix();
glPushMatrix();
glTranslatef(3.5, -1.3, .01);
glColor3f(1, 0.54902, 0);
for (i = 0; i < 500; i++)
{
glTranslatef(0, 1, 0);
glRectf(0, 0, .5, 1); //Yellow line on Road
}
glPopMatrix();
glPushMatrix();
glTranslatef(-.5, -1.3, .01);
glColor3f(1, 0.54902, 0);
for (i = 0; i < 500; i++)
{
glTranslatef(0, 1, 0);
glRectf(0, 0, .5, 1); //Yellow line on Road
}
glPopMatrix();
glPushMatrix();
glTranslatef(4, 1.3, -1);
glColor3f(1, 0.54902, 0);
for (i = 0; i < 30; i++)
{
glTranslatef(0, 10, 0);
Tree();
}
glPopMatrix();
glPushMatrix();
glTranslatef(9, 1.3, -1);
glColor3f(0.721569, 0.52549, 0.0431373);
glRectf(0,0,22,600);
glPopMatrix();
glPushMatrix();
glTranslatef(15, -1.3, .01);
glColor3f(1, 0.54902, 0);
for (i = 0; i < 500; i++)
{
glTranslatef(0, 1, 0);
glRectf(0, 0, .5, 1); //track 1
}
glPopMatrix();
glPushMatrix();
glTranslatef(21, -1.3, .01);
glColor3f(1, 0.54902, 0);
for (i = 0; i < 500; i++)
{
glTranslatef(0, 1, 0);
glRectf(0, 0, .5, 1); //track
}
glPopMatrix();
glPushMatrix();
glTranslatef(19, 20, 2.5);
glColor3f(0, 0, 1);
glScalef(3, 8, 2.5);
glutSolidCube(2);
glPopMatrix();
}
void House()
{
glPushMatrix();
glTranslatef(-16,2,2);
glColor3f(0.721569,0.52549,0.0431373);
glutSolidCube(4);
glPushMatrix();
glTranslatef(-27.5,3,1.5);
glRotatef(90, 0, 1, 0);
glColor3f(1, 1, 1);
glRectf(0, 0, .5, 1);
glPopMatrix();
glPushMatrix();
glTranslatef(-27.5,1,1.5);
glRotatef(90, 0, 1, 0);
glColor3f(1, 1, 1);
glRectf(0, 0, .5, 1);
glPopMatrix();
glPushMatrix();
glTranslatef(-27.5,-1,1.5);
glRotatef(90, 0, 1, 0);
glColor3f(1, 1, 1);
glRectf(0, 0, .5, 1);
glPopMatrix();
glPushMatrix();
glTranslatef(-27.5,3,-.5);
glRotatef(90, 0, 1, 0);
glColor3f(1, 1, 1);
glRectf(0, 0, .5, 1);
glPopMatrix();
glPushMatrix();
glTranslatef(-27.5,1,-.5);
glRotatef(90, 0, 1, 0);
glColor3f(1, 1, 1);
glRectf(0, 0, .5, 1);
glPopMatrix();
glPushMatrix();
glTranslatef(-27.5,-1,-.5);
glRotatef(90, 0, 1, 0);
glColor3f(1, 1, 1);
glRectf(0, 0, .5, 1);
glPopMatrix();
glPopMatrix();
glPushMatrix();
glTranslatef(-16,5,2);
glColor3f(0.721569,0.52549,0.0431373);
glutSolidCube(4);
glPopMatrix();
}
void truck()
{
glColor3f(0,0.545098,0.545098 );
glScalef(1, 1, 2);
glutSolidCube(1);
glTranslatef(0, -.25, .5);
glColor3f(0.862745, 0.862745, 0.862745);
glutSolidCube(.5);
}
void train()
{
glPushMatrix();
glTranslatef(19, 20, 2.5);
glColor3f(0, 0, 1);
glScalef(3, 8, 2.5);
glutSolidCube(2);
glPopMatrix();
}
void display(void)
{
glClear(GL_COLOR_BUFFER_BIT |
GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glPushMatrix();
glTranslatef(-4,0.8,-2);
glColor3f(1,1,1);
Stars();
for (int i =0;i<20;i++){
glTranslatef(0.4,0,0);
Stars();
}
glPushMatrix();
glTranslatef(-9,3,-4);
glColor3f(1,1,1);
Moon();
glTranslatef(.2,0,0);
glColor3f(0,0,0);
Moon();
glPopMatrix();
glPopMatrix();
glTranslatef(-7, -5, -6);
glTranslatef(0, 0, roadmove); //Road Movement
//glLightfv(GL_LIGHT0, GL_POSITION, position);
glRotatef(scene, 0, 1, 0); //Scene Rotation
glPushMatrix();
glRotatef(-90, 1, 0, 0);
groundroad(); //Ground & Road
glPopMatrix();
glPushMatrix();
glRotatef(90, 0, 1, 0);
for (int k = 0; k < 20; k++)
{
glTranslatef(25,0 , 0);
House(); //house
}
glPopMatrix();
glTranslatef(6, 1, 0);
glTranslatef(turn, 0, move);
glTranslatef(0, 0, on);
glRotatef(-180, 1, 0, 0);
truck();//truck
//train();
if (start==-1) //control from keyboard
{
if (roadmove < 550)
{
roadmove = roadmove + .05; //Ground & Road
Movement
on = on - .055; // Truck Movement
glutPostRedisplay();
}
else
{
}
}
glutSwapBuffers();
}
void SpecialInput(int key, int x, int y)
{
switch (key)
{
case GLUT_KEY_UP: //Truck Forward
move = move - .05;
break;
case GLUT_KEY_DOWN: //Truck Reverse
move += .3;
break;
case GLUT_KEY_LEFT: //Truck Left Turn
turn = turn - .05;
break;
case GLUT_KEY_RIGHT: //Truck Righ Turn
turn = turn + .05;
break;
}
glutPostRedisplay();
}
void keyboard(unsigned char key, int x, int y)
{
switch (key)
{
case 27://ESC
exit(0);
break;
case 'r': //reset all scene
angle = 0;
move = 0;
scene = 0;
roadmove = 0;
on = 0;
turn = 0;
break;
case '4': //scene rotation
scene = scene + .5;
break;
case '6': //scene rotation
scene = scene - .5;
break;
case 'w': //strat scene
start = -1;
break;
}
glutPostRedisplay();
}
void reshape(int w, int h) // Create The Reshape Function (the
viewport)
{
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION); // Select The Projection
Matrix
glLoadIdentity(); // Reset The Projection Matrix
if (h == 0) // Calculate The Aspect Ratio Of The Window
gluPerspective(80, (float)w, 1.0, 5000.0);
else
gluPerspective(80, (float)w / (float)h, 1.0, 5000.0);
glMatrixMode(GL_MODELVIEW); // Select The Model
View Matrix
glLoadIdentity(); // Reset The Model View Matrix
}
int main(int a, char** b)
{
glutInit(&a, b);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_DEPTH
|GLUT_RGB);
glutInitWindowSize(600,500); //Size of the Window
glutInitWindowPosition(80, 80); //Position of the
Windows
glutCreateWindow("SEMESTER PROJECT"); //Title
of the Window
init();
glutDisplayFunc(display); //Callback Function
glutReshapeFunc(reshape); //Callback Function
glutKeyboardFunc(keyboard);
glutSpecialFunc(SpecialInput);
glutMainLoop(); //Mainloop
return 0;
} Template tOAsk me anything 12:13 PM 6/26/2016
Solution
#include #include int main() { int gd = DETECT, gm;
initgraph(&gd, &gm, "C:TCBGI");
setcolor(YELLOW); rectangle(0,30,639,450);
settextstyle(SANS_SERIF_FONT,HORIZ_DIR,2);
setcolor(WHITE); outtextxy(275,0,"Bar Chart");
setlinestyle(SOLID_LINE,0,2); line(100,420,100,60);
line(100,420,600,420); line(90,70,100,60);
line(110,70,100,60); line(590,410,600,420);
line(590,430,600,420); outtextxy(95,35, "Y");
outtextxy(610,405,"X"); outtextxy(85,415,"O");
setfillstyle(LINE_FILL,BLUE); bar(150,100,200,419);
setfillstyle(XHATCH_FILL,RED); bar(225,150,275,419);
setfillstyle(WIDE_DOT_FILL,GREEN);
bar(300,200,350,419);
setfillstyle(INTERLEAVE_FILL,MAGENTA);
bar(375,125,425,419); setfillstyle(HATCH_FILL,BROWN);
bar(450,175,500,419); getch(); return 0; }

More Related Content

Similar to #includefloat angle, move, scene, roadmove,turn, on=1; int i, st.docx

Programa de objetos 3 d wire
Programa de objetos 3 d wirePrograma de objetos 3 d wire
Programa de objetos 3 d wire
René Domínguez
 
Ass day3 1_bd flag
Ass day3 1_bd flagAss day3 1_bd flag
Ass day3 1_bd flag
Robi Parvez
 
animation.#include windows.h#include GLglut.h#inclu.pdf
animation.#include windows.h#include GLglut.h#inclu.pdfanimation.#include windows.h#include GLglut.h#inclu.pdf
animation.#include windows.h#include GLglut.h#inclu.pdf
ambritgames
 
FLTK Summer Course - Part VIII - Eighth Impact - Exercises
FLTK Summer Course - Part VIII - Eighth Impact - ExercisesFLTK Summer Course - Part VIII - Eighth Impact - Exercises
FLTK Summer Course - Part VIII - Eighth Impact - Exercises
Michel Alves
 
The Ring programming language version 1.7 book - Part 60 of 196
The Ring programming language version 1.7 book - Part 60 of 196The Ring programming language version 1.7 book - Part 60 of 196
The Ring programming language version 1.7 book - Part 60 of 196
Mahmoud Samir Fayed
 
computer graphics at openGL
computer graphics at openGLcomputer graphics at openGL
computer graphics at openGL
Yasir Khan
 
Ass day2 1_checkerboard...copy in cpp
Ass day2 1_checkerboard...copy in cppAss day2 1_checkerboard...copy in cpp
Ass day2 1_checkerboard...copy in cpp
Robi Parvez
 
Ass day3 2_olympic logos
Ass day3 2_olympic logosAss day3 2_olympic logos
Ass day3 2_olympic logos
Robi Parvez
 
The Ring programming language version 1.5.3 book - Part 65 of 184
The Ring programming language version 1.5.3 book - Part 65 of 184The Ring programming language version 1.5.3 book - Part 65 of 184
The Ring programming language version 1.5.3 book - Part 65 of 184
Mahmoud Samir Fayed
 
openGl example
openGl exampleopenGl example
openGl example
Brian Goggins
 
Computer Graphics and Multimedia lab report
Computer Graphics and Multimedia lab reportComputer Graphics and Multimedia lab report
Computer Graphics and Multimedia lab report
Bijoy679
 
The Ring programming language version 1.9 book - Part 65 of 210
The Ring programming language version 1.9 book - Part 65 of 210The Ring programming language version 1.9 book - Part 65 of 210
The Ring programming language version 1.9 book - Part 65 of 210
Mahmoud Samir Fayed
 
Robot In OpenGL Using Line Function
Robot In OpenGL Using Line Function Robot In OpenGL Using Line Function
Robot In OpenGL Using Line Function
Jannat Jamshed
 
Robot In OpenGL Using Line Function
Robot In OpenGL Using Line Function Robot In OpenGL Using Line Function
Robot In OpenGL Using Line Function
Jannat Jamshed
 
OpenGL Starter L02
OpenGL Starter L02OpenGL Starter L02
OpenGL Starter L02
Mohammad Shaker
 
The Ring programming language version 1.6 book - Part 57 of 189
The Ring programming language version 1.6 book - Part 57 of 189The Ring programming language version 1.6 book - Part 57 of 189
The Ring programming language version 1.6 book - Part 57 of 189
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.2 book - Part 54 of 181
The Ring programming language version 1.5.2 book - Part 54 of 181The Ring programming language version 1.5.2 book - Part 54 of 181
The Ring programming language version 1.5.2 book - Part 54 of 181
Mahmoud Samir Fayed
 
Practicing 2d drawing primitives
Practicing 2d drawing primitivesPracticing 2d drawing primitives
Practicing 2d drawing primitives
Technology & Education
 
The Ring programming language version 1.10 book - Part 66 of 212
The Ring programming language version 1.10 book - Part 66 of 212The Ring programming language version 1.10 book - Part 66 of 212
The Ring programming language version 1.10 book - Part 66 of 212
Mahmoud Samir Fayed
 
OpenGL Starter L01
OpenGL Starter L01OpenGL Starter L01
OpenGL Starter L01
Mohammad Shaker
 

Similar to #includefloat angle, move, scene, roadmove,turn, on=1; int i, st.docx (20)

Programa de objetos 3 d wire
Programa de objetos 3 d wirePrograma de objetos 3 d wire
Programa de objetos 3 d wire
 
Ass day3 1_bd flag
Ass day3 1_bd flagAss day3 1_bd flag
Ass day3 1_bd flag
 
animation.#include windows.h#include GLglut.h#inclu.pdf
animation.#include windows.h#include GLglut.h#inclu.pdfanimation.#include windows.h#include GLglut.h#inclu.pdf
animation.#include windows.h#include GLglut.h#inclu.pdf
 
FLTK Summer Course - Part VIII - Eighth Impact - Exercises
FLTK Summer Course - Part VIII - Eighth Impact - ExercisesFLTK Summer Course - Part VIII - Eighth Impact - Exercises
FLTK Summer Course - Part VIII - Eighth Impact - Exercises
 
The Ring programming language version 1.7 book - Part 60 of 196
The Ring programming language version 1.7 book - Part 60 of 196The Ring programming language version 1.7 book - Part 60 of 196
The Ring programming language version 1.7 book - Part 60 of 196
 
computer graphics at openGL
computer graphics at openGLcomputer graphics at openGL
computer graphics at openGL
 
Ass day2 1_checkerboard...copy in cpp
Ass day2 1_checkerboard...copy in cppAss day2 1_checkerboard...copy in cpp
Ass day2 1_checkerboard...copy in cpp
 
Ass day3 2_olympic logos
Ass day3 2_olympic logosAss day3 2_olympic logos
Ass day3 2_olympic logos
 
The Ring programming language version 1.5.3 book - Part 65 of 184
The Ring programming language version 1.5.3 book - Part 65 of 184The Ring programming language version 1.5.3 book - Part 65 of 184
The Ring programming language version 1.5.3 book - Part 65 of 184
 
openGl example
openGl exampleopenGl example
openGl example
 
Computer Graphics and Multimedia lab report
Computer Graphics and Multimedia lab reportComputer Graphics and Multimedia lab report
Computer Graphics and Multimedia lab report
 
The Ring programming language version 1.9 book - Part 65 of 210
The Ring programming language version 1.9 book - Part 65 of 210The Ring programming language version 1.9 book - Part 65 of 210
The Ring programming language version 1.9 book - Part 65 of 210
 
Robot In OpenGL Using Line Function
Robot In OpenGL Using Line Function Robot In OpenGL Using Line Function
Robot In OpenGL Using Line Function
 
Robot In OpenGL Using Line Function
Robot In OpenGL Using Line Function Robot In OpenGL Using Line Function
Robot In OpenGL Using Line Function
 
OpenGL Starter L02
OpenGL Starter L02OpenGL Starter L02
OpenGL Starter L02
 
The Ring programming language version 1.6 book - Part 57 of 189
The Ring programming language version 1.6 book - Part 57 of 189The Ring programming language version 1.6 book - Part 57 of 189
The Ring programming language version 1.6 book - Part 57 of 189
 
The Ring programming language version 1.5.2 book - Part 54 of 181
The Ring programming language version 1.5.2 book - Part 54 of 181The Ring programming language version 1.5.2 book - Part 54 of 181
The Ring programming language version 1.5.2 book - Part 54 of 181
 
Practicing 2d drawing primitives
Practicing 2d drawing primitivesPracticing 2d drawing primitives
Practicing 2d drawing primitives
 
The Ring programming language version 1.10 book - Part 66 of 212
The Ring programming language version 1.10 book - Part 66 of 212The Ring programming language version 1.10 book - Part 66 of 212
The Ring programming language version 1.10 book - Part 66 of 212
 
OpenGL Starter L01
OpenGL Starter L01OpenGL Starter L01
OpenGL Starter L01
 

More from ajoy21

Please complete the assignment listed below.Define and explain, us.docx
Please complete the assignment listed below.Define and explain, us.docxPlease complete the assignment listed below.Define and explain, us.docx
Please complete the assignment listed below.Define and explain, us.docx
ajoy21
 
Please cite sources for each question. Do not use the same sources f.docx
Please cite sources for each question. Do not use the same sources f.docxPlease cite sources for each question. Do not use the same sources f.docx
Please cite sources for each question. Do not use the same sources f.docx
ajoy21
 
Please choose one of the following questions to answer for this week.docx
Please choose one of the following questions to answer for this week.docxPlease choose one of the following questions to answer for this week.docx
Please choose one of the following questions to answer for this week.docx
ajoy21
 
Please check the attachment for my paper.Please add citations to a.docx
Please check the attachment for my paper.Please add citations to a.docxPlease check the attachment for my paper.Please add citations to a.docx
Please check the attachment for my paper.Please add citations to a.docx
ajoy21
 
Please answer to this discussion post. No less than 150 words. Refer.docx
Please answer to this discussion post. No less than 150 words. Refer.docxPlease answer to this discussion post. No less than 150 words. Refer.docx
Please answer to this discussion post. No less than 150 words. Refer.docx
ajoy21
 
Please attach Non-nursing theorist summaries.JigsawExecutive .docx
Please attach Non-nursing theorist summaries.JigsawExecutive .docxPlease attach Non-nursing theorist summaries.JigsawExecutive .docx
Please attach Non-nursing theorist summaries.JigsawExecutive .docx
ajoy21
 
Please answer the question .There is no work count. PLEASE NUMBER .docx
Please answer the question .There is no work count. PLEASE NUMBER .docxPlease answer the question .There is no work count. PLEASE NUMBER .docx
Please answer the question .There is no work count. PLEASE NUMBER .docx
ajoy21
 
Please answer the following questions. Please cite your references..docx
Please answer the following questions. Please cite your references..docxPlease answer the following questions. Please cite your references..docx
Please answer the following questions. Please cite your references..docx
ajoy21
 
Please answer the following questions.1.      1.  Are you or.docx
Please answer the following questions.1.      1.  Are you or.docxPlease answer the following questions.1.      1.  Are you or.docx
Please answer the following questions.1.      1.  Are you or.docx
ajoy21
 
Please answer the following question with 200-300 words.Q. Discu.docx
Please answer the following question with 200-300 words.Q. Discu.docxPlease answer the following question with 200-300 words.Q. Discu.docx
Please answer the following question with 200-300 words.Q. Discu.docx
ajoy21
 
Please answer the following question Why do you think the US ha.docx
Please answer the following question Why do you think the US ha.docxPlease answer the following question Why do you think the US ha.docx
Please answer the following question Why do you think the US ha.docx
ajoy21
 
Please answer the following questions. Define tunneling in the V.docx
Please answer the following questions. Define tunneling in the V.docxPlease answer the following questions. Define tunneling in the V.docx
Please answer the following questions. Define tunneling in the V.docx
ajoy21
 
Please answer the following questions1. How can you stimulate the.docx
Please answer the following questions1. How can you stimulate the.docxPlease answer the following questions1. How can you stimulate the.docx
Please answer the following questions1. How can you stimulate the.docx
ajoy21
 
Please answer the following questions very deeply and presicely .docx
Please answer the following questions very deeply and presicely .docxPlease answer the following questions very deeply and presicely .docx
Please answer the following questions very deeply and presicely .docx
ajoy21
 
Please answer the following questions in an informal 1 ½ - 2-page es.docx
Please answer the following questions in an informal 1 ½ - 2-page es.docxPlease answer the following questions in an informal 1 ½ - 2-page es.docx
Please answer the following questions in an informal 1 ½ - 2-page es.docx
ajoy21
 
Please answer the following questions in a response of 150 to 200 wo.docx
Please answer the following questions in a response of 150 to 200 wo.docxPlease answer the following questions in a response of 150 to 200 wo.docx
Please answer the following questions in a response of 150 to 200 wo.docx
ajoy21
 
Please answer these questions regarding the (TILA) Truth in Lending .docx
Please answer these questions regarding the (TILA) Truth in Lending .docxPlease answer these questions regarding the (TILA) Truth in Lending .docx
Please answer these questions regarding the (TILA) Truth in Lending .docx
ajoy21
 
Please answer the following question pertaining to psychology. Inc.docx
Please answer the following question pertaining to psychology. Inc.docxPlease answer the following question pertaining to psychology. Inc.docx
Please answer the following question pertaining to psychology. Inc.docx
ajoy21
 
Please answer the following questions in a response of 250 to 300 .docx
Please answer the following questions in a response of 250 to 300 .docxPlease answer the following questions in a response of 250 to 300 .docx
Please answer the following questions in a response of 250 to 300 .docx
ajoy21
 
Please answer the three questions completly. I have attached the que.docx
Please answer the three questions completly. I have attached the que.docxPlease answer the three questions completly. I have attached the que.docx
Please answer the three questions completly. I have attached the que.docx
ajoy21
 

More from ajoy21 (20)

Please complete the assignment listed below.Define and explain, us.docx
Please complete the assignment listed below.Define and explain, us.docxPlease complete the assignment listed below.Define and explain, us.docx
Please complete the assignment listed below.Define and explain, us.docx
 
Please cite sources for each question. Do not use the same sources f.docx
Please cite sources for each question. Do not use the same sources f.docxPlease cite sources for each question. Do not use the same sources f.docx
Please cite sources for each question. Do not use the same sources f.docx
 
Please choose one of the following questions to answer for this week.docx
Please choose one of the following questions to answer for this week.docxPlease choose one of the following questions to answer for this week.docx
Please choose one of the following questions to answer for this week.docx
 
Please check the attachment for my paper.Please add citations to a.docx
Please check the attachment for my paper.Please add citations to a.docxPlease check the attachment for my paper.Please add citations to a.docx
Please check the attachment for my paper.Please add citations to a.docx
 
Please answer to this discussion post. No less than 150 words. Refer.docx
Please answer to this discussion post. No less than 150 words. Refer.docxPlease answer to this discussion post. No less than 150 words. Refer.docx
Please answer to this discussion post. No less than 150 words. Refer.docx
 
Please attach Non-nursing theorist summaries.JigsawExecutive .docx
Please attach Non-nursing theorist summaries.JigsawExecutive .docxPlease attach Non-nursing theorist summaries.JigsawExecutive .docx
Please attach Non-nursing theorist summaries.JigsawExecutive .docx
 
Please answer the question .There is no work count. PLEASE NUMBER .docx
Please answer the question .There is no work count. PLEASE NUMBER .docxPlease answer the question .There is no work count. PLEASE NUMBER .docx
Please answer the question .There is no work count. PLEASE NUMBER .docx
 
Please answer the following questions. Please cite your references..docx
Please answer the following questions. Please cite your references..docxPlease answer the following questions. Please cite your references..docx
Please answer the following questions. Please cite your references..docx
 
Please answer the following questions.1.      1.  Are you or.docx
Please answer the following questions.1.      1.  Are you or.docxPlease answer the following questions.1.      1.  Are you or.docx
Please answer the following questions.1.      1.  Are you or.docx
 
Please answer the following question with 200-300 words.Q. Discu.docx
Please answer the following question with 200-300 words.Q. Discu.docxPlease answer the following question with 200-300 words.Q. Discu.docx
Please answer the following question with 200-300 words.Q. Discu.docx
 
Please answer the following question Why do you think the US ha.docx
Please answer the following question Why do you think the US ha.docxPlease answer the following question Why do you think the US ha.docx
Please answer the following question Why do you think the US ha.docx
 
Please answer the following questions. Define tunneling in the V.docx
Please answer the following questions. Define tunneling in the V.docxPlease answer the following questions. Define tunneling in the V.docx
Please answer the following questions. Define tunneling in the V.docx
 
Please answer the following questions1. How can you stimulate the.docx
Please answer the following questions1. How can you stimulate the.docxPlease answer the following questions1. How can you stimulate the.docx
Please answer the following questions1. How can you stimulate the.docx
 
Please answer the following questions very deeply and presicely .docx
Please answer the following questions very deeply and presicely .docxPlease answer the following questions very deeply and presicely .docx
Please answer the following questions very deeply and presicely .docx
 
Please answer the following questions in an informal 1 ½ - 2-page es.docx
Please answer the following questions in an informal 1 ½ - 2-page es.docxPlease answer the following questions in an informal 1 ½ - 2-page es.docx
Please answer the following questions in an informal 1 ½ - 2-page es.docx
 
Please answer the following questions in a response of 150 to 200 wo.docx
Please answer the following questions in a response of 150 to 200 wo.docxPlease answer the following questions in a response of 150 to 200 wo.docx
Please answer the following questions in a response of 150 to 200 wo.docx
 
Please answer these questions regarding the (TILA) Truth in Lending .docx
Please answer these questions regarding the (TILA) Truth in Lending .docxPlease answer these questions regarding the (TILA) Truth in Lending .docx
Please answer these questions regarding the (TILA) Truth in Lending .docx
 
Please answer the following question pertaining to psychology. Inc.docx
Please answer the following question pertaining to psychology. Inc.docxPlease answer the following question pertaining to psychology. Inc.docx
Please answer the following question pertaining to psychology. Inc.docx
 
Please answer the following questions in a response of 250 to 300 .docx
Please answer the following questions in a response of 250 to 300 .docxPlease answer the following questions in a response of 250 to 300 .docx
Please answer the following questions in a response of 250 to 300 .docx
 
Please answer the three questions completly. I have attached the que.docx
Please answer the three questions completly. I have attached the que.docxPlease answer the three questions completly. I have attached the que.docx
Please answer the three questions completly. I have attached the que.docx
 

Recently uploaded

Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Assessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptxAssessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptx
Kavitha Krishnan
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 

Recently uploaded (20)

Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
 
Assessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptxAssessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptx
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 

#includefloat angle, move, scene, roadmove,turn, on=1; int i, st.docx

  • 1. #include float angle, move, scene, roadmove,turn, on=1; int i, start; void init(GLvoid) { glClearColor(0, 0, 0, 0); //set the Background Color BLACK glEnable(GL_DEPTH_TEST); glShadeModel(GL_SMOOTH); // Enable Smooth Shading } void wall() { glRectf(0, 0, 14, 10); } void Stars() { glPointSize(2); glBegin(GL_POINTS); glVertex2f(0,0); glVertex2f(0,0.30); glVertex2f(0.1,0.45); glVertex2f(0,0.65); glVertex2f(0.1,0.85); glEnd(); } void Moon() { glutSolidSphere(.5, 10, 10); } void Tree(){ glPushMatrix(); glTranslatef(4.75,.25,3); //glRotatef(a, 0, 1, 0);
  • 2. glColor3f(0.133333, 0.545098 , 0.133333); glutSolidCone(1.5,2, 10, 2); glPopMatrix(); glPushMatrix(); glTranslatef(4.75,.25,3.9); //glRotatef(a, 0, 1, 0); glColor3f(0.133333, 0.545098 , 0.133333); glutSolidCone(1.5,2, 10, 2); glPopMatrix(); glPushMatrix(); glTranslatef(4.75,.25,4.75); //glRotatef(a, 0, 1, 0); glColor3f(0.133333, 0.545098 , 0.133333); glutSolidCone(1.5,2, 10, 2); glPopMatrix(); glPushMatrix(); glTranslatef(5,-0.6,0); glRotatef(90, 1, 0, 0); glColor3f(0.823529,0.411765,0.117647) ; glRectf(0, 0, -.5, 3); glPopMatrix(); glEnd(); } void groundroad() //GroundRoad { glColor3f(0, 1, 0); glPushMatrix(); glScalef(1, 50, 0); wall(); //Green BackGround //glPopMatrix(); glColor3f(0, 1, 0); //glPushMatrix(); glScalef(1.1, 10, 0); wall(); //Green BackGround glPopMatrix();
  • 3. glPushMatrix(); glColor3f(0, 1, 0); glScalef(-1, 50, 0); wall(); //Green BackGround glPopMatrix(); glTranslatef(5, 0, .01); glPushMatrix(); glScalef(.25, 50, 1); glColor3f(0.411765,0.411765,0.411765); wall(); //Black Road glPopMatrix(); glPushMatrix(); glTranslatef(1.5, -1.3, .01); glColor3f(1, 1, 1); for (i = 0; i < 250; i++) { glTranslatef(0, 2, 0); glRectf(0, 0, .5, 1); //White Bricks on Road } glPopMatrix(); glPushMatrix(); glTranslatef(3.5, -1.3, .01); glColor3f(1, 0.54902, 0); for (i = 0; i < 500; i++) { glTranslatef(0, 1, 0); glRectf(0, 0, .5, 1); //Yellow line on Road } glPopMatrix(); glPushMatrix(); glTranslatef(-.5, -1.3, .01); glColor3f(1, 0.54902, 0); for (i = 0; i < 500; i++) {
  • 4. glTranslatef(0, 1, 0); glRectf(0, 0, .5, 1); //Yellow line on Road } glPopMatrix(); glPushMatrix(); glTranslatef(4, 1.3, -1); glColor3f(1, 0.54902, 0); for (i = 0; i < 30; i++) { glTranslatef(0, 10, 0); Tree(); } glPopMatrix(); glPushMatrix(); glTranslatef(9, 1.3, -1); glColor3f(0.721569, 0.52549, 0.0431373); glRectf(0,0,22,600); glPopMatrix(); glPushMatrix(); glTranslatef(15, -1.3, .01); glColor3f(1, 0.54902, 0); for (i = 0; i < 500; i++) { glTranslatef(0, 1, 0); glRectf(0, 0, .5, 1); //track 1 } glPopMatrix(); glPushMatrix(); glTranslatef(21, -1.3, .01); glColor3f(1, 0.54902, 0); for (i = 0; i < 500; i++) { glTranslatef(0, 1, 0); glRectf(0, 0, .5, 1); //track } glPopMatrix();
  • 5. glPushMatrix(); glTranslatef(19, 20, 2.5); glColor3f(0, 0, 1); glScalef(3, 8, 2.5); glutSolidCube(2); glPopMatrix(); } void House() { glPushMatrix(); glTranslatef(-16,2,2); glColor3f(0.721569,0.52549,0.0431373); glutSolidCube(4); glPushMatrix(); glTranslatef(-27.5,3,1.5); glRotatef(90, 0, 1, 0); glColor3f(1, 1, 1); glRectf(0, 0, .5, 1); glPopMatrix(); glPushMatrix(); glTranslatef(-27.5,1,1.5); glRotatef(90, 0, 1, 0); glColor3f(1, 1, 1); glRectf(0, 0, .5, 1); glPopMatrix(); glPushMatrix(); glTranslatef(-27.5,-1,1.5); glRotatef(90, 0, 1, 0); glColor3f(1, 1, 1); glRectf(0, 0, .5, 1); glPopMatrix(); glPushMatrix(); glTranslatef(-27.5,3,-.5); glRotatef(90, 0, 1, 0);
  • 6. glColor3f(1, 1, 1); glRectf(0, 0, .5, 1); glPopMatrix(); glPushMatrix(); glTranslatef(-27.5,1,-.5); glRotatef(90, 0, 1, 0); glColor3f(1, 1, 1); glRectf(0, 0, .5, 1); glPopMatrix(); glPushMatrix(); glTranslatef(-27.5,-1,-.5); glRotatef(90, 0, 1, 0); glColor3f(1, 1, 1); glRectf(0, 0, .5, 1); glPopMatrix(); glPopMatrix(); glPushMatrix(); glTranslatef(-16,5,2); glColor3f(0.721569,0.52549,0.0431373); glutSolidCube(4); glPopMatrix(); } void truck() { glColor3f(0,0.545098,0.545098 ); glScalef(1, 1, 2); glutSolidCube(1); glTranslatef(0, -.25, .5); glColor3f(0.862745, 0.862745, 0.862745); glutSolidCube(.5); } void train() { glPushMatrix(); glTranslatef(19, 20, 2.5);
  • 7. glColor3f(0, 0, 1); glScalef(3, 8, 2.5); glutSolidCube(2); glPopMatrix(); } void display(void) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); glPushMatrix(); glTranslatef(-4,0.8,-2); glColor3f(1,1,1); Stars(); for (int i =0;i<20;i++){ glTranslatef(0.4,0,0); Stars(); } glPushMatrix(); glTranslatef(-9,3,-4); glColor3f(1,1,1); Moon(); glTranslatef(.2,0,0); glColor3f(0,0,0); Moon(); glPopMatrix(); glPopMatrix(); glTranslatef(-7, -5, -6); glTranslatef(0, 0, roadmove); //Road Movement //glLightfv(GL_LIGHT0, GL_POSITION, position); glRotatef(scene, 0, 1, 0); //Scene Rotation glPushMatrix(); glRotatef(-90, 1, 0, 0);
  • 8. groundroad(); //Ground & Road glPopMatrix(); glPushMatrix(); glRotatef(90, 0, 1, 0); for (int k = 0; k < 20; k++) { glTranslatef(25,0 , 0); House(); //house } glPopMatrix(); glTranslatef(6, 1, 0); glTranslatef(turn, 0, move); glTranslatef(0, 0, on); glRotatef(-180, 1, 0, 0); truck();//truck //train(); if (start==-1) //control from keyboard { if (roadmove < 550) { roadmove = roadmove + .05; //Ground & Road Movement on = on - .055; // Truck Movement glutPostRedisplay(); } else { } }
  • 9. glutSwapBuffers(); } void SpecialInput(int key, int x, int y) { switch (key) { case GLUT_KEY_UP: //Truck Forward move = move - .05; break; case GLUT_KEY_DOWN: //Truck Reverse move += .3; break; case GLUT_KEY_LEFT: //Truck Left Turn turn = turn - .05; break; case GLUT_KEY_RIGHT: //Truck Righ Turn turn = turn + .05; break; } glutPostRedisplay(); } void keyboard(unsigned char key, int x, int y) { switch (key)
  • 10. { case 27://ESC exit(0); break; case 'r': //reset all scene angle = 0; move = 0; scene = 0; roadmove = 0; on = 0; turn = 0; break; case '4': //scene rotation scene = scene + .5; break; case '6': //scene rotation scene = scene - .5; break; case 'w': //strat scene start = -1; break; } glutPostRedisplay(); } void reshape(int w, int h) // Create The Reshape Function (the viewport) { glViewport(0, 0, w, h); glMatrixMode(GL_PROJECTION); // Select The Projection Matrix glLoadIdentity(); // Reset The Projection Matrix if (h == 0) // Calculate The Aspect Ratio Of The Window
  • 11. gluPerspective(80, (float)w, 1.0, 5000.0); else gluPerspective(80, (float)w / (float)h, 1.0, 5000.0); glMatrixMode(GL_MODELVIEW); // Select The Model View Matrix glLoadIdentity(); // Reset The Model View Matrix } int main(int a, char** b) { glutInit(&a, b); glutInitDisplayMode(GLUT_DOUBLE | GLUT_DEPTH |GLUT_RGB); glutInitWindowSize(600,500); //Size of the Window glutInitWindowPosition(80, 80); //Position of the Windows glutCreateWindow("SEMESTER PROJECT"); //Title of the Window init(); glutDisplayFunc(display); //Callback Function glutReshapeFunc(reshape); //Callback Function glutKeyboardFunc(keyboard); glutSpecialFunc(SpecialInput); glutMainLoop(); //Mainloop return 0; } Template tOAsk me anything 12:13 PM 6/26/2016 Solution #include #include int main() { int gd = DETECT, gm; initgraph(&gd, &gm, "C:TCBGI"); setcolor(YELLOW); rectangle(0,30,639,450);
  • 12. settextstyle(SANS_SERIF_FONT,HORIZ_DIR,2); setcolor(WHITE); outtextxy(275,0,"Bar Chart"); setlinestyle(SOLID_LINE,0,2); line(100,420,100,60); line(100,420,600,420); line(90,70,100,60); line(110,70,100,60); line(590,410,600,420); line(590,430,600,420); outtextxy(95,35, "Y"); outtextxy(610,405,"X"); outtextxy(85,415,"O"); setfillstyle(LINE_FILL,BLUE); bar(150,100,200,419); setfillstyle(XHATCH_FILL,RED); bar(225,150,275,419); setfillstyle(WIDE_DOT_FILL,GREEN); bar(300,200,350,419); setfillstyle(INTERLEAVE_FILL,MAGENTA); bar(375,125,425,419); setfillstyle(HATCH_FILL,BROWN); bar(450,175,500,419); getch(); return 0; }