Reaction-Diffusion Simulation with pyglet and GLSL



  1. pyglet for the UI and OpenGL environment.
  2. ffmpeg for rendering the animation to video files.

This project is motivated by pmneila's javascript project. The core part of the code are the two GLSL shaders reaction.frag and render.frag. The python scripts have nothing to do with the "reaction diffusion model", they are merely for creating the UI and compiling and communicating with the GLSL code.

To understand the code you need to have some background knowledge of the OpenGL rendering pipeline and the OpenGL shading language. Beginners may start by learning how to draw a triangle on the screen with shader programs and then move on to more advanced topics like framebuffers and projective transformations.