

A value of 0 places it at A, 1 at B and 0.5 in the middle.Įxample:- polygon(A, B, C) draws a triangle where A, B, C are pointsĮxample:- findangle(A, B) finds the angle between two lines A, B or a polygon findangle(C) (C is the label of polygon, in this case the method returns the first angle)įills the interior of shapes A,B.The shapes can be an arc, polygon or another fill. Parallel(line, passThroughPoint, length=10)Įxample:- parallel(line(1, 2, 3, 4), point(1, 2))Įxample:- angle(A, B, 45, 1) The two points A and B defines the base line.The ratio is an optional parameter which controls the position of the protractor. The last optional parameter of perp command is the length of the perpendicular line which defaults to 10 To copy a line, give the first parameter as line or two points as shown here arc(point1, point2, originPoint, angleFrom, upto)Įxample:- A=perp(line(1, 2, 3, 4), point(1, 2)) draws a perpendicular line to a given line(1, 2, 3, 4) passing through point(1, 2). A negative value for "upto" parameter will move clockwise.


Length can be optionally given as line(A, B, 3) where 3 is length of segment.Īrc(originPoint, radius, angleFrom, upto)Įxample:- arc(point(2, 2), 3, 40, 20)Uses point(2, 2) as origin, 3 as radius and starts the arc from 40 degrees adding another 20 degree in an anticlockwise direction. Example:- point(3, 4) or A=point(3, 4) where A is the label.Įxample:- line(0,0,-2,5) or C=line(A, B) where A, B are point labels.
