Created
September 13, 2016 20:40
-
-
Save danaabs/65e858ca87152133eeffaa6eec3011d9 to your computer and use it in GitHub Desktop.
Final Ice Cream Code
This file contains 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
//made with Rune.js | |
var r = new Rune({ | |
container: "#canvas", | |
width: 800, | |
height: 800, | |
debug: true | |
}); | |
//background | |
rect_size = 900 | |
for(d = 0; d < rect_size; d += 1) { | |
r.rect(0,0,d,d) | |
.fill(false) | |
.stroke(0) | |
.strokeWidth(1) //play with this number to get varying shades | |
.strokeDash(".1, .3, .1") | |
} | |
var f; | |
var cones = 2; | |
for (f = 0; f < 75; f += 1) { | |
r.triangle(250 + cones*f, 400 + cones*f, 400, 800 - cones*f, 550 - cones*f,400 + cones*f) | |
.fill(false) | |
.stroke(255) | |
.strokeWidth(10) | |
.strokeDash("10, 30, 10") | |
} | |
var i; | |
var ice_cream = 500; | |
for (i = 0; i < ice_cream; i += .3 ) { | |
r.ellipse(400, 200, i, i) | |
.fill(false) | |
.stroke(255) | |
.strokeWidth(3) | |
.strokeDash("21, 30 , 2, 75, 39, 2, 15") //trying to add pattern variation to the stroke to make it look more organic | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment