Skip to content

ecjonson/MetaballFluids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metaball Fluids with Marching Cubes

Author: Evan Jonson

About

This is a fluids simulator using Metaballs and Spring Mechanics in WebGL 1.0. It runs in your browser.

Metaballs

Metaballs, also known as blobby objects, are n-dimensional isosurfaces that meld together when in close proximity.

Marching Cubes

Marching Cubes is the algorithm used here to create the triangle meshes. The algorithm divides the world space into a scalar field. Particle locations are used to update these scalar values to determine where the isosurface is. For more information on how this is applied to metaballs, check out Paul Bourke's "Polygonizing a scalar field".

Hooke's Law

Spring mechanics (Hooke's Law) are used here to simulate fluids by applying forces to the blobs relative to their proximity. For more information on how this is applied to particles, check out Ahmad Moussa's "Spring Physics, Particles and Meshes".

Instructions

You can run it right here using Github Pages! Check out my demo!

About

Metaball Fluids with Marching Cubes in WebGL 1.0

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors