Archive Pages Design$type=blogging

Doll - OpenGL programming using glut

We will going to see OpenGL Programming using Glut by coding a doll in OpenGL C/C++. Full Glut Program with free source code download.

Every Child likes doll, play with it. Every adult used to have as decor item in their collections. In this post we are going to draw a doll with OpenGL Programming using Glut. We will use the c/c++ and opengl glut to draw a beautiful doll.

1. Outline of the Doll

First we will outline how our doll should look like. We are going to draw a simple doll, hence we are not going to have complex attire for it. The doll will have head. without hair - simply bald.  It will have coat and pant as cloths and the black shoes. The coat will be simple with few button fully closed.

The doll should look straight forward. The eye would be more opened liked an egg and eyebrow to be cross not parallel nor it is curve. Colors are choice of programmers, hence if you want you can adjust with it as you want it to be.

OpenGL Programming using Glut

2. Draw Doll in OpenGL

As we finished outlining the doll, so we will go to coding part of it. In this OpenGL Programming using Glut, the shape of doll is code as head first, middle part and then legs.

Face/head is coded using the sphere (gluSphere(gluNewQuadric(),1,100,100);) and put egg like shape with dot on it for eyes. A big line will drawn with high thickness to have the eyebrow. Again same gluSphere(gluNewQuadric() is used for drawing the mouse but radius would be very small. Both left and right, eyes as well as eyebrow is coded separately. All object is drawn using transformation matrix.

The Middle part have neckring which is drawn by the use of glutSolidTorus.  Next is the coat and buttons. The belly coat is drawn by using gluCylinder(gluNewQuadric() and the transformation matrix. There is three button each a small sphere.

Bellycoatbottom is drawn using the gluDisk(gluNewQuadric(),0,.8,30,30);, yeah with matrix. Last is shoes which covered by gluSphere in footright and footleft functions.

3. Rendering

Before we go to the one of the main features let first define the global variable that will define initial camera position and viewing window values. Also it is important to define Initialization values for lighting.

We have defined a function which will render the object to make it look more realistic. It helps in enable depth testing, lightning - Ambient, Diffuse and Specular.

4. User Interaction

One of the important part of this OpenGL Programming using Glut is the user interaction. Here we have both keyboard as well as Mouse interactions. With the help of mouse doll can be move in either of directions. Keyboard interactions is listed below-

GLUT_KEY_UP - move one up scaling
GLUT_KEY_DOWN - move one down scaling
GLUT_KEY_RIGHT- move one step right
GLUT_KEY_LEFT- move one step left
GLUT_KEY_F10 - toggle whole screen
GLUT_KEY_F9 - toggle doll with interaction

5. Final Thought

We are able to draw a computer graphics doll with the help of OpenGL Programming using Glut in C/C++. This program have used the lighting and depth of material which is one of the feature of opengl to give a 3D touch to the objects.

Do download the source code and share your experience thoughts suggestions etc to us via comments. You can also contact us for any help or any other query use our contact form. Happy learning! Happy Coding!.



3D Bi-Cycle 3D Game 3D Laptop 3D Objects 3D Projects 3D Zoo Algorithm Android Aquarium Bellman-Ford Algorithm B├ęzier curves Block Breaker Blockshooting Bucket Sort C# Chess Clock Code Blocks Colors Complex Project Complex Projects Crab Pong Cross Zero Doll DSAV Escapa Fighter Jet First Come First Serve Flag Flag Hoisting flag of usa Fluids Font Demo Games Gear Motion GlutDino Glutplane Graphics Editor iOS iPhone Java Java OpenGL Graphics Programming Light Torus Linked List Ludo Board Game Mancala board games Martyr’s Monument Memory blocks game Memory Game Menu Mickey Mouse Minesweeper Miniature Steam Engine moth Motion Blur MoveLight moving car Moving Ship Multiplex Networking Based Project Nuclear Power Plant Olympic opengl c++ examples OpenGL ES OpenGL Programming OpenGL Tutorial Origami OS Based Projects Paint Paper Folding Particles Drop Path Finding ping pong Pong Game Project Report Projects Report Puzzles qix like Queuqe Random Flowing lines Ray Rigid Body Rings Robot sample c++ opengl code Screen Saver Screen Saver Ship Shadow Cube Shadowfun Shaheed Minar Ship Iceberg Simple Drawing Simple Haloed Lined Wireframe Simple Move Light Simple Project Simulation SNAKE XENZIA GAME Solar system Sorting Space Invaders Sphere Spot Light Swing Stack Stars Taj Mahal The Edge Game Tic Tac Toe Tower of Hanoi Traffic Signal Transformation Triangular Animation Trippy Tutorial water ripple effects Whirlpool
OpenGL Projects: Doll - OpenGL programming using glut
Doll - OpenGL programming using glut
We will going to see OpenGL Programming using Glut by coding a doll in OpenGL C/C++. Full Glut Program with free source code download.
OpenGL Projects
Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago