Geom Software - C++ Programming and Geometry Libraries
Fade3D Documentation pages v0.9
Example0 - Hello Triangulation

This is the most simple example demonstrating the use of Fade2D


Output

main()

  • 4 Points are inserted.
  • The triangulation is drawn.
#include <Fade_2D.h>
#include <stdio.h>
using namespace GEOM_FADE2D;
int main()
{
// Create an empty triangulation
Fade_2D dt;
// Insert four points
Point2 p0(0.0,0.0);
Point2 p1(1.0,0.0);
Point2 p2(0.5,2.0);
Point2 p3(0.5,0.5);
dt.insert(p0);
dt.insert(p1);
dt.insert(p2);
dt.insert(p3);
// Draw the result
dt.show("example0.ps");
}