Locations, angles, etc. Key type is a `loc', which is a named location (absolute, 2D) and direction (at the location). Angles are generally positive anticlockwise; bearings are angles measured from East. The origin is at the South-West. Syntaxes New location Existing location [-] (- means reverse the sense) Quantity (length/angle) [] Angle units: d (degrees,default) r (radians) Length units: mm (default) cm m Identifiers (of locs and objects) start with lc letter, then alphanums and underscores Commands abs P X Y A Defines loc P given coordinates (distances) and absolute bearing rel F T L R A Defines loc T: start at loc F, go forward L, translate right R, turn left A. extend F T len L [R] length L extend F T upto U [R] s.t. perpendicular at T passes through U extend F T ang A R subtending directionally A extend F T uptoang A R s.t. direction at T is A extend F T parallel U R s.t. direction at T is same as at U Draws an arc or line from loc F, defining the other end as loc T. If length R specified, draws an arc of radius R; R +ve curves to the right; R -ve to the left. join F T R [S ...] Joins one existing loc, F, to another, T. F's direction points to the new track; T's away - ie the added track leaves F in F's direction and arrives at T in T's direction. R is the minimum curve radius allowed. S selects from the available solutions, and may be any of the following long prefer longer length solution short prefer shorter length solution right|left prefer mostly bending to the left resp. right beginright|beginleft prefer first bend to the right endright|endleft prefer final bend to the right [!]twoarcs prefer [not] two circular arcs of equal radius [!]arcline prefer [not] one line and an arc of max radius [!]arcsline prefer [not] line between two arcs of min radius if this doesn't resolve, will pick the shortest. defobj O [commands] enddef Defines the object O. Inside the definition, the commands do not draw when the object is being defined. The object has its own coordinate space and its own location namespace. obj[flip] O A F [P] Places an instance of object O. The loc defined inside O as F (`formal parameter', F must be just ) is placed at existing loc A (`actual parameter'). If prefix P (syntax is that of an identifier) is specified, each other loc L inside O is exported into the global namespace as a new loc PL. If `flip' is used then the object is placed with object-space y coordinates negated (ie, it is mirrored so that the object's North exchanges with South).