Computer graphics Christmas Scene is a very beautiful project, it is very attractive and this scenario includes a Christmas tree and Christmas gifts and a snowman. Gifts are placed around the tree and the snow man is also moving left and right along with the snowfall. And the tree is decorated with lights and looks very pretty.
Use S/s to start the Christmas scenario simulation.
Use Q/q to quit the Christmas scenario simulation.
Use D/d to show description about the Christmas scenario simulation.
As the name suggests, this project provides a full view of the Christmas party. And this project is built using GLUT libraries, written in C language.
Characters & Decorations- Snow-covered Christmas tree and snowy mountain lights bring the desktop alive. The movement of the snowman is in the loop and does not need to be controlled by the user. Users can control the snowflakes falling feature by using the 'A / a' key from the keyboard. The Christmas tree is beautifully decorated and this project presents a 3-dimensional perspective and a rotating cued rendering.
SNOWMAN CODE
{
glColor3f(0.0,0.0,0.0);
glPushMatrix(); // Eyes
glTranslatef(x,y+0.8,z+0.5);
glutSolidSphere(0.05, 200, 200);
glPopMatrix();
glPushMatrix();
gl(x +0.2,y+0.8,z + 0.5);
glutSolidSphere(0.05, 200, 200);
glPopMatrix();
glColor3d(1, 0, 0); // Nose
glPushMatrix();
glTranslatef(x+ 0.1,y + 0.65,z + 0.5);
glRotatef(-260.0, 1.0, -1.5, 0.0);
glutSlidCone(0.08, 0.2, 10, 2);
glPopMatrix();
glColor3f(1,1,1); // Body Structure
glPushMatrix();
glTranslatef(x, y + 0.1, z );
glutSlidSphere(0.55, 200, 200);
glPopMatrix();
glColor3f(1,1,1);
glPushMatrix();
glTranslatef(x, y - 0.99, z);
glutSolidSphere(0.95, 200, 200);
glPopMatrix();
glColor3f(1,1,1);
glPushMatrix();
glTranslatef(x, y+0.7, z);
glutSolidSphere(0.35, 200, 200);
glPopMatrix();
}
KEYBOARD & MOUSE FUNCTIONS
- Press 's' to start.
- Press 'd' for description.