Settings

Choose language

circle(point,radius,angle, angle)

circle
.x1
.x2
.y1
.y2
.a1
.a2
.l
.dx
.dy
.p1
.p2
Draws a circle, or a section of a circle, with center at the named point and of the given radius.

Function parameters


  • center point
  • radius
  • (optional) first angle
  • (optional) second angle

    If angles are omitted, a full circle will be drawn. Otherwise, a section of circle between the radius at the first angle and radius at the second angle will be drawn.
    If the name of a circle is not set in code, the default name is formed as R_centerpoint. E.g. an unnamed circle around point P1 will get name R_P1.

    Object properties


    After a circle 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 section of the circle
  • .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.

    circle(p1,sz3,line1.a2,180)

    The most common use for this function is round corners, as in the example below, arc and curve functions do not return a perfect circle shape.

  • Previous article

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

    Next article

    path(object1,object2,...,objectx)