curve (point1,point2,angle1,angle2,coefficient1,coefficient2)
curve
.x1
.x2
.y1
.y2
.a1
.a2
.l
.dx
.dy
.p1
.p2
.c1
.c2
Function parameters
If the name of a curve is not set in code, the default name is formed as C_firstpoint_secondpoint. E.g. an unnamed curve between points P1 and P2 will get name C_P1_P2.
Names of points can be substituted with function point(x,y). In this case it is mandatory to specify the name of the future arc, as there are no point names to create it automatically (second line of code).
A curve also has direction from first point to second point.
Object properties
After a curve is created, you can get its properties by using the following syntax:
Usage
You can use mathematical equations, variables, and size constants in syntax, e.g.
curve(p1,p2,15,-45)
c1=curve(point(10,70+sz3),point(p3.x,p4.y),1+90,angle(p1,p2,p3)+[p1:p2].a1,1,2)
While the first four parameters of the curve function (points and angles) are straightforward, the coefficients might be less so.
By default the system will draw a curve that is similar to a French curve, often used in pattern making. However if you would like the curve to be more or less shaped, you can play with the FIRST COEFFICIENT. When used alone without the second coefficient, it will determine how shaped the curve is in general. You may set it from 0 (which degrades a curve to a straight line) to any number, but look out for intercrossing.
curve(p1,p2,-30,180+50) | curve(p1,p2,-30,180+50,0) | curve(p1,p2,-30,180+50,0.5) |
curve(p1,p2,-30,180+50,2) | curve(p1,p2,-30,180+50,3) | curve(p1,p2,-30,180+50,4.5) |
If you would like the curve to be unbalanced, more shaped at one edge and less shaped at the other, you may define this by using BOTH COEFFICIENTS.
You can see how the two control points become closer or farther from points in the following examples:
curve(p1,p2,-30,180+50,0.5,1) | curve(p1,p2,-30,180+50,3,1) | curve(p1,p2,-30,180+50,1,0.2) |