LIFE_OPENGL
OpenGL version of "The Game of Life"


LIFE_OPENGL, a C++ program which sets up "The Game of Life" and allows a user to watch as it evolves, displaying the game using opengl().

The game begins with the user specifying the number of rows and columns, as well as the wrap around option (1 = wrap around, 0 = no.) These values can be command line arguments.

A grid of gray squares is presented, and the user can set any of the squares to be "alive" by clicking there. Once the squares have been initialized, the user can step through the phases of "life", by pressing return. At any time, the user may change the status of a square by clicking on it.

If the board is 'wrap around', then some information is passed between the first and last columns, and first and last rows.

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Languages:

LIFE_OPENGL is available in a C version and a C++ version.

Related Data and Programs:

CAUSTIC_OPENGL, a C++ program which computes a caustic curve and displays it using OpenGL.

FERN_OPENGL, a C++ program which uses OpenGL to display the Barnsley fractal fern.

LIFE_OPENGL, a C++ program which uses OpenGL to display the evolution of John Conway's "Game of Life", by Simon Green.

LISSAJOUS_OPENGL, a C++ program which computes a Lissajous figure and displays it using OpenGL.

MINESWEEPER, a C++ program which is a text-based implementation of the Minesweeper game.

opengl_test, C++ codes which illustrate the use of the OpenGL graphics library;

POLYGONAL_SURFACE_DISPLAY_OPENGL, a C++ program which displays a surface in 3D described as a set of polygons, using OpenGL.

ROTATING_CUBE_DISPLAY_OPENGL, a C++ program which displays a rotating color cube in 3D, using OpenGL;

SCREENSHOT_OPENGL, a C++ program which shows how a program using the OpenGL graphics library can save a screenshot of the graphics being displayed.

SPHERE_XYZ_DISPLAY_OPENGL, a C++ program which reads XYZ information defining points in 3D, and displays a unit sphere and the points, using OpenGL.

TRI_SURFACE_DISPLAY_OPENGL, a C++ program which displays the 3D graphics information in a TRI_SURFACE file using OpenGL.

TRIANGULATION_DISPLAY_OPENGL, a C++ program which reads files defining a triangulation and displays an image using Open GL.

XYF_DISPLAY_OPENGL, a C++ program which reads XYF information defining points and faces in 2D, and displays an image using OpenGL.

XYZ_DISPLAY_OPENGL, a C++ program which reads an XYZ file of 3D point coordinates, and displays an image of those points using OpenGL.

XYZF_DISPLAY_OPENGL, a C++ program which reads XYZF information defining points and faces in 3D, and displays an image in a MATLAB graphics window.

XYZL_DISPLAY_OPENGL, a C++ program which reads XYZL information defining points and lines in 3D, and displays an image in a MATLAB graphics window.

Reference:

  1. Edward Angel,
    Interactive Computer Graphics, a Top-Down Approach with OpenGL,
    Addison-Wesley, 2000,
    ISBN: 0-201-38597-X,
    LC: T385.A514.
  2. Martin Gardner,
    Mathematical Games: The Fantastic Combinations of John Conway's new solitaire game "Life",
    Scientific American,
    Volume 223, Number 4, October 1970, pages 120-123.

Source Code:


Last revised on 25 March 2020.