[APP][Updated] Fleya v2.9.8 - realtime fluid dynamics for Android

Search This thread

mirceanis

Retired Recognized Developer
Dec 14, 2009
22
28
Fleya is a FREE realtime fluid simulation for your Android phone.
But you don't have to be a physics specialist or an engineer to enjoy it.
Just swipe your finger across the screen to see why.

You can find it in the Android Market as "Fleya", or scan the QR code at the bottom of this post.
The app is also available on SlideMe and YAAM.

Main features:

  • Awesome fluid engine
  • Sensitive to accelerometer
  • Multi-touch (the code can interpret 20 fingers on the screen but it depends on the hardware capabilities of your phone)
  • Save images to SD, instantly available in image gallery
  • Option to choose simulation resolution and accuracy (higher settings mean slower simulation though)
  • Ability to choose your own colors as well as built in color presets

Tech notes:
The fluid engine is written in native code. It's probably the fastest engine currently on the market (please correct me if I'm wrong). A lot of work went into optimizations and now it's about 20 to 30 times faster than it used to be (I started with the theoretical code).
The concept is this:
Your screen turns into a box of 2D "smoke". You inject fluid with your fingers and when your fingers move, the fluid gets agitated. The fluid is colored according to it's temperature and you can choose 5 colors for the temperature scale gradient.
Temperature also influences the fluid when combined with the accelerometer through the Gravity setting. Hot fluids go up, cold fluids go down.
There are 3 fluid presets that ignore temperature and are colored according to density (Smoke, Ink and Cloud). The difference is in the interaction with the accelerometer. They are not pushed up or down according to the static orientation of the phone. They only react to sudden changes in orientation when the gravity setting is turned up.

Feedback:
I have a ton of other features fighting for attention in my head but very little time to implement them. I try my best but your suggestions would really help prioritize them.
For any comments, suggestions or questions, please leave a comment or send an email.
With your help, the best is yet to come.
Check out the official site at fixedpointcode.blogspot.com or find Fleya on facebook.
You can also use this moderator page to submit ideas or vote on other ideas:
http://www.google.com/moderator/#16/e=8bcb1

Support:
This app is totally free and I would like to keep it that way, so please don't complain about the ads. I have made them as unobrusive as possible and they use very little bandwidth.
You see, I have this dream where I could use all my time to build cool free apps and still be able to eat. I implemented ads as a means for you to show your appreciation at no cost.

If you like my work and would like to see more interesting apps support me with good comments and high in the market and recommending the app to your friends or in blogs, tweets and forums.
If you really really like it, donate either here on XDA or on the official site.
If you don't like it, that's just as fine as you can either ignore it or comment and help me improve my work.

Preview:
Check out these pictures for a preview. You can make your own using Fleya :)
You HAVE to see it running because pictures are worth nothing compared to the live action!

fleya%20%289%29.png
fleya%20%283%29.png
fleya%20%2821%29.png
fleya%20%2812%29.png
fleya%20%2815%29.png

fleya%20%2824%29.png
fleya%20%282%29.png
fleya%20%284%29.png
Fleya_0009.png
Fleya_0042.png

Fleya_0053.png
Fleya_0078.png
Fleya_0088.png
Fleya_0080.png
Fleya_0106.png

devil.png
cub.png
custom%252520colors.png


Also, I have never seen it running on an Android Tablet so, if you have any, please tell me how it runs or, better yet, post a video on youtube and share a link.
Update:
XDA user TheGrammarFreak has shared this YouTube video of Fleya on a Galaxy Tab. Thank you very much.

Credits:
  • Jos Stam - for a very nice paper on numerical simulation of fluid dynamics in real-time (http://www.dgp.toronto.edu/people/stam/reality/Research/pdf/GDC03.pdf).
  • The worldwide android community - for posting lots of tutorials and allowing me to go from noob android developer to Android market in just a couple of weeks.
  • My girlfriend - for allowing me some spare time to build this app
  • My boss - for not noticing my working on personal projects during company time

Download:
QRcode_image.php.png
 
Last edited:

secondskin

Senior Member
Oct 16, 2009
420
79
Pennsylvania
This is really neat! Is there any possibility of integrating this into a live wallpaper? That would be bad ass! It could function the same as now with touch. I know there are live wallpapers like Plasma and such but they're constantly moving and don't react to touch or look as great as this.
Sent from my PC36100 using XDA App
 

beardedspoooon

Senior Member
Sep 5, 2010
462
213
5 stars for you! Would make for an awesome live wallpaper.

Would also be cool if the ones like "hot and cold" had 2 point multitouch going on.

Sent from my Droid using XDA App
 
Last edited:
  • Like
Reactions: mirceanis

rosenbaa29

Senior Member
Jan 30, 2011
259
22
Chicago, IL
Great App!

Great App! For some reason, its addicting. lol. One of those apps where there will always be a situation that pops up where Fleya would be useful, for us math and science nerds. Thanks for the post!
 
  • Like
Reactions: mirceanis

Auditorex

New member
Jun 10, 2010
4
0
5 stars!
Would be awesome for this to be a live wallpaper.

Would also be cool if the ones like "hot and cold" had 2 point multitouch going on also.
 

initialjdg

Member
Sep 23, 2010
21
2
pretty cool, after a few minutes I tried using two point touch... would probably make it significantly more intensive to program.

thanks for making it, puts a grin on my face
 
  • Like
Reactions: mirceanis

mirceanis

Retired Recognized Developer
Dec 14, 2009
22
28
Thanks for the great replies

Wow, quick replies. Thank you all for the promptness and great ratings.

Everything you just said has been considered and will most probably be implemented. Let's take it feature by feature and see when.

Multitouch
This was a feature that was planned from the beginning but I wanted to target Android 1.6 too so no multitouch there. So I decided to build the app with all the rest of the features that I had planned, make it into a working and fun app and then migrate to Android 2.1+. I know I could have made it run on both but I didn't want to sacrifice any more processing power for it from the start. My thinking was...make it run as fast as you can then add features.
I'll be making multitouch my first priority since I've seen a lot of people say why can't I use more fingers?
I'm still unsure if it will be limited to 2 point touch or as many as the phone supports.

Color Wheel
This has most definitely been considered. In fact, the first stable version I uploaded to my phone supported 16 million colors. It simulated 3 fluid densities, the Red, the Green and the Blue so it supported practically any color. It actually started with a picture of my girlfriend and I could drag her nose over her head and see it swirl around, mixing all the colors :) Of course, by the time it started to swirl, the image was too liquefied to even look like a face.
Anyway, back then(4 weeks ago) Fleya was "incredibly fast". I got one frame every 2 or 3 seconds so I started to optimize code and cut stuff out. One thing I cut along the way was the 3 color channels, now it's only one fluid being simulated as a temperature channel and the colors are all picked from palettes.
You may have noticed that Hot and Cold (read red and blue) never mix into purple, they always go through black. That's because black is the color for the medium temperature. And another thing, if they did mix into purple, the swirls that formed would not be so well defined and would probably not get that "silk sheets" look if left untouched for a while.
But I'm not dismissing the idea; it will be implemented. Unfortunately it will have an impact on performance but I'll do my best to minimize it.

More color palettes
This is the easiest one of all from a tech point of view so it's a certainty that things will improve...I'll be updating the current palettes and adding new ones with each update, concentrating on making them look best. This is also a place where outside ideas are very very welcome.

Live wallpaper
While developing the first draft of Fleya, I had completely forgot about live wallpapers on Android. The code is written to support Android 1.6 so, by default the methods used for live wallpapers weren't even visible. It hit me in the head 2 seconds after publishing Fleya to the market. It instantly hit me harder on the other side of my head that a live wallpaper that is CPU intensive will be frowned upon by most users. I'll be building a live wallpaper version but not right now. I'll be releasing some updates to Fleya first, implement some of these features and then I'll definitely be painting your homescreen in swirls.

Again, thank you all. It makes a BIG difference to know my work is enjoyed by others.
 

mirceanis

Retired Recognized Developer
Dec 14, 2009
22
28
Try a lower resolution setting from Menu/Options.
Unfortunately, there are very few things I can do to make it run faster. Even if I do them, you may not even feel any difference.
On high resolutions it's running slowly on my HTC Magic too, but I left the option for higher resolutions because of higher end devices that can handle it.
 

rainalert

Member
May 26, 2010
6
0
one of the bests which uses both pysics and mathematics, unfortunately there is no access to market here :(
 

Top Liked Posts

  • There are no posts matching your filters.
  • 25
    Fleya is a FREE realtime fluid simulation for your Android phone.
    But you don't have to be a physics specialist or an engineer to enjoy it.
    Just swipe your finger across the screen to see why.

    You can find it in the Android Market as "Fleya", or scan the QR code at the bottom of this post.
    The app is also available on SlideMe and YAAM.

    Main features:

    • Awesome fluid engine
    • Sensitive to accelerometer
    • Multi-touch (the code can interpret 20 fingers on the screen but it depends on the hardware capabilities of your phone)
    • Save images to SD, instantly available in image gallery
    • Option to choose simulation resolution and accuracy (higher settings mean slower simulation though)
    • Ability to choose your own colors as well as built in color presets

    Tech notes:
    The fluid engine is written in native code. It's probably the fastest engine currently on the market (please correct me if I'm wrong). A lot of work went into optimizations and now it's about 20 to 30 times faster than it used to be (I started with the theoretical code).
    The concept is this:
    Your screen turns into a box of 2D "smoke". You inject fluid with your fingers and when your fingers move, the fluid gets agitated. The fluid is colored according to it's temperature and you can choose 5 colors for the temperature scale gradient.
    Temperature also influences the fluid when combined with the accelerometer through the Gravity setting. Hot fluids go up, cold fluids go down.
    There are 3 fluid presets that ignore temperature and are colored according to density (Smoke, Ink and Cloud). The difference is in the interaction with the accelerometer. They are not pushed up or down according to the static orientation of the phone. They only react to sudden changes in orientation when the gravity setting is turned up.

    Feedback:
    I have a ton of other features fighting for attention in my head but very little time to implement them. I try my best but your suggestions would really help prioritize them.
    For any comments, suggestions or questions, please leave a comment or send an email.
    With your help, the best is yet to come.
    Check out the official site at fixedpointcode.blogspot.com or find Fleya on facebook.
    You can also use this moderator page to submit ideas or vote on other ideas:
    http://www.google.com/moderator/#16/e=8bcb1

    Support:
    This app is totally free and I would like to keep it that way, so please don't complain about the ads. I have made them as unobrusive as possible and they use very little bandwidth.
    You see, I have this dream where I could use all my time to build cool free apps and still be able to eat. I implemented ads as a means for you to show your appreciation at no cost.

    If you like my work and would like to see more interesting apps support me with good comments and high in the market and recommending the app to your friends or in blogs, tweets and forums.
    If you really really like it, donate either here on XDA or on the official site.
    If you don't like it, that's just as fine as you can either ignore it or comment and help me improve my work.

    Preview:
    Check out these pictures for a preview. You can make your own using Fleya :)
    You HAVE to see it running because pictures are worth nothing compared to the live action!

    fleya%20%289%29.png
    fleya%20%283%29.png
    fleya%20%2821%29.png
    fleya%20%2812%29.png
    fleya%20%2815%29.png

    fleya%20%2824%29.png
    fleya%20%282%29.png
    fleya%20%284%29.png
    Fleya_0009.png
    Fleya_0042.png

    Fleya_0053.png
    Fleya_0078.png
    Fleya_0088.png
    Fleya_0080.png
    Fleya_0106.png

    devil.png
    cub.png
    custom%252520colors.png


    Also, I have never seen it running on an Android Tablet so, if you have any, please tell me how it runs or, better yet, post a video on youtube and share a link.
    Update:
    XDA user TheGrammarFreak has shared this YouTube video of Fleya on a Galaxy Tab. Thank you very much.

    Credits:
    • Jos Stam - for a very nice paper on numerical simulation of fluid dynamics in real-time (http://www.dgp.toronto.edu/people/stam/reality/Research/pdf/GDC03.pdf).
    • The worldwide android community - for posting lots of tutorials and allowing me to go from noob android developer to Android market in just a couple of weeks.
    • My girlfriend - for allowing me some spare time to build this app
    • My boss - for not noticing my working on personal projects during company time

    Download:
    QRcode_image.php.png
    2
    Preview of next update

    Hey,
    I've almost finished working on the next update :D. It will most probably be available tomorrow.
    Along with multitouch and the option to save pictures, I've added 3 more fluid types that behave similarly to Hot & Cold.

    Here are some pictures so you can get the taste of what's to come.
    I'm open to suggestions on what to name them.

    attachment.php
    attachment.php

    attachment.php
    attachment.php
    attachment.php

    attachment.php
    attachment.php
    attachment.php
    1
    5 stars for you! Would make for an awesome live wallpaper.

    Would also be cool if the ones like "hot and cold" had 2 point multitouch going on.

    Sent from my Droid using XDA App
    1
    Great App!

    Great App! For some reason, its addicting. lol. One of those apps where there will always be a situation that pops up where Fleya would be useful, for us math and science nerds. Thanks for the post!
    1
    OP, the app is brilliant! Are you basing your source code on 2D Navier-Stokes? ;)