Computer graphics 3D Children's Park is a very simple and attractive project. The park has brown borders, their own canteen inside the floor and their table and chair inside the canteen with their food and drinking facilities. The canteen is in the center of the playground and is a complete play area around the canteen and there are many trees around the grounds and this project is very beautiful and looks like a real children's park. The park includes a balloon man, swings, playground, slides, seesaw etc. You can view the park in all directions so it is named 3D Park.
You can view the complete park my moving all over the ground and also you can move inside the canteen and view then easily using the arrow keys from the keyboard.
Use Escape key from the keyboard to quit and come out.
BALLOON MAN CODE
{
glPushMatrix();
glColor3f(0.92f, 0.12f, 0.6f);
// Draw Body
glTranslatef(-30.0f ,4.1f, 15.0f);
glutSolidSphere(4.0f,20,20);
// Draw Head
glColor3f(0.89f, 0.47f, 0.37f);
glTranslatef(0.0f, 5.5f, 0.0f);
glutSolidSphere(2.0f,20,20);
// Draw Eyes and nose
glPushMatrix();
glRotatef(50,0,1,0);
glColor3f(0.0f,0.0f,0.0f);
glTranslatef(0.6f, 0.70f, 1.8f);
GLdouble plane []= {0, 0, 1, 0};
glClipPlane(GL_CLIP_PLANE0, plane);
glEnable(GL_CLIP_PLANE0);
glutSolidSphere(0.5f,10,10);
glDisable(GL_CLIP_PLANE0);
glTranslatef(-1.2f,1f);
glEnable(GL_CLIP_PLANE0);
glutSolidSphere(0.5f,10,10);
glDisable(GL_CLIP_PLE0);
glTranslatef(0.6f, -1.3f, 0.0f);
glColor3f(1,0,0);
glutSolidSphere(0.8f,10,10);
glPopMatrix();
//draw ears
glRotatef(50,0,1,0);
glColor3f(0.0f, 0.0f, 0.0f);
glTranslatef(-1.3f, 1.4f, 0.9f);
glutSolidSphere(0.5f,20,20);
glTranslatef(2.5f, 0.2f, 0.0f);
glutSolidSphere(0.5f,20,20);
glPopMatrix();
}
KEYBOARD & MOUSE FUNCTIONS
- Use arrow keys to view park.
- Use ^ key to move front.
- Use v key to move back.
- Use <- key to move left.
- Use -> key to move right.