8000 GitHub - lelongg/geo-rand: Rust crate to generate random geometric shapes
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Rust crate to generate random geometric shapes

Notifications You must be signed in to change notification settings

lelongg/geo-rand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

geo-rand

This crate contains algorithms to generate random geometric shapes such as polygons.

crate.io docs.rs

This code is a Rust port of this JS code.

Example

The following example shows how to compute a random set of polygons. The rand method is provided by the GeoRand trait which is implemented for some geo-types.

use rand_core::SeedableRng;
use geo_rand::{GeoRand, GeoRandParameters};
let mut rng = rand_pcg::Pcg64::seed_from_u64(0);
let polygons = geo::MultiPolygon::rand(&mut rng, &GeoRandParameters::default());

GeoRandParameters contains fields to customize output.

About

Rust crate to generate random geometric shapes

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  
0