abrasion/third_party/cargo/vendor/line_drawing-0.7.0/README.md

20 lines
1 KiB
Markdown
Raw Normal View History

2020-01-18 23:27:25 +00:00
[![](https://img.shields.io/crates/v/line_drawing.svg)](https://crates.io/crates/line_drawing)
[![](https://docs.rs/line_drawing/badge.svg)](https://docs.rs/line_drawing)
A collection of line-drawing algorithms for use in graphics and video games.
Currently implemented:
* `Bresenham` - An implementation of [Bresenham's line algorithm].
* `Bresenham3d` - A 3-Dimensional implementation of bresenham.
* `BresenhamCircle` - Bresenham's circle algorithm.
* `Midpoint` - The [mid-point line algorithm].
* `WalkGrid` and `Supercover` - implemented from [this article by Red Blob Games][article].
* `WalkVoxels` - A similar 3-Dimensional algorithm that only takes orthogonal steps.
* `XiaolinWu` - [Xiaolin Wu's line algorithm].
[Bresenham's line algorithm]: https://en.wikipedia.org/wiki/Bresenham's_line_algorithm
[mid-point line algorithm]: http://www.mat.univie.ac.at/~kriegl/Skripten/CG/node25.html
[article]: http://www.redblobgames.com/grids/line-drawing.html
[Xiaolin Wu's line algorithm]: https://en.wikipedia.org/wiki/Xiaolin_Wu%27s_line_algorithm