imrayya / LiquidSim

A simple java implementation of a liquid simulation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LiquidSim

A simple java implementation of a liquid simulation

In a very early alpha form

Currently only simple particle physic in 2 day has been implemented

The simulation loop consist of:

  • Particle:
    • Predict next tick's position
  • Particle:
    • Colliders:
      • Check if collision will occur
        • Handle collision
  • Particle:
    • Particle:
      • Check if collision will occur
        • Handle collision
  • Particle:
    • Move particle based on external forces
    • Check if out of bounds
      • Kill particle
  • Particle:
    • Reset external forces

Notes:

  • Angles are based on a unit circle (east or right being 0 and 360 degrees while up or north is 90 degrees)
  • The origin is the bottom left corner

About

A simple java implementation of a liquid simulation

License:GNU General Public License v2.0


Languages

Language:Java 100.0%