## Extensible Bezier Curves

An extensible Bezier curve is a concatenation of either straight segments or cubic Bezier curves. For each subdivision point (ie a point joining two Bezier curves, like A,B,C,D,E in the picture above), one can impose two properties on the associated tangents, namely smoothness and/or symmetry. Smoothness means that the tangents around the subdivision point are required to be parallel (for instance, BB' is parallel to BB'' in the figure above). More precisely, if smoothness is required at B, and if you move B' with the mouse, then B'' will move accordingly as to preserve smoothness. To make an angle (like at point C), the smoothness must NOT enforced. Symmetry at B means that the length of BB' and BB'' are the same. Symmetry is enforced at all points on the picture above. If both Symmetry and Smoothness are required at B say, then B' and B'' will be symmetric with respect to B. Symmetry and Smoothness have no effect at the endpoints A and E.

When drawing or editing a curve, symmetry and smoothness are enforced by default, yet using modifiers (alternate functions) allows you to alter this behaviour :

- CTRL: move tangents with smoothness and symmetry enforced;
- CTRL+SHIFT: enforce smoothness only.
- CTRL+ALT: enforce symmetry only.
- CTRL+ALT+SHIFT: move tangents freely (no constraint at all)

Note that these combinations and their associated meaning are also reminded in the status bar.

You may also change these properties for all points at once, or only for a specific point, by selecting a curve, right-clicking, and selecting the corresponding action in the popup menu. Alternatively, the properties panel (press F2) allows you to carry out the same kind of operations, yet in a more precise way since you may also want to enter new coordinates numerically. It is important to notice that some changes are irreversible (unless you explicitely call undo), since enforcing one of these properties MIGHT change the position of some control points, and the current policy is to NOT remember their previous position; hence Smoothness and Symmetry checkboxes in the properties panel are actually "one-way" streets.

### Straight segments and how-to-unstraighten-them ?

To straighten a Bezier curve, just move the appropriate tangents until they reduce to a point. To unstraighten a segment, press the CTRL, CTRL+SHIFT, CTRL+ALT or CTRL+ALT+SHIFT modifiers, click on each segment's end-point and drag the tangents. Forgetting to press these modifiers before clicking will result in a translation of the segment end-points, not in a modification of their associated tangents. Here again, the popup menu allows you to straighten all points at once, or only a specific point. To reverse the change, simply invoke undo.

## Smooth Polygons

A Smooth Polygon is a smooth curve controled by a polygon. For example, the smooth polygon in the picture above is controled by the polygon ABCDE (in green on the picture). The curve is always smooth, and does not usually go through the control points. But the curve goes through the midpoints of all the segments of the polygon (except the two extremal ones). In the example above, the curve goes through P and Q which are the midpoints of [BC] and [CD].

To each point of the smooth polygon is attached a coefficient which controls how close to the polygon the curve should go. The default value is 70, and useful values are generally in the interval 50-100. This coefficient can be set as follows: select the smooth polygon and press F2 to make the properties panel appear; if you don't want to adjust the coefficient of all points, unckeck some boxes in the adjust column; then use the slider to adjust the coefficient. The picture below shows the effect of changing the value of the coefficients of all points to 50.
For an alternate way of editing smoothness coefficients, see the section Using the Edit Bezier Points tool [] below.

More precisely, the smooth polygon is a concatenation of cubic bezier curves whose control points lie on the control polygon (on the picture above, the control points of the bezier curves are represented by the endpoints of the bold dotted lines). Denote by c the coefficient at B. Then P' is such that the vector PP' is c times the vector PB. Similarly, the point A' is such that the vector AA' is c times the vector AB.

## Using the Edit Bezier Points tool to add, remove and edit points

There is a specific tool dedicated to adding and removing points to/from Bezier curves and smooth polygons, and additionally to parallelograms and ellipses by converting them to Bezier curves on-the-fly. It is accessible through the icon in the toolkit palette or the toolkit menu (see also Toolkit panel). At any time, a right-click brings you back to the standard SELECT mode [].

Selecting the target element: Once the tool has been activated in the toolbar, the first step must be to select a single target object, eg a smooth polygon or a Bezier curve. If the target is a parallelogram or an ellipse, it is converted to a Bezier curve on-the-fly (this may be reversed by a call to undo).

Selecting points: before removing points, you must select the points to be removed. Just click on each point to be selected for removal, holding the SHIFT modifier for incremental selection/deselection. Alternatively, you may wrap a lasso around every point to be selected, by dragging a rectangular selection area. Selected points are highlighted in blue.

Removing points: simply click on either one of the points selected above (the cursor transforms into a minus sign). As regards Bezier curves, removing a point controlling a tangent straighten the corresponding segment, whereas removing a point joining two Bezier curves removes this point as well as the associated tangent-controls..

Adding points: Hold the CONTROL key while the mouse hovers around a segment (however curved or straight it is), then press the mouse to add and drag a new point. A subsequent mouse-release let you edit the associated tangent if applicable. For smooth polygons, you must click when the mouse hovers on a segment of the controlling polygon, not on the curve itself.

Adjusting the coefficients of a smooth polygon: For each point of the polygon controling the curve, there is a coefficient telling how close to the corners of the polygon the curve should go (more details here). To edit these coefficients, select the points you want to alter, then hold the CTRL+ALT modifiers, move the mouse over one of the selected points (the cursor transforms into a north-south arrow), and drag the mouse up- or down- wards. This will increase (resp. decrease) the coefficients by an amount proportional to the mouse displacement. Note that the tool will not work if no point is selected!