Coil
coil()
Draw a stretched coil/loop spring along a path
The number of windings can be controlled via the segments or segment-length style key, and the width via amplitude.
line((0,0), (2,1), stroke: gray)
cetz.decorations.coil(line((0,0), (2,1)), amplitude: .25, start: 10%, stop: 90%)
Styling
Root: coil