Settings

Choose language

convex (point1,angle1,point2,angle2,radius)

convex
.x1
.x2
.y1
.y2
.a1
.a2
.l
.dx
.dy
.p1
.p2
Draws a round tip within the given vectors.

Function parameters


  • name of the first point
  • angle at the first point
  • name of the second point
  • angle at the second point
  • radius in cm



    If the name of a convex path is not defined in code, the default name is formed as X_firstpoint_lastpoint. E.g. an unnamed convex path from points P1 and P2 will get name X_P1_P7.

    Names of points can be substituted with function point(x,y) etc. 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 convex path also has direction from first point to second point.

    Object properties


    After a convex path is created, you can get its properties by using the following syntax:
  • .a1 - angle at the first point with the horizontal
  • .a2 - the angle at the second point with the horizontal
  • .l - the length of the path
  • .p1 - the first point
  • .p2 - the second point
  • .x1 - x coordinate for the first point
  • .y1 - y coordinate for the first point
  • .x2 - x coordinate for the second point
  • .y2 - y coordinate for the second point
  • .dx - difference of x coordinate values between the first and the second points
  • .dy - difference of y coordinate values between the first and the second point

    Usage


    You can use mathematical equations, variables, and size constants in syntax, e.g.
    convex(p1,p2,90,-25,10)
    cx1=convex(point(10,70+sz3),point(p3.x,p4.y),p3),1+90,angle(p1,p2,p3)+[p1:p2].a1,25*4)
  • Previous article

    wave ((point1,point2,...,pointn),angle1,angle2,coefficient)

    Next article

    circle(point,radius,angle, angle)