flood_opengl


flood_opengl, a C code which demonstrates the idea of flooding, that is, filling one region of an image with a color, using OpenGL.

The program begins by displaying an image of a white background upon which are a series of wavy black lines. If the user clicks the mouse in a given region, a random color is chosen, and the entire region is filled with that color. That's it!

Licensing:

The information on this web page is distributed under the MIT license.

Languages:

flood_opengl is available in a C version.

Related Data and Programs:

life_opengl, a C code which simulates a version of John Conway's "Game of Life", displaying the results using OpenGL.

lissajous, a C code which displays a Lissajous figure, of the form x = sin ( a1 t + b1 ), y = sin ( a2 t + b2 ).

opengl_test, a C code which uses opengl() for graphics;

Author:

Art Wetzel

Reference:

Source Code:


Last revised on 24 March 2008.