Writing it
line shore wobble="5dmm" { through "wsw" "e" }
line trail width="9dmm" wobble="3dmm" { through south "(0.65sq, 0.5sq)" north }
line ring closed=#true wobble="2dmm" { through "(0.3sq, 0.7sq)" "(0.7sq, 0.7sq)" "(0.5sq, 0.3sq)" }
line stream { through westCenter eastCenter } // the built-in points, by name
line spur { through "(0sq, 1sq/3)" "(0.5sq, 0.7sq)" heading="30deg" pull=0.6 "(1sq, 0.5sq)" } // a third, exactly; a heading and a pull on one point
line run curve=straight ends=free { through "(0.1sq, 0.6sq)" "(0.9sq, 0.4sq)" } // straight runs, ends free
A line is one smooth curve through its points, square to the tile side at an end that is on a side and along the bisector at an end that is on a corner; curve=straight draws straight runs instead. A point on a tile side is on a seam. See the curve and seams in the language guide.
A line with a width is a strip: everything within half the width of it, wobble included. dirt at=trail, grass at=trail and cliff at=trail fill the strip like a region, and scatter at=trail spreads within half the width either side unless it writes its own reach. A wall follows the line itself, so a width does not widen it. A surface along a line with no width, or along a tile edge (which has none), is dt::type; for an edge write region rim { within "6dmm" of=northEdge } and at=rim. See demo/line-width.dtile.
Try it

dharmatiles version="1.0.0"
// A line with a wobble: the shore of a pond. The line goes through two points and may wander
// up to 5dmm off the straight path between them; the seed decides how.
tile size="1x1" seed=97 {
line shore wobble="5dmm" { through "(0sq, 2sq/3)" "(1sq, 0.5sq)" }
region pool { boundedBy shore; fill "(0.5sq, 0.85sq)" }
region bank { boundedBy shore; fill "(0.5sq, 0.2sq)" }
stack {
base
dirt
grass at=bank
}
}
5dmm off the straight path between them. Drag wobble, or roll the seed: the points stay where they are written.
dharmatiles version="1.0.0"
// A line is the points it goes through, in order. This one has three and no wobble, so it is
// one smooth curve through them, square to the tile's sides; the lawn is the region above it.
tile size="1x1" seed=3 {
line border { through "(0sq, 2sq/3)" "(0.5sq, 0.4sq)" "(1sq, 2sq/3)" }
region lawn { boundedBy border; fill "(0.5sq, 0.1sq)" }
stack {
base
dirt
grass at=lawn
}
}

dharmatiles version="1.0.0"
// The same kind of line with a larger wobble. Change the seed: the points stay where they are
// written, and the line wanders differently.
tile size="1x1" seed=12 {
line border wobble="9dmm" { through "(0sq, 0.5sq)" "(0.5sq, 0.5sq)" "(1sq, 0.5sq)" }
region lawn { boundedBy border; fill "(0.5sq, 0.1sq)" }
stack {
base
dirt
grass at=lawn
}
}

dharmatiles version="1.0.0"
// A line with a width is a strip. `verge` is 24dmm wide and the grass that follows it covers the
// strip; `trail` is narrower, and the pebbles scatter within half its width either side.
tile size="1x1" seed=5 {
line verge width="24dmm" wobble="3dmm" { through southCenter "(0.45sq, 0.5sq)" northCenter }
line trail width="10dmm" wobble="3dmm" { through southCenter "(0.45sq, 0.5sq)" northCenter }
stack {
base
dirt
grass at=verge
scatter at=trail perSquare=60 { pebble }
}
}

dharmatiles version="1.0.0"
// A closed line is a loop, and its inside is a region once it has a fill point.
tile size="1x1" seed=21 {
line ring closed=#true wobble="3dmm" { through "(0.3sq, 0.7sq)" "(0.7sq, 0.7sq)" "(0.5sq, 0.28sq)" }
region pond { boundedBy ring; fill "(0.5sq, 0.55sq)" }
stack {
base
dirt
grass
scatter at=pond count=3 { rock size="4dmm .. 7dmm" }
}
}

dharmatiles version="1.0.0"
// A point written as a range is drawn once from the seed: the line's middle point is anywhere
// from 0.3sq to 0.7sq down, a different place for another seed. Its ends stay on seams: a
// point on a tile side is one place, never a range, so it meets the next tile's.
tile size="1x1" seed=18 {
line shore wobble="3dmm" { through "(0sq, 0.5sq)" "(0.5sq, 0.3sq .. 0.7sq)" "(1sq, 0.5sq)" }
region bank { boundedBy shore; fill "(0.5sq, 0.1sq)" }
stack {
base
dirt
grass at=bank
}
}
Reference
| Written | Takes | Default | What it does |
|---|---|---|---|
line NAME | a name | โ | Its name, for boundedBy and at=. Required. |
width= | length (dmm) | โ | Makes the line a strip of this width (above 0, up to 70dmm, scaled with the system); a dirt, grass or cliff at= it fills the strip, and a scatter reaches half of it either side. |
wobble= | length (dmm) | 0 | Lets the line wander up to this far off its points, keyed by the tile seed and the line's name. |
curve= | smooth or straight | smooth | One smooth curve through the points (cubic Bézier, handles 0.4 of the chord, Catmull-Rom directions), or straight runs, exactly as the points say. |
ends= | square or free | square | square: an end exactly on a tile side leaves along the side's normal, and exactly on a tile corner along the corner's bisector (45° to both sides). free: the ends take their direction from the neighbouring points. |
closed= | #true or #false | #false | A loop: the last point joins the first (at least three points). The inside of a closed line is a region with fill. |
through | points | โ | The points, in order: "(across, down)" with units, counted from the north-west corner, a point's name (built in or declared), an edge word (its middle) or a corner word. Either half of a pair may be a range, weighted or not ("(0sq .. 0.1sq, 0.3sq .. 0.5sq)", "(bell(0.4sq .. 0.6sq), 0.45sq)"): that point is drawn once from the tile seed, keyed by the line's name and its place in the list, so another seed draws another line and editing one point moves no other. A point on a tile side is also written as a seam word: nnw, n, nne are a third, a half and two thirds along the north side from the west (ssw s sse south, wnw w wsw west and ene e ese east, from the north), and nw ne se sw are the tile's corners. On a side longer than one square the word takes its square, counted from 1 from the west or the north, and is quoted: "nnw(2)". Required. |
through of one point: corner= | #true or #false | #false | A sharp knee at this point instead of a smooth bend. |
through of one point: heading= | an angle, "30deg" | the chord of its neighbours, or square to the side | The way the line goes through this point: 0deg is east, 90deg south, as polar reads. Allowed on any point. |
through of one point: pull= | 0 to 3 | 1 | How far the curve holds its direction at this point, as a share of the usual. |
Notes
An element along a drawn line takes side=left, right or centre (the default), as you walk the line. Along a tile edge there is no side: a wall or cliff on an edge always stands inside the tile. Edges, corners and points are in the language guide.
On a through of one point, corner=#true makes a sharp knee, heading= sets the way the line goes through it and pull= how far it holds that direction (the reference lists them under through). A tile that writes seams=free may cross an edge anywhere; otherwise a point on a side that is not a seam is dt::seam.
Seen from the language
The guide pages that use line: Syntax, Lines, Seams, Regions, Seeds.

