Bezzier Curves in LibreOffice ============================= I have learned in the Numeric Analysis course that a normal person would not notice a change in the third derivative of a graphed function. So, approximation is done using polynomial method, such as the cubic spline. What graphic application - such as GIMP, Inkscape and LibreOffice Draw - use is the cubic Bezzier curves. A line is a linear Bezzier shape. In LibreOffice Draw, if you drew a shape which is not already a curve, you could right-click it and choose from the opened menu Convert->To Curve Now, if you chooese from the Menubar Tools->Development Tools, you can locate your shape under in the tree on the left side of the window/frame opened. Then click the Property tab, and locate there the property Geometry or PolyPolygon. Those properties are divided into 2 parts: Coordinates and Flags. Coordinates is a bi-dimensional array of points, and Flags are their types: the main types are NORMAL and CONTROL. Normal (or Symmetrice or Smooth) are points along the curve. Control points are the handles that control the curvature of the curve between the two normal points. You can access the points from the editor if you switch to the Bezzier point edit mode (Using Edit->Toggle Point Edit Mode, for example). Then, you'll see the points along the curve to intuitively change the curve. Click one point, and you can see one or more points attached to it. They are called Bezzier handles or control points and you can click in one of them and move them to see what happens. If a point is SYMMETRIC or SMOOTH, moving one handle will move the other. Now, let us write down the formula for a Bezzier curve. ------------------------------------------------------- Be P₀, P₁, P₂, P₃ for points ordered by their indices. Then the polynomial in B(t) passing thru P₀ and P₃ is given by the formula: B(t)= (1-t)³P₀ + 3(1-t)²tP₁ + 3(1-t)t²P₂+ t³P₃ Let us derive B(t): B'(t) = -3(1-t)²P₀ + 3(1-t)²P₁-6(1-t)tP₁ + 6t(1-t)P₂ - 3t²P₂ + 3t²P₃ = = 3(1-t)²(P₁ - P₀) +6t(1-t)(P₂ - P₁) + 3t²(P₃ - P₂) Derive for the second time: B''(t) = -6(1-t)(P₁ - P₀)+6(1-t)(P₂ - P₁)-6t(P₂ - P₁)+6t(P₃ - P₂) = = 6(1-t)(P₂ - 2P₁ + P₀) + 6t(P₃ - 2P₂+ P₁) Now, given the first derivatives of the curve at P₀ and P₃ we can find P₁ and P₂ by plugging t=0 and t=1: B'(0) = 3(P₁ - P₀) B'(1) = 3(P₃ - P₂) and you can see why a handle are attached to one point only. If you want to find control points according to the second derivative, plug one value of t into the first and second derivatives' formulae.