extern crate startin;
fn main() {
let mut pts: Vec<[f64; 3]> = Vec::new();
pts.push([0.0, 0.0, 12.5]);
pts.push([1.0, 0.0, 7.65]);
pts.push([1.1, 1.1, 33.0]);
pts.push([0.0, 1.0, 33.0]);
pts.push([0.5, 0.9, 33.0]);
pts.push([0.9, 0.5, 33.0]);
pts.push([0.67, 0.66, 33.0]);
let mut dt = startin::Triangulation::new();
dt.set_jump_and_walk(false);
dt.insert(&pts, startin::InsertionStrategy::AsIs);
println!("{}", dt.printme(true));
println!("is 3 removed {:?}", dt.is_vertex_removed(3));
assert!(dt.is_valid());
let a = dt.get_point(3);
if a.is_ok() == true {
println!("point {:?}", a.unwrap());
}
let re = dt.locate(50.0, 50.0);
match re {
Ok(x) => println!("Triangle: {}", x),
Err(why) => println!("{:?}", why),
}
let re = dt.closest_point(1.1, 1.11);
match re {
Ok(x) => println!("Point: {}", x),
Err(why) => println!("{:?}", why),
}
}