splines - blossommerz/locus-hub GitHub Wiki

Home > Splines

< Previous: Rectangles & squares | Next: The path menu >

Modeling - Drawing

Splines

A freehand curve made of anchors and handles, drawn with the Pen and edited directly on the canvas.

Important

Under construction. Splines are new and this page describes work in progress. Nothing here is a promise about the finished feature.

Anchors are on the curve

A spline is a chain of anchors with handles. The anchors sit on the curve, always. The handles sit off it and shape the curve between them.

There are no off-curve control points to chase. Every point you can grab is either on the curve or a handle belonging to an anchor that is.

The curve between two anchors is a span. One connected run of anchors is a piece, and a spline can have several.

Corner and smooth

Three panels. First, a curve through four anchors: a filled arrowhead marking the spline's first point, a square anchor labeled corner where a straight run meets a curve at an angle, and a circle anchor labeled smooth, which shows its two handles and passes through without a crease. Second, two smooth anchors one above the other: the upper one's two handles hollow and labeled derived, the lower one's two handles filled and labeled explicit. Third, two curves: in the first an anchor is filled gold and labeled selected while its neighbor is hollow, in the second two handle knobs on different anchors are filled gold, labeled two handles selected.

Every anchor is one kind or the other, and the shape on screen says which:

  • A square is a corner. The curve may turn however it likes there.
  • A circle is smooth. The two handles stay in line through the anchor, so the curve runs through without a crease.
  • A filled arrowhead marks the spline's start, its point sitting on the first anchor. See What each end tells you.

Double-click an anchor to change one into the other.

Shape carries the kind, deliberately. No color is used for it, because color on this overlay means something else: a filled anchor is selected and a hollow one is not.

What each end tells you

Two panels. In the first, an open spline running through four anchors, two squares and two circles; a solid arrowhead sits with its point on the first anchor, aimed along the curve, labeled start, and at the far anchor a short bar crosses the curve through the anchor, labeled loose end. In the second, a closed spline drawn as a ring of four circular anchors; the same arrowhead sits on the top anchor, labeled start, and the other three carry no mark.

The two ends of a spline are not interchangeable, and each one says which it is.

  • The start carries a filled arrowhead, its point on the first anchor and its body behind, aimed the way the spline runs. An open spline has one and so does a closed one, so a finished outline still reports where it begins and which way round it goes.
  • A loose end carries a short bar straight through the anchor, across the direction of travel. Only an open spline has one, and only at the far end: the start says start, the other end says loose.

Closing a spline takes the bar away and leaves the arrowhead. Which anchor the arrowhead sits on is what an export writes first, and on a closed outline you can move it with Make Anchor First from the path menu.

Both marks are drawn in the interface slate, never in the selection color. Neither of them means selected.

Handles the app works out for you

A handle is either derived or explicit, and you can tell at a glance:

  • Hollow is derived. The app computes it from the anchor's two neighbors, so it re-curves whenever a neighbor moves.
  • Filled is explicit. It stays exactly where it was put.

Both handles of an anchor share one state. Drag either one and the pair becomes explicit together.

Gold is no part of this. Gold means selected, for an anchor and for a handle alike.

Dragging a handle is what makes it explicit. Until then the app is deciding.

The rule it decides by is worth knowing, because it is why a spline here behaves like compass work rather than like a tension slider: through any three consecutive anchors, the curve follows the circle through those three points. A circle is the same object the rest of Locus is built out of, and the only number involved is a handle length.

Asking for the handles back

Toggling an anchor between corner and smooth drops both of its handles. That surprises people, so it is worth saying plainly: it is not a side effect, it is how you ask for the handles to be computed again.

One more case where the app corrects itself. Move both handles of a smooth anchor so they are no longer in line through it, and the anchor becomes a corner. The label never sits over a visible kink.

Selection goes down a level

Three panels showing the same two splines, each spline three anchors with a pair of handles on its middle anchor. In the first both curves are drawn gold and every anchor is hollow, labeled two splines selected. In the second both curves are dark and the middle anchor of the upper spline is filled gold, labeled one anchor selected. In the third both curves are dark and the middle anchor of each spline is filled gold, labeled anchors on both.

Anchors appear on every selected spline. Select one and its anchors are there to grab. You do not have to open it for editing first to see them.

A selection can hold anchors from more than one spline. Shift-click adds across splines, a rubber band collects across all of them, and dragging, nudging and Delete act on every member wherever it sits.

The moment an anchor or a handle is selected, no spline is drawn selected. Gold moves down with the selection, onto the anchors, handles and pieces you picked, and both splines go back to their ordinary stroke. Select a spline and gold still means that spline; it is the first anchor click that spends it. With nothing picked at the anchor level, a selected spline looks selected as it always did.

Two things sit outside this. An imported path has no anchors and cannot take part in any of it, so it keeps its selection color throughout. A locked spline shows no anchors at all, selected or not.

What a spline is not, yet

A spline has no construction points of its own. It adds nothing to Select Free Points, and nothing else in the drawing can attach to it: no crossing with a spline, no point riding along one, no tangent at a point on one.

Align and Distribute refuse a selection that contains a spline, and a spline is not a direct boolean input.

Related

< Previous: Rectangles & squares | Next: The path menu >

⚠️ **GitHub.com Fallback** ⚠️