H2Lib  3.0
Data Structures | Typedefs | Functions
curve2d.h File Reference
#include <cairo/cairo.h>
#include "settings.h"

Go to the source code of this file.

Data Structures

struct  _curve2d
 Representation of a polygon in 2D. More...
 

Typedefs

typedef struct _curve2d curve2d
 Abbreviation for struct _curve2d .
 
typedef curve2dpcurve2d
 Abbreviation for a pointer to a curve2d object.
 
typedef const curve2dpccurve2d
 Abbreviation for a pointer to constant a curve2d object.
 

Functions

pcurve2d new_curve2d (uint vertices, uint edges)
 create a new curve2d object with a certain number of vertice and edges. More...
 
void prepare_curve2d (pcurve2d gr)
 This function computes the normal vectors n , the gram determinants g from the geometrical information. More...
 
void del_curve2d (pcurve2d gr)
 Free Storage allocated for a curve2d object. More...
 
pcurve2d new_circle_curve2d (uint edges, real r)
 Create a new polygon approximation of a circle with $ n $ edges and radius $ r $ around the origin. More...
 
pcurve2d new_square_curve2d (uint edges, real a)
 Create a new square with $ n $ edges and edge length $ a $ around the origin. More...
 
pcurve2d new_hilbert_curve2d (uint n, real l)
 Create a new Hilbert-curve of order $ n $. and edge length $ l $ around the origin. More...
 
pcurve2d new_star_curve2d (uint edges, real r)
 Create a new polygon of a star with 16 spikes, $ n $ edges and radius $ r $ around the origin. More...
 
void print_curve2d (pccurve2d gr)
 print geometrical information to stdout. More...
 
void draw_curve2d (pccurve2d gr, cairo_t *cr, real scale)
 Draw the polygon to a cairo surface. More...
 

Detailed Description

Author
Steffen Börm