Today, I started this new experiment of making things look fluid. The problem with fluid simulations is that they take a lot of computation and requires over-the-top mathematics which I am not familiar with. Thus I started making program that would simply make things look fluid, with simplest computation possible. My AVS preset making skills finally paid off, and I was able to incorporate some fluidity in my screen, as you can see in the video,
This Processing sketch (Program) makes this circles look like parts of an viscous somewhat like electrically charged fluid, with the mouse cursor be a controlled electrode. It was fun to code, tweaked the functions and the parameters to make the whole thing look nice and perfect in my computer. Different computer will give differently timed outputs as the program is not constrained with time. It will run independently on the systems’ resources.
The sketch can be downloaded from here (Fluidity.rar). I have this bad habit of not commenting while coding, and be too lazy for commenting in the end. This is my first processing sketch where I used custom classes for better coding. I found out that with classes I can make stuff with significantly less complex code, obviously at the cost of performance I guess.
It would be better if I could do this with OpenFrameworks, would get a lot more speed. I will do that someday, but for now I am satisfied with Processing. Its’ built in random number generator. I will further enhance the fluid function that drives the fluid mechanics of the circles and maybe able to get a nicer effect of fluid. Also I would like to use Computer Vision to interact with this fluid with webcams and hands.