Tuesday, January 27, 2015

Draw Squares in OpenGL with Size Option and Sound

 Squares can be easily easily drawn in OpenGL, using the free open computer graphics libraries.  OpenGL graphics had alot of potential ways to do things. You can go with traditional Method or choose better innovative one.

Today we are going to see a computer graphics c++ program in which we are going to draw squares. Previously we have seen how to draw a circle in OpenGL, now it time to draw square in OpenGL. The program which we are going to see not only draw square but allow to increase or decrease the size of the squares. There is an additional component added to it, that the sound. The squares are formed with left click of mouse while right click give option for increment/decrement size. Sound is auto play when ever squares are formed.

Program is not much lengthy and also very much easy to understand. There is draw_square function in which the functionality  has been defined. It also contain the codes for the sound play. Rest of the program contains the same hello world stuffs (primary codes).

If anyone have question with respect to, how to make changes in the code, try to post it with your comments. Don't forget to mention how you like this post. Also tell how you can use these codes to develop your own project.

Download

Tuesday, December 30, 2014

Red Blue Stereo Mini Project Computer graphics

Today we are going to see a  Mini Project Computer graphics in OpenGL that is named as Red Blue Stereo.

This is demo of stereo for red/blue filter stereo glasses. In this Mini Project Computer graphics, we are showing the red/blue filter, the effect that can be seen via glasses. Even the people with some defect in their eye able to view some objects in red/blue via their left or right eye.



This mini projects Computer graphics in C consist of mainly these objects -
  1. Dodecahedron
  2. Icosahedron
  3. Teapot
  4. Solar system
These objects can be viewed with switching of either in Mono or Stereo Views. There is right mouse attached to perform the action with menu come out as right mouse button clicked. The solar system consist of only earth and sun. More planets can be added to it if one wish with addition of other object in the code where the earth and sun orbit is defined.

Saturday, December 27, 2014

The Pong game in Computer Graphics Projects

We have seen many game in Computer Graphics Projects using OpenGL graphics library for the VTU 6th Sem  mini project. Many of those game has used the potential of computer graphics. There are still more to add. Today we are going to see another potential game build with the open graphics library. The use of Glut (free glut) has charmed the graphics era taking directly on the Direct X. Use of interaction of user with mouse and keyboard in general is base of any interactive game. Today we are going to see another great interactive arcade game.



The Project is written in the C++ witht good use of OOP Concept.In this project user has the option of interactive with the keyword functionality. There is key for start, moving up and down (different for each side). Most important part of this project is that this game can be played by two people. Both the VTU 6th sem partners can chill out playing the pong game while having their Computer Graphics Projects completed. Isn't it good to have fun while learning.

Rule of the Game : Player have to avoid the ball touching wall or in term of Wikipedia return the ball to other without fail. Score determines the user positions in the game. Player with high score is in winning condition. To win the game player must score 8 points before the opponent.

Keyboard interaction :

 'q' : left up
 'a' : left down
 'z' : left ball releases/speed
 'p' : right up
 'l' :  right down
 'm' : right ball releases/speed

The winning points and keyboard functions can be change via program code.

This is finest premium Computer Graphics Projects, so there is a minimal charge for it. To buy this projects Call 8147656011 or Contact via Contact us Form.

Monday, December 22, 2014

Train Simulator C++ opengl program

Train is important part of Indian transportation system. Today we are going to have simulation of Train in our cg opengl program.

The Train Simulator C++ opengl program is show the trains running over the track. We have already seen the running train project but it was not that much powerful as it should be. Here we have much better version of Computer graphics representation of Trains in OpenGL. We have much improved Train Simulator C++ opengl program where the Train Coach are not so small but big one. The Engine is quite large as well as the wheel and track. Most important we have electric engine simulated.


In the image you can clearly see the Train Simulator C++ opengl program is made of many boxes or rectangles while wheel is circular.The two parallel line have the electricity flow for the train running, we have electric engine here.

Let talk about the code prospective. The code written in c++ is simple, we have functions for all the parts - trains, electric lines, wheels and the track. All the code combined in the display to  have the Train Simulator C++ opengl program.

Tuesday, December 16, 2014

Opengl Source Code Ship Iceberg Collision

There are many interest events happened in past. One of them was tragedy of Titanic. The Ship Iceberg Collision led to shrink of huge big ship along with many crew members and passenger. Based on this we are giving Opengl Source Code for Ship Iceberg Collision. This mini projects in computer graphics going to demo the accident of collision of ship with iceberg.


In Previous posts we have shown opengl programs for Solar System, Taj Mahal, Traffic Signals, Networking base projects, some study based projects.There were Opengl Source Code for robots but for moving trains, nuclear power plants, Zoo etc. We have shown story related program like - story of hare and tortoise in computer graphics. But is something related to a real life event which was not shown earlier.

The Titanic Ship (RMS Titanic) was a large ship on 15 April 1912 Shrink due to collision with iceberg. This 269 m ship weighing 52,310 tons on it's maiden voyage scheduled to go from Southampton to New York City. The Ship shrink and around 70% of people we lost. This opengl programs shows how collision of ship with iceberg lead to shrinking.

In this graphics project there is simple ship and a large iceberg. The ship move forward automatically, collides with iceberg and shrink stateway. Though it should contain some passenger in it but for simplicity, it was avoided. There is no functionality added to it with either keyboard or mouse but you can edit Opengl Source Code to adjust a according to your's. 

The only interaction added to the project is the front page where, HTML button is placed, clicking on it will open next screen. It is similar to the opening of a web page clicking on a button. Try Modify it and make more complicate as well as interactive, tell us and publish it with your name.

Download the Opengl Source Code for this project.