Onsen, or Fluid GPU-IO

Today I travelled from Osaka to Kinosaki Onsen, a town 3 hours northwest by train from Osaka and Kyoto, not too far from the coast. It is a well known village full of onsen, thermal baths rich in minerals from the active geothermals present in a lot of the land in Japan.

One of these things that you’ll always see us creative coders do from time to time is particle simulations, and one of the most interesting (and sometimes complex) kinds of particle simulations are fluid simulations. And it is not a stretch, but a fluid thought (😜) to think of a homage in the shape of a fluid simulation inspired in these many onsen here.

The GPU-IO part of the name refers to a library that was used to perform high-speed computations of the fluids using the GPU and intermediate textures, called GPU-IO, by Amanda Ghassaei.

My remix changed these:

  • Changed colors to become more water-adjacent (and especially these mineral-rich almost milky-white waters in the onsens I visited);
  • Changed trail length to look more like streams than the original iron-filing-like short trails;
  • Removed some code that sets up screenshot and video captures, which are not necessary;
  • Fixed the touch handling so that it actually works on touch devices (phones, tablets).

My version:

Carlos’s original, interactable only through mouse input:

Musical inspiration: