Take the tour ×  A somewhat similar question to this one, but in
a different language for graphics:  Is there a simple way to
draw a squiggly line in asymptote?  share|improve this question
add comment  2 Answers  up vote 11 down vote accepted  It seems
that there has not been such a module for squiggly lines,
although it is possible (and not very hard) to define one.  A
simple implementation:  path zigzag(path g, real step=2, real
distance=2)     real len = arclength(g);     int state = 0;
path zig;     for (real u = 0; u < len; u += step) {
real t = arctime(g, u);         pair p = point(g, t);
pair norm = unit(rotate(90) * dir(g, t));         if (state ==
1)             p = p + distance * norm;         else if (state
== 3)             p = p - distance * norm;         zig = zig --
p;         state = (state + 1) % 4;     zig = zig -- point(g,
length(g));     return zig;  // test path g = (0,0) -- (2cm,0)
-- (4cm,1cm) -- (0,3cm) -- cycle;  enter image description here
share|improve this an