Skip to content
This repository has been archived by the owner on Sep 14, 2021. It is now read-only.
/ mod1 Public archive

Simulation of water with nice graphics

Notifications You must be signed in to change notification settings

bshanae/mod1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mod1

The idea of this of the projection is simulate water movement on terrain, defined by a given file.
I used an algorithm, called Pipe-method, it is used along with height-field model. It works like this : one creates a 2D array for storing water depth values, along with array for storing flow values. (The flow is a water movement from given point to its neighbors.) At each iteration of algorithm loop one updates flow values for each point and then updates depth according to new flow values.

Scenarios

  • Rain
  • Heavy rain
  • Well
  • Wave
  • Four waves
  • Flood

Noise

Noise is feature, that allows to generate better terrain. Noise configuration is passed to binary file as second argument. You can template of the configuration in noise folder. Generally every line of configuration file it looks like this :

[noise type] : [frequency] [range] (offset) (power) 

Usage

Install some packages :

brew install glew
brew install glfw
brew install glm
brew install freetype

To compile program :

cd build
make

To run program pass terrain file and optionally noise file to binary

./build/mod1 [map file] (noise file)

References

About

Simulation of water with nice graphics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published