title: Paper.js zigzag path
body: <p>Im using paper.js and attempting to created function to create zizag paths. I have divided the path up in to segments, using getPointAt and now trying ad the zigzag by adding the normals
  <a href="http://sketch.paperjs.org/#V/0.12.7/S/RZFPawMhEMW/igiF3Wa7leSWRErpvRR6jDkYd3Yja8aiJoGGfPf6r+1JffObN/q8UZQnoGv6OUNQR9pRZYd0vkhHvuXECcKVfMhwbFqBSfRBulBlqzE0Fw3XXgEGcBUBHHjhejkMzYqxbslYLEbDrORal7gq+uDsDG/WWMcFPRipZkEFFjtlzxgnLllHDOAUjjzdrC/7jcDRuiZxmhO2IXqb+bhZLNqbQJJKdhw9RA9NnosdeaxeFUDrTtIU4wnCez6+hqY0thFfsYj+PqBiOYB/qq2Eh+kU8/A7ve+/EpJ79MOSc/ZSJq2fyhpblEVvDfTGTs2fSATeazRgQAWIiQZ3hpQJib90cCDn7O3pere//wA=" rel="nofollow noreferrer">sketch</a> and code. Thanks in advance
  code:</p>
  <pre><code>
  var zag= new Path()
  var start= new Point(view.center)
  var end= start.add(300,200)
  zag.add(start, end)
  zag.strokeColor=&quot;black&quot;
  
  var count= 20, length= zag.length;
  for(var i= 0; i&lt;count; i++){
   var offset= i / count * length
   var normal= zag.getNormalAt(offset) * 30
   zag.add(zag.getPointAt(offset))
   zag.segments[i].point.add(i%2==0?normal:-normal)
  console.log(normal)
   
  }
  zag.selected= true
  </code></pre>