Pink 0.9

drawtriangulation.c File Reference

draw a triangulation More...


Detailed Description

draw a triangulation

Usage: drawtriangulation in.list in.pgm out.pgm

Description: Reads a triangulation in file in.list under the following format:

    G <n>
    x1 y1 v1 ec1 ns1 s11 s12 ... s1ns1
    x2 y2 v2 ec2 ns2 s21 s22 ... s1ns2
    ...
    xn yn vn ecn nsn sn1 sn2 ... s1nsn

where xi, yi are the coordinates of the ith vertex, vi is the associated value (if given in the input file), eci is a int32_t which indicates whether the vertex i belongs to the convex hull, nsi denotes the number of adjacent vertices, and si1 si2 ... sins1 is the list of the indexes of the adjacent vertices (counted from 0).

Draws the triangulation in image in.pgm, output image is out.pgm

Types supported: byte 2D

See also: delaunay.c

Category: geo, draw ,

Author:
Michel Couprie