Fluids
This is a fluids simulation application for the iPhone (and of course the iPod Touch). The iPhone is a brilliant device for this kind of application because you get instant feedback and nice interaction using the multitouch screen and inbuilt accelerometer. Drag your finger across the screen to inject new liquid and/or stir around what is already there. Tilt the device to make the liquid react to gravity.
You can load your own images (or take new ones using the camera) to use as the base texture of the fluid. You can also save out an image of the fluid whenever you fancy!

Go to "Fluids" in the App Store!


There are lots of customization available using all the parameters and settings. This is a list of what you can control:
  • Mode selector: This selects between the four different modes which are "Run sim", "Emitters", "Forces" and "Walls" all explained below:
    • "Run sim" is the mode/tool to actually run the simulation. While doing this you can inject densities and apply forces in the fluids box by dragging with your finger(s) directly on the screen. To change the amount of fluid injected you got the "Inject amount" slider at the bottom left on the screen. If you want to inject negative densities you have to switch the "Negative densities" switch to on in the "Settings" section of the application (click the cog wheel on the right side of the parameter area). To change the amount of forces applied to the fluids drag the slider at the bottom in the middle named "Forces amount". You can clear the current simulation from any fluids any time by shaking the iPhone.
    • "Emitters" is the mode to choose if you want to edit the constant emitters, i.e. changing how fluid is constantly injected while running the simulation. While in "Emitters" mode you have some specific tools available which are "Paint", "Erase" and "Reset". These are quite self explanatory by their names. Activate "Paint" to be able to draw new emitters with your finger(s). Activate "Erase" to draw where to reset the emission. Click the "Reset" button to reset the whole fluids box from emitters. You can also reset the emitters by shaking the iPhone while you are in the "Emitters" mode.
    • "Forces" is the mode to choose if you want to edit the constant forces, i.e. changing what forces are constantly applied to the fluids while running the simulation. While in "Forces" mode you have some specific tools available which are "Edit", "Erase" and "Reset". These are quite self explanatory by their names. Activate "Edit" to be able to drag out new forces to be applied. The strength and direction of the forces added/edited are determined by how you drag with your finger(s) across the screen. If you drag it faster you add a stronger force which is shown by a longer vector/line. This is also modulated/controlled by the current chosen "Force amount" slider. The starting point of the force vector/line is drawn in red and the and in yellow so you easily can determine the direction. Activate "Erase" to drag where to reset the forces. Click the "Reset" button to reset the whole fluids box from forces. You can also reset the forces by shaking the iPhone while you are in the "Forces" mode.
    • "Walls" is the mode to choose if you want to edit the walls, i.e. editing the collision objects inside the fluids box. While in "Walls" mode you have some specific tools available which are "Paint", "Erase" and "Reset". These are quite self explanatory by their names. Activate "Paint" to be able to draw new walls to be inserted. Activate "Erase" to draw where to reset the walls. Click the "Reset" button to reset the whole fluids box from walls. You can also reset the walls by shaking the iPhone while you are in the "Walls" mode.
  • "Density amount" slider. This slider changes the amount of density that is going to be injected when dragging with your finger(s) while running the simulation. If you want to inject negative densities you have to switch the "Negative densities" switch to on in the "Settings" section of the application (click the cog wheel on the right side of the parameter area). If you are injecting negative densities the handle on this slider will turn red as an indicator. This slider will also affect how strong/intense new constant emitters are going to be when you add them.
  • "Force amount" slider. This slider changes the strength of forces that is going to be applied when dragging with your finger(s) while running the simulation. This slider will also affect how strong new constant forces are going to be when you add them.
  • "Load" image button. Click this button to either load a new image from the library to set as the density for the fluids. You can also use the camera to take a new image, load a test square or purple density or clear the screen from any existing fluids (choose "black" to clear). You can also clear the current simulation from any fluids by shaking the iPhone.
  • "Save" image button. Click this button at any time while the simulation is running or while you are in "Emitters" mode. This saves an image of the current fluids in your image library on the iPhone. You can then use that image to load it as fluids while running the "Fluids" application, or simply use it for whatever you fancy be it as a wallpaper or e-mailing it to a friend.
  • "Settings" cog wheel icon. Click this icon to access the settings. Below is a brief description of what each of the controls do:
    • "Segments": Sets the resolution of the fluids box. Higher resolution obviously uses more calculation powers and will hence be slower. Using a 3GS at around 120x120 runs very smoothly for me. Using earlier versions of the iPhone will need lower resolutions to run fast and smoothly. Changing the resolution will reset all the current forces, emitters, constant applied forces and walls/collision objects. This is the only setting that does this, so you are free to change all the others all the time while playing with the simulation.
    • "Drawing method": Choose between either "Points" or "Triangles". This changes the way graphics is drawn using the OpenGL graphics engine. Points is usually faster, but do try both to test the performance on your device in the current resolution that you've chosen.
    • "Color R,G,B": Sets the color for injecting fluids while running the simulation but also the color for adding emitters.
    • "Inject negative" switch. Turn this "on" if you want to inject negative fluid into the simulation instead. This would be one way of bringing an overfilled fluids box back into range (when you've injected too much fluids so it's only showing white...).
    • "Keep blackpoint" switch. This is another automatic way of keeping some details when injecting loads of fluids. It will fade the fluids down so there is always details around the black point, i.e. zero. Sometimes this can be hard to see because that only little detail might be in the edge somewhere... You might want to enable "Fade fluids" below instead.
    • "Fade fluids" is the fastest way of bringing your fluids simulation into range or keeping it from getting over filled. It will constantly fade out the fluid content over time. If you're not injecting any fluids at all the fluids box will soon be back to empty/black. You can use emitters to automatically inject fluids if you want to have a constant added flow of fluids.
    • "Fade amount" slider. Sets the speed of the fade out when the "Fade fluids" switch discussed above is turned "on". Low slider values (to the left) fade the fluids slowly and high slider values (to the right) fade the fluids quickly.
    • "Accelerometer" switch. Turn this switch on if you want to use the iPhone's in-built accelerometer to apply gravity to your fluids. You can then tilt the iPhone around to kind of pour your fluids around the screen!
Go to "Fluids" in the App Store!


Here are a few more example images created with the "Fluids" application: