Reaction-Diffusion Simulation with pyglet and GLSL

Example:

Requirements:

  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.

当前网速较慢或者你使用的浏览器不支持博客特定功能,请尝试刷新或换用Chrome、Firefox等现代浏览器