scene.org File Archive

File download

<root>­/­demos­/­artists­/­adok/gpgl.zip

File size:
10 468 bytes (10.22K)
File date:
2026-03-04 17:29:01
Download count:
all-time: 0

Preview

  • GPgl.exe 10.50K
  • main.cpp 7.61K
  • readme.txt 1.02K
  • window.cpp 3.05K
  • window.h 532B

file_id.diz

GPgl (Genetic Programming with OpenGL)
by Claus-Dieter Volko (Adok/Hugi)

This program is supposed to demonstrate how images could be generated by functions with a tree-like syntax. These functions evolve by means of genetic programming, a metaheurstic technique originally invented by John Koza. The user can control the evolution using the keys 1, 2, 3. Key 1 modifies the list of functions. Key 2 modifies the currently selected function. The more often key 2 is pressed, the more the function is altered. Key 3 selects two random functions and modifies them. The program internally uses 10 variables, among them 2 for the pixel coordinates, 3 for the colors (red, green, blue) and 5 free variables. For each variable the current value is computed by a function. The function can contain standard arithmetic operations (plus, minus, multiply, divide), boolean operations (and, or, xor), sinus, cosinus, and can work with constants and other variables. The images generated have a resolution of 256x256 pixels. Source code is provided.