CGAL——學習3
#include <iostream>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <sstream>
typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
typedef Kernel::Point_2 Point_2;
int main()
{
Point_2 p(0, 0.3), q, r(2, 0.9);
{
q = Point_2(1, 0.6);
std::cout << (CGAL::collinear(p,q,r) ? "collinear\n" : "not collinear\n");
}
{
std::istringstream input("0 0.3 1 0.6 2 0.9"); //輸入點雲。
input >> p >> q >> r;
std::cout << (CGAL::collinear(p,q,r) ? "collinear\n" : "not collinear\n");
}
{
q = CGAL::midpoint(p,r);
std::cout << (CGAL::collinear(p,q,r) ? "collinear\n" : "not collinear\n");
}
return 0;
}
相關文章
- 學習3
- Java學習(3)Java
- java學習3Java
- Python 學習3Python
- 強化學習-學習筆記3 | 策略學習強化學習筆記
- 3/8學習程序
- 3/13學習程序
- 3/25學習程序
- 3/19學習程序
- Vue3學習Vue
- 機器學習-3機器學習
- Protocol Buffers 3 學習Protocol
- shell學習總結-3
- tensorflow學習筆記3筆記
- Vue學習筆記3Vue筆記
- PHP學習3——陣列PHP陣列
- 3/7學習進度
- 3/5學習進度
- javaweb學習之路(3)CookieJavaWebCookie
- mysql學習筆記3MySql筆記
- Vue 3 學習筆記Vue筆記
- FreeRTOS學習隨記-3
- 笨方法學Python3 習題3Python
- WinUI 3學習筆記(3)—— ComboBox & DropDownButton & SplitButtonUI筆記
- 【機器學習基礎】無監督學習(3)——AutoEncoder機器學習
- docker學習3:Docker Hello WorldDocker
- swift學習筆記《3》-技巧Swift筆記
- 8086 彙編學習 Part 3
- Vue3 學習筆記Vue筆記
- HTML學習(3)(HTML字元格式)HTML字元
- Python基礎學習3——列表Python
- 下劃線的學習3
- 3、Ktor學習-ApplicationCall簡介;APP
- Vue3的學習---10Vue
- Vue3的學習---5Vue
- Vue3的學習---6Vue
- Vue3的學習---8Vue
- 架構演化學習思考(3)架構
- 3、18 貢獻法學習