Lazy Diamond-Square

The lazydiamondsquare(hereafter LDS) will allow you to use the Diamond-Square algorithm to generate your own landscapes or anything else where it might come in handy.

Example

``` use lazydiamondsquare as lds; use lds::InitBy as By; use lds::Parameters::*;

use lds::HeightMap;

use ldssimpleview::gen_img;

fn main() { let mut map = HeightMap::new( 513, 0.15, vec![ Seed("view.png"), InitLevel(2), InitBy(By::Seed), ], );

map.gen_all();

gen_img(&map, "view.png");

} ```

Examples of work

roughness = 0.15, Seed("view1.png") Example 1: roughness = 0.15, Seed("view1.png")

roughness = 0.2, Seed("view2.png") Example 2: roughness = 0.2, Seed("view2.png")

roughness = 0.2, Seed("view3.png"), InitLevel(4) Example 3: roughness = 0.2, Seed("view3.png"), InitLevel(4)

How it works

There's nothing here yet, but in future versions I'll add a detailed explanation of how it works. For now, just take a look at the project documentation and you'll learn the essentials. I've reinstalled the OS now, but I'm leaving soon to visit my grandmother in the country, so these changes are minor. By the way, to explain how lazydiamondsquare works, I plan to post an article on Habr, but if there are enough requests, I will describe the workings of LDS here as well, in English.

TODO

!!!

I just wanted to let you know that I'm 13 and this is my first serious project, so I'll be only glad for criticism and advice on how to improve my project. All text in this file is translated with the help of a translator, because I don't know English so well yet.

Sources