Home

Awesome

🌊 ascii-fluid

ascii-fluid is a face controlled ASCII fluid simulation running real time in your terminal. You can control the fluid dynamics with your face by using a webcam, but also with your mouse or touchpad.

ascii-fluid

Usage

 $ go get -u -v github.com/esimov/ascii-fluid
 $ cd wasm && make

How does it works?

The fluid solver is mainly based on Jos Stam's paper Real-Time Fluid Dynamics for Games. tcell library is used for rendering the fluid simulation in terminal and gorrilla/websocket package for communicating through a websocket connection with the Webassembly version of the Pigo face detection library.

This will start three new operation simultaneously:

The coordinates of the first detected face will be transferred over the websocket connection to the terminal application. On each refresh rate (defined as a parameter) the terminal will update the fluid simulation.

OS Support

This program has been tested on Linux and MacOS, but normally it should also run on Windows.

Because of the OS imposed security constrains there are some important steps you need to take:

MacOS:

In MacOS you must set the accessibility authorization for the terminal you are running from.

<img src="https://user-images.githubusercontent.com/705503/80077645-11c09b00-854e-11ea-8b52-ad130b42028b.png" width=300/>

Controls

Dependencies

Author

License

Copyright © 2020 Endre Simo

This software is distributed under the MIT license. See the LICENSE file for the full license text.