2015-05-18 14:11:08 +10:00
|
|
|
#include "image.hpp"
|
|
|
|
#include "noise.hpp"
|
2015-05-18 14:42:28 +10:00
|
|
|
#include "noise/lerp.hpp"
|
2015-05-18 14:11:08 +10:00
|
|
|
|
|
|
|
int
|
|
|
|
main (void)
|
|
|
|
{
|
|
|
|
util::image::buffer<float> img (1920, 1080);
|
|
|
|
|
|
|
|
//static constexpr auto lerp_t = lerp::cubic;
|
|
|
|
//using basis_t = util::noise::gradient<lerp_t>;
|
|
|
|
//using noise_t = util::noise::fbm<basis_t>;
|
|
|
|
|
2015-05-18 22:02:10 +10:00
|
|
|
using noise_t = util::noise::fbm<float,util::noise::gradient<float,util::lerp::quintic>>;
|
|
|
|
//using noise_t = util::noise::musgrave<float,util::noise::gradient<float,util::lerp::quintic>>;
|
|
|
|
//using noise_t = util::noise::fbm<float,util::noise::cellular<float>>;
|
2015-05-18 14:11:08 +10:00
|
|
|
|
|
|
|
util::noise::fill (img, noise_t {});
|
|
|
|
|
|
|
|
auto grey = img.clone<uint8_t> ();
|
|
|
|
util::pgm::write (grey, "noise.ppm");
|
|
|
|
}
|