Crates.io | meshing |
lib.rs | meshing |
version | 0.0.1 |
source | src |
created_at | 2024-02-03 18:09:53.834338 |
updated_at | 2024-02-03 18:09:53.834338 |
description | meshing for 2D and 3D(not implemented yet) |
homepage | |
repository | |
max_upload_size | |
id | 1125571 |
size | 2,291,103 |
cargo run --example simple_2d_triangulation
cargo run --example 2d_plot 100
Create sample-project
cargo new sample-project
cd sample-project
Edit Cargo.toml
delaunay_creator = "0.2.4"
Edit src/main.rs
fn main() {
let square = vec![
meshing::Point2D { x: 0.0, y: 0.0 },
meshing::Point2D { x: 1.0, y: 0.0 },
meshing::Point2D { x: 0.0, y: 1.0 },
meshing::Point2D { x: 1.0, y: 1.0 },
];
let res = meshing::bowyer_watson(square);
println!("{:?}", res);
}
Run
cargo run
[Triangle { a: Point2D { x: 0.0, y: 0.0 }, b: Point2D { x: 1.0, y: 0.0 }, c: Point2D { x: 1.0, y: 1.0 } }, Triangle { a: Point2D { x: 0.0, y: 1.0 }, b: Point2D { x: 0.0, y: 0.0 }, c: Point2D { x: 1.0, y: 1.0 } }]