Zig Zag

to generate a new and unique variation

Source Code

Every variart piece is open source, you can see exactly how it is drawn from the code.

var jagged = intVariable('jagged', 25, 500);
var zags = 4; // 2 or 4 works best

var colors = ["#48569A", "#1D8DA9", "#fff", "#079548", "#AEC132", "#333"];
var colorIndex = 0;

for (var offset = -jagged; offset < width + 50; offset += 50){
  s.polyline([offset, -25], [offset + jagged, height/zags], [offset, (height/zags)*2], [offset + jagged, (height/zags)*3], [offset, height + 25])
    .attr({
      stroke: colors[colorIndex % colors.length],
      strokeWidth: 55,
      fill: "none"
    });  
  colorIndex += 1;
}