Blue Network

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 numCircles = intVariable('numCircles', 2, 50);

var circles = [];

for (var i = 0; i < numCircles; i++){
  circles.push({
    x: getRandomInt(0, width),
    y: getRandomInt(0, height),
    radius: getRandomInt(0, width / 6)
  });
}
               
for (var i = 0; i < circles.length; i++){
  s.circle(circles[i].x, circles[i].y, circles[i].radius).attr({
    fill: '#29a5c4',
    opacity: 0.6
  });

  s.circle(circles[i].x, circles[i].y, 2).attr({
    fill: '#ffffff',
    stroke: '#000000',
    strokeWidth: 1
  });  

  if (getRandomInt(0, 100) < 40 && circles[i + 1]){
    s.line(circles[i].x, circles[i].y, circles[i + 1].x, circles[i + 1].y).attr({
      stroke: '#333333',
      strokeWidth: 1
    })
  }
}