
- 300 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
Fluid Engine Development
About this book
From the splash of breaking waves to turbulent swirling smoke, the mathematical dynamics of fluids are varied and continue to be one of the most challenging aspects in animation. Fluid Engine Development demonstrates how to create a working fluid engine through the use of particles and grids, and even a combination of the two. Core algorithms are explained from a developer's perspective in a practical, approachable way that will not overwhelm readers. The Code Repository offers further opportunity for growth and discussion with continuously changing content and source codes. This book helps to serve as the ultimate guide to navigating complex fluid animation and development.
- Explains how to create a fluid simulation engine from scratch
- Offers an approach that is code-oriented rather than math-oriented, allowing readers to learn how fluid dynamics works with code, with downloadable code available
- Explores various kinds of simulation techniques for fluids using particles and grids
- Discusses practical issues such as data structure design and optimizations
- Covers core numerical tools including linear system and level set solvers
Trusted by 375,005 students
Access to over 1 million titles for a fair monthly price.
Study more efficiently using our study tools.
Information
1
Basics
1.1 Hello, Fluid Simulator
1.1.1 Defining State

Simple 1D wave animation. Two different waves are moving back and forth.

State of the two waves are described by their positions and speeds.
2
3 int main() {
4 double x = 0.0;
5 double y = 1.0;
6 double speedX = 1.0;
7 double speedY = -0.5;
8
9 return 0;
10 }
double x = 0.0) and travels to the right with 1.0 speed (double speedX = 1.0). Similarly, wave Y starts from the right-most side (double y = 1.0) and travels to the left (double speedY = -0.5) with half of the magnitude of wave X’s speed.1.1.2 Computing Motion
2
3 int main() {
4 double x = 0.0;
5 double y = 1.0;
6 double speedX = 1.0;
7 double speedY = -0.5;
8
9 const int fps = 100;
10 const double timeInterval = 1.0 / fps;
11
12 for (int i = 0; i < 1000; ++i) {(*@\label{code:basics-hello-simplewave1}@*)
13 // Update waves
14 }
15 return 0;
16 }
fps stands for “frames-per-second (FPS)”, and it defines how many frames we want to draw for each second. If we invert this FPS value, which is seconds-per-frame, we get time interval between the two frames. Ri...Table of contents
- Cover
- Half Title
- Title Page
- Copyright Page
- Dedication Page
- Table of Contents
- Preface
- List of Figures
- 1 Basics
- 2 Particle-Based Simulation
- 3 Grid-Based Simulation
- 4 Hybrid Solvers
- A More Basics on
- B More Particles on
- C More Grids on
- References
- Index
Frequently asked questions
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app