This first week the assignment was to print my first generated Rune.js sketch of an ice cream cone. There were a few rules about the code: I can only use black (0) and white (255) and only once triangle(), rect() and ellipse() each. Also there are no other drawing functions allowed (no beginShape or images).
Here is what I came up with:
Here is the code:
var r = new Rune({
container: “#canvas”,
width: 800,
height: 800,
debug: true
});
r.rect(0, 0, 600, 600)
.fill(0)
.stroke(0)
for (var i = 0; i < 150 ;i = i + 50){
r.ellipse(250 + i, Rune.random(180,200), Rune.random(150, 200), Rune.random(100, 200))
.fill(255)
.stroke(false)
}
r.triangle(200, 250, 300, 500, 400, 250)
.fill(255)
.stroke(0)
.strokeWidth(5)
r.draw();
Leave a Reply