Created
November 25, 2021 07:23
-
-
Save afabri/e74d6bbf503c802066a23f194700f4f9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <CGAL/Simple_cartesian.h> | |
#include <CGAL/linear_least_squares_fitting_3.h> | |
#include <vector> | |
typedef CGAL::Simple_cartesian<double> Kernel; | |
typedef Kernel::FT FT; | |
typedef Kernel::Point_3 Point; | |
typedef Kernel::Plane_3 Plane; | |
int main() | |
{ | |
Point p(1,1,1), q(2,2,2); | |
Plane plane; | |
std::vector<Point> points; | |
points.push_back(p); | |
points.push_back(q); | |
FT conf = linear_least_squares_fitting_3(points.begin(), points.end(), plane, CGAL::Dimension_tag<0>()); | |
std::cout << conf << std::endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment