OpenGL Graphic in C++ — Air Fight

Air Fight - OpenGL C++ graphic
This is a 3D graphic done in C++ using openGL. The cloud clusters are generated randomly within a fixed perimeter. Each cloud cluster itself is composed of randomly generate clouds with a bias, so they line up horizontally. The fire on the plane still in mid-air is composed of overlapping ellipses (quick solution), and tailed using a sine curve. The plane object is placed thrice in the scene with different alignments.

The executable (52K) is also available for download (spacebar to shift viewing angle and ‘q’ to quit). You will also require the this glut library (479K, 4 dll files which go in the same folder as the airfight.exe). The above graphic is available in the following resolutions:

You can view the image it’s different phases:

  • Phase 1 (65 Kb) – The basic plane object with just the wings, fin and cockpit. The Sky is painted using a dull blue gradient in the background. The runway was made using a triangle fading into the horizon and converging lines
  • Phase 2 (75 Kb) – The clouds and runway lights were added. Little bombs were added to the plane wings and the plane object was placed elsewhere in the scene, with different colors.
  • Phase 3 (78 Kb) – The green land was added to liven up the picture. The Hay bails were much closer initially and were produced using a sin^2/cos^2 spherical path, but the effect is lost due to their smaller size. The corner-left plane is firing away at the enemy.