Forest

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 treeColors = ['#90A692', '#D3E0CA', '#A9CBC5']

// background
s.rect(0, 0, width, height).attr({fill: '#FEFCEA'})

var previousWidth = 0;
for (var i = 0; i < 10; i++){
  var treeWidth = getRandomInt(25, 300);
  var treeHeight = getRandomInt(150, 300);
  var index = 0;
  
  s.polygon([0 + previousWidth, height], [previousWidth + (treeWidth/2), height - treeHeight], [previousWidth + treeWidth, height]).attr({
    fill: treeColors[getRandomInt(0, treeColors.length - 1)],
    opacity: 0.8
  });
  
  var previousWidth = treeWidth - treeWidth * .4;
}