Tuesday, July 15, 2014

OpenGL Project on Binary Tree

In C/C++ Binary Tree is one of the tree data structure in which each node has at most two children. These data structure has two child -right node (right child) and left node(left child). In a binary tree, the degree of each node can be at most two. You can read more about binary tree on wikipedia.

As we have different operation with binary tree in c/c++, same operations can be done as demo in this projects. This OpenGL Project on Binary Tree, the elements are taken as input from the user which then form the Binary Tree according to the rule. See the image below which show how the a binary tree formed with sample input.

OpenGL Project on Binary Tree

How the Project works? It's the big question for all. It used the structures with 3 nodes input -left, right and parent. The structure also has data as the element for that very node. The input is taken from the user using the primary cin function in the console. The input is recorded and it is arranged in the order of the rules of binary tree. One condition put in this project to determine the termination is that last input should be 0.

The OpenGL Project on Binary Tree

Download the Project

Wednesday, July 2, 2014

New graphics editor Opengl mini Projects

We came across with graphics editor Opengl mini Projects in our earlier post. In this post we are going to see new graphics editor project. It is similar to in work with the previous project but an advance version. It is also a replica of MS paint provides many options that are not in the previous projects like - Triangle, Square, Cricle, Parallelepiped,Pencil, Ellipse etc. These extra option like Triangle standalone draw the figure so you need not to work on the line most of the time, one click figure, thus saving the time.

New graphics editor Opengl mini Projects

Before we go on to the functionality let's clear about the few feature of this Opengl mini Projects.

1. The whole application has three user interface block - first the figures selectors (tools), second draw panel, third and last the color panel for selecting the specific color.
2. There are range of figures or tools to choose - LINE, TRIANGLE, SQUARE, ERASER, CIRCLE, EXIT, CCTRIANGLE, CCSQUARE, CYLINDER, BULLET, PARALLELEPIPED, SPRAY, MESH, TEXT, PENCIL, BRUSH, ELLIPSE, CLEAR. All these tools are having functionality as per their name.
3. The TEXT tool allows to have text typed rather than drawing it. There is no option for font family and sizes.
4. The color option having many shades to choose for the drawing. The only thing that lack is the color eavesdropping.
5. In the Draw panel we can see different shapes that can be drawn there by moving the mouse with the tools selected in appropriated color.
6. The last Exit button in the tools allows to close the program.

This Opengl mini Projects uses the important glut functions, that I am going to discuss here. The function are - glutMotionFunc() and glutPassiveMotionFunc(). These functions provides for the motion detection of mouse.It is similar like we detect the mouse click with glutMouseFunc(). The glutMotionFunc() detects the active motion (mouse is moved and button is pressed) while the glutPassiveMotionFunc() detects passive motion (mouse is moved but button is not pressed).

The signatures for the GLUT functions are as follows: 

void glutMotionFunc(void (*func) (int x,int y)); 
void glutPassiveMotionFunc(void (*func) (int x, int y)); 

Parameters: func - the function that will be responsible for the respective type of motion. 

The parameters for the motion processing function are the (x,y) coordinates of the mouse relatively to the upper left corner of the window's client area.

The Mouse click and motion are the major functionality of the project while we have figure predefined with primitive calls. Color selection and display uses the array. Keyboard function for entering the text when text tool is selected. There are whole bunch of things there. 

How you like this project? Download the source code of the project and do comments about it in the comment box.

Download Advance graphics editor Opengl mini Projects

Friday, June 27, 2014

Getting Started with OpenGL ES for Android

Earlier We are Focusing on Small Application based on OpenGL, Now we will go for the OpenGL ES. It is industry used graphics library. Today we would Getting Started with OpenGL ES for Android. As we all know Android is getting more and more important day by day, as we see new Android L from Google I/O. Graphics is important for Android as we have so many apps on it. Get started with OpenGL ES graphics library learn how to use it in Android.

Setting up OpenGL ES For Android

You can also make sure no one install the application from Google Play on a device not supporting OpenGL ES 2.0 by adding a uses-feature in the AndroidManifest.xml.

<uses-feature android:glEsVersion="0x00020000"  android:required="true" />

Updating Soon

Monday, June 9, 2014

Computer Graphics Projects On Moving Ship

Have you ever think about the Voyage? Get the Computer Graphics Projects On Moving Ship and sail one yourself.

In this post we are going to talk about the new project that simple easier as well little tricky. It's about the ship, the moving ship. Earlier post we had already have so many project that was based on principles motion. Most likely and closely was the traffic signal where everything was just about motion of vehicles. But the most important Computer Graphics Projects was on running train. Why recalling it? Because it resembles this very project. In running train there was movement of train and here it's about the Ship.

Features of  Computer Graphics Projects On Moving Ship

  • This Opengl Project is simple, easy to code and understand
  • The important part of the project that is tricky is the water and the ship drawing.
  • Next Difficult is moving the entire ship from one direction to another.
  • It has keyboard functionality of right and left arrow key which move front and back respectively. 
  • No mouse function as it not required.

What extra be added to Moving Ship Project?

Student can add many good feature to this project and make it more interesting and interactive. Since we have only keyboard function for right and left arrow, other keyboard functionality can be added to make it funnier like up and down arrow (move in air not in water).

Add keyword function to change the colors of the ships. Also add sound as ship moves. Sound of water can also be added. Adding crew and passenger also make it more realistic. On this Computer Graphics Projects On Moving Ship, Mouse function can be added to move the ship in the direction of mouse when the cursor is move in some particular direction. The ship follows the cursor like this it can be made. 

There are many creative things that can be added to this project. You students can make it more useful and interesting. Try apply you mind, create new project with it, share with us publish in your own name. Put Your comment and let how you like this.

Download Moving Ship Computer graphics Source code free.

Sunday, May 25, 2014

Formula One Racing Car Opengl Projects

One of the best thing to do in the Computer Graphics to develop a game, Formula One Racing Car is one to start. Everybody had heard about the Formula One Racing, it has high impact on people's entertainment. Most of the people like to see the fast running sports car. Michael Schumacher is one of the famous person in the Formula One, all of you may know him.

We need to learn Computer graphics to show some good graphics applications as well as some utilities for animation, games etc. Opengl computer graphics as per we read in VTU  6th sem syllabus, is very key to get in the touch with these things. It is starting step, so one need to go beyond it to become a graphics developer it would be key to start here. As we are talking today about the Car Racing games in OpenGL Projects, it not easy to go. I found some one had it built it in his own way.This may not be so complex or user friendly but quite good to start at this stage. If you go further OpenGL ES, which used in Android/iOS app development helps you alot. So my idea from this very project is to keep on learning and may be in future this could be a better achievement in your career to get you a high over others.

Coming to the project, this is a good car racing game like Formula one. Here you will see the car like of Formula one car with cylinder, the racing track of formula one. This project has few different view to look on the race.