"Fluid fun with py5 and NumPy"
https://discourse.processing.org/t/fluid-fun-with-py5-and-numpy/47943

Fluid fun with py5 and NumPy
Hello! I felt like sketching this afternoon, so I dusted off my old implementation of Stam’s Real-Time Fluid Dynamics for Games. The original version used pygame and NumPy – turns out porting it to py5 was straightforward. Here’s a screenshot: And here’s the code: import py5 import numpy as np def remap(a, low0, high0, low1, high1): return a * (high1 - low1) / (high0 - low0) def normalize(a): a_min = np.min(a) a_max = np.max(a) return remap(a, a_min, a_max, 0, 1) def ...