use plotpy::Plot;
use crate::coordinate_system::Coordinates::RELATIVE;
use crate::coordinate_system::CoordinateSystem;
use crate::grid2d::{PlotPoint, GRID2D};
use crate::points::Point;
pub fn test_project(){
let mut plot = Plot::new();
let coords = CoordinateSystem::new((1.0,0.0),(0.0,1.0),(0.0,0.0), "test", "blue");
let grid = GRID2D::new_empty((3,3),(1.0,1.0), (0.0,0.0), 0.01,RELATIVE(coords.clone()));
let point = Point::new(-0.8,0.7, RELATIVE(coords));
point.plot(&mut plot, "orange");
let projected_point = grid.project(&point);
grid.plot_points(&mut plot, PlotPoint::Given(projected_point));
plot.show("test").unwrap();
}