Closed fsencinas closed 5 years ago
He has already done this in coding challenge 102. It is not very complex and doesn't go in depth on gravity, viscosity etc. though.
Yes, water ripples... ... but I think in a more advanced concept of fluid mechanics simulations rather than effects: fill a bottle (or a bitmap mask), rotations (mobile gyroscopes and sensors), sparks, bitmap masking with collisions, vector color map...
The aim maybe is to learn from the basics and then scale, deconstruct simplified Navier-Stokes, 2d Lattice Boltzmann, etc. And I think it fill quite good this gap in the series "The Nature of Code".
Maybe a lib like liquidfun could be used, but documentation is poor, there is no C++ to js/Java (or p5/processing) lookup reference. LiquidFun processing also lacks of reference and the didactic approach would be lost.
Hoping to attempt this soon! Closing this one, let's continue the discussion in #178!
What about a Challenge or Nature of Code extension series about pure 2D fluid dynamics? It would be also interesting the ability to interact with loadable image bitmap masks (black/white or alpha) as constrains, bodies force resistance, as well as object fluid filling (open closed), vector fields and gravity, viscosity, temp color gradients...
starting from simple to complex