1 /* 2 * Komposter 3 * 4 * Copyright (c) 2010 Noora Halme et al. (see AUTHORS) 5 * 6 * This code is licensed under the GNU General Public 7 * License version 2. See LICENSE for full text. 8 * 9 * Bezier curves 10 * 11 */ 12 13 #ifndef __BEZIER_H__ 14 #define __BEZIER_H__ 15 16 #include <math.h> 17 18 typedef struct { 19 float x, y; 20 } pt; 21 22 typedef struct { 23 float x0, y0; 24 float x1, y1; 25 float cx0, cy0; 26 float cx1, cy1; 27 28 float a; 29 } bzr; 30 31 pt *bezier(pt *p, bzr *bz, float t); 32 33 #endif 34