My attempt at creating noise map generators using "apex" (that's what im calling them) points and relative distances (among other devices).
- Can generate user defined map size
- Generate random noise between apexes
- Voronoi Texture Gen
- Generating different "terrain" types
- Multithread
- Seeding
- Publish as API
- Musgrave Texture Gen
- Perlin Noise Gen
use map::*;
fn main() {
// Declare a new Map object using the builtin macros
let mut map = map!(MAP_WIDTH, MAP_HEIGHT);
/* Create our "apex" points, as I call them,
these are what we base our point calculations
on to get that sloping effect */
map.seed_rand(SEED_POINTS);
/* Apply the Voronoi Smoothing to all the pixels of the map,
the first paramater tells the function the range of variance
you want in the calculated point (in this case a number
from -0.1->0.1 is added), and the second is the exponent
to apply to the value calculation (closest / avg).powf(0.6)
in this case */
map.voronoi_smooth(0.1, 0.6);
/* Scale every value by a given scalar,
this should ensure no value goes above the given scalar value */
map.scale(255f32);
// Exports your map to a png, see examples of this below
map.export_png();
/* You can also output a numerical representation of
this in a matrix form along with the point data for every "apex" and the scalar information */
println!("{}", map);
}