bezier_line
Entity: predicate

Usage:
bezier_line(X1,Y1, ... , Xn, Yn)

This function will draw a cubic Bézier curve using the points X1,Y1, ... , Xn, Yn . The Bezier line is a smooth line which is used to describe curves (for example in CorelDraw). If you want to make such a line which goes true k+1 points then you need to give 3*k+1 points to this predicate (that is, you need 2*(3*k+1) arguments). You need so many points because for every point you have to give also the vector of the touching line in the left and in the right direction. This vectors show the direction of the touching line but also their length shows how close is the curve to the touching line in this point. For example, if you gave as arguments the points p1, p2, p3, p4 then you will connect points p1 and p4 with a Bézier curve. The points p2 and p3 will describe the lines which touch our curve in p1 and p4 . More concretely the vector p1, p2 gives the direction of the touching line and its length gives how close is this curve to the touching line in p1 . It is analogous for the vector p4, p3 for the point p4 . For users who are familiar with CorelDraw this is easier. Anyway, in CorelDraw you change the position of these points by the mouse and see the result directly.

This function draws lines by using the current pen .

See also:

line
ellipse

Examples:
Music.pro