Rasterization
This crate provides iterators and adapters for generating sequential coordinates for various shapes of a circle or its parts using Bresenham's algorithm.
Gallery
Visual examples of different shapes:
Examples
Here's how to use the crate:
use ;
let radius = 128_usize;
let iter = new
.circle
.offset;
let iter = new
.circle_long
.offset;
let iter = new
.semicircle_top
.offset;
let iter = new
.semicircle_bottom
.offset;
let iter = new
.circle
.offset
.gradient;
Installation
Add the following to your Cargo.toml:
[]
= "0.2.0"
License
This project is licensed under the MIT License.