Created
October 11, 2018 21:01
-
-
Save fdb/edb0e65caa8b1b2b99c0403e608ac3b6 to your computer and use it in GitHub Desktop.
Keep Pushing — Paper.js Sketch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use in http://sketch.paperjs.org/ | |
function rand(min, max) { | |
return min + Math.random() * (max - min); | |
} | |
var RADIUS = 400; | |
var circ = new Path.Circle({ | |
position: view.center, | |
radius: RADIUS, | |
strokeColor: 'black', | |
strokeWidth: 2, | |
strokeJoin: 'round', | |
insert: false | |
}); | |
for (var i = 0; i < 200; i += 1) { | |
var pt = view.center + new Point(RADIUS, 0); | |
pt = pt.rotate(rand(0, 360), view.center); | |
var c = new Path.Circle({ | |
position: pt, | |
radius: rand(2, 5), | |
fillColor: 'blue', | |
insert: false | |
}) | |
circ = circ.unite(c); | |
} | |
project.activeLayer.addChild(circ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment