Functions | |
void | control_points (const line_t *g, const line_t *l, point_t *p1, point_t *p2, double f) |
This file contains the functions to calculate control points from a list of points for drawing bezier curves.
This function calculates the control points. It takes two lines g and l as arguments but it takes three lines into account for calculation. This is line g (P0/P1), line h (P1/P2), and line l (P2/P3). The control points being calculated are actually those for the middle line h, this is from P1 to P2. Line g is the predecessor and line l the successor of line h.
g | Pointer to first line. |
l | Pointer to third line (the second line is connecting g and l). |
p1 | Pointer to memory of first control point. This will receive the coordinates. |
p2 | Pointer to memory of second control point. |