CGAL is the computational geometry algorithms library, a C++ library
that provides efficient, reliable implementations of geometric

CGAL includes data structures and algorithms appropriate for
a variety of geometryic problems, including:

  • AABB trees for spatial searching and sorting;
  • alpha shapes related to triangulations;
  • Boolean operations on polygons and polyhedra (such as intersection
    union, and exclusive OR);
  • combinatorial algorithms;
  • convex hulls;
  • curve arrangements;
  • geometry processing;
  • interpolation;
  • KD trees for spatial searching and sorting;
  • mesh generation for surfaces and volumes;
  • point set processing;
  • shape analysis;
  • triangulation;
  • Voronoi diagrams;

Web Site:



On any ARC cluster, check the installation details
by typing "module spider cgal".

CGAL requires that the appropriate modules be loaded before it can be run.
One version of the appropriate commands for use on NewRiver is:

module purge
module load gcc/5.2.0
module load CGAL/4.9


The following batch file compiles a user program with the CGAL
library and runs it.

#! /bin/bash
#PBS -l walltime=00:05:00
#PBS -l nodes=1:ppn=1
#PBS -W group_list=newriver
#PBS -q open_q
#PBS -j oe
module purge
module load gcc/5.2.0
module load CGAL/4.9
g++ -c -I$CGAL_INC points_and_segment.cpp
g++ points_and_segment.o -L$CGAL_LIB -lCGAL
mv a.out points_and_segment

A complete set of files to carry out a similar process are available in