All Projects → tynril → rtriangulate

tynril / rtriangulate

Licence: MIT license
A Rust implementation of the Bourke Delaunay triangulation algorithm.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to rtriangulate

DelaunayVoronoi
C# implementation of the Bowyer–Watson algorithm for Delaunay triangulation
Stars: ✭ 131 (+555%)
Mutual labels:  triangulation, delaunay
Tinfour
Delaunay and Constrained Delaunay Triangulations in Java, providing high-performance utilities for modeling surfaces with support for Lidar LAS files, Digital Elevation Models (DEM), finite element analysis, path planning, natural neighbor interpolation, and other applications of Triangulated Irregular Networks (TIN)
Stars: ✭ 119 (+495%)
Mutual labels:  triangulation, delaunay
Delaunator
An incredibly fast JavaScript library for Delaunay triangulation of 2D points
Stars: ✭ 1,641 (+8105%)
Mutual labels:  triangulation, delaunay
weaver
A spider tapestry weaver
Stars: ✭ 72 (+260%)
Mutual labels:  triangulation, delaunay
Triangle
Convert images to computer generated art using delaunay triangulation.
Stars: ✭ 1,838 (+9090%)
Mutual labels:  triangulation, delaunay
delaunay-triangulation-algorithm
Delaunay Triangulation
Stars: ✭ 25 (+25%)
Mutual labels:  triangulation, delaunay
kingslayer
A text-based adventure written in Rust
Stars: ✭ 28 (+40%)
Mutual labels:  crates
minreq
Simple, minimal-dependency HTTP client.
Stars: ✭ 91 (+355%)
Mutual labels:  crates
version-compare
↔️ Rust library to easily compare version strings. Mirror from https://gitlab.com/timvisee/version-compare
Stars: ✭ 32 (+60%)
Mutual labels:  crates
silicate
A general form for complex data
Stars: ✭ 46 (+130%)
Mutual labels:  triangulation
tokio-tun
Asynchronous allocation of TUN/TAP devices in Rust using tokio
Stars: ✭ 17 (-15%)
Mutual labels:  crates
cargo-trim
Binary application to clean up .cargo/registry & .cargo/git cache
Stars: ✭ 15 (-25%)
Mutual labels:  crates
sway-alttab
Simple Alt-Tab daemon for SwayWM/i3. Switches back to previous focused window on Alt-Tab or SIGUSR1
Stars: ✭ 36 (+80%)
Mutual labels:  crates
mesh2d
MESH2D is a MATLAB-based Delaunay mesh generator for two-dimensional geometries.
Stars: ✭ 81 (+305%)
Mutual labels:  triangulation
MysteryBox
Crate implemention for PocketMine-MP (PMMP)
Stars: ✭ 19 (-5%)
Mutual labels:  crates
obj-rs
Wavefront obj parser for Rust
Stars: ✭ 57 (+185%)
Mutual labels:  crates
cargo-esr
Extended Search & Ranking tool for crates.
Stars: ✭ 23 (+15%)
Mutual labels:  crates
steganography
A simple steganography library written in rust
Stars: ✭ 75 (+275%)
Mutual labels:  crates
Procedural-Shape-Generation
An Unity package, enabling user to generate shapes by scripting.
Stars: ✭ 19 (-5%)
Mutual labels:  triangulation
Trilateration
Trilateration system using 3 latitude and longitude points, and 3 radius distances in PHP, C#, Java and Javascript
Stars: ✭ 22 (+10%)
Mutual labels:  triangulation

rtriangulate

crates.io Build Status Coverage Status

A Rust implementation of the Delaunay triangulation algorithm presented by Paul Bourke.

Find the crate documentation on docs.rs, or here on Github.

This was developed as an exercise to get more used to Rust. As far as I know, it works, but it might not. Also, this is a O(n1.5) (approximatively) algorithm, it's not parallelized, and it doesn't use the GPU at all.

Usage

Add the rtriangulate dependency to Cargo.toml:

[dependencies]
rtriangulate = "0.3"

And use the crate as such:

extern crate rtriangulate;

use rtriangulate::{TriangulationPoint, triangulate};

fn main() {
    // A list of points (which has to be sorted on x).
    // Note that you can use your own point type, just implement the rtriangulate::Point trait.
    let points = [
        TriangulationPoint::new(10.0, 50.0),
        TriangulationPoint::new(25.0, 40.0),
        TriangulationPoint::new(30.0, 40.0)
    ];

    // In case you need to sort your points:
    // points.sort_unstable_by(rtriangulate::sort_points);

    // Do the triangulation.
    let triangles = triangulate(&points).unwrap();

    println!("{:?}", triangles); // [Triangle(1, 0, 2)]
}

License

MIT - See LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].