Skip to content

pi-tronic/Noise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Noise...

...of any kind

Run

To build the code you need to execute following command in your directory:

g++ -o build/{output filename} {input directory}/{input filename}.cpp -lSDL2 -lSDL2main

Then type the following to run it.

./build/{output filename}


Implemented Noise

Worley Noise

  • create random points
  • value of every pixel is calculated from it's distance to the closest point

You can optimize the algorithm by splitting the screen into sections and the place n (best is 1) point per section.
Then your algorithm to calculate the distance only needs to check the distances with the points in the own section and the 8 surrounding sections.
Otherwise you would need to check every single point...

About

Implementation of various noise algorithms

Resources

License

Stars

Watchers

Forks

Languages