File: delaunay.cpp

package info (click to toggle)
cgal 4.0-5
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 65,068 kB
  • sloc: cpp: 500,870; ansic: 102,544; sh: 321; python: 92; makefile: 75; xml: 2
file content (27 lines) | stat: -rw-r--r-- 436 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

#include <CGAL/CORE_Expr.h>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Delaunay_triangulation_2.h>

typedef CORE::Expr Real;
typedef CGAL::Simple_cartesian<Real> K;
typedef CGAL::Delaunay_triangulation_2<K> DT;

typedef K::Point_2 Point_2;

int main() {

  DT dt;
  double two = 2;
  Point_2 p(0,0), q(std::sqrt(two),1), r(0,1);

  dt.insert(p);
  dt.insert(q);
  dt.insert(r);

  std::cout << dt << std::endl;

  return 0;
}