This week’s challenge was to design a simple book cover with only basic shapes (rectangle, triangle, ellipse, line) and in black/white for The Martian by Andy Weir. Since I haven’t read the book yet, I watched the great movie adaptation by Ridley Scott to got a feel for it.

This is the what I made:

Screen Shot 2016-02-08 at 10.18.37 PM

 

Here is the code:

var r = new Rune({
container: “#canvas”,
width: 550,
height: 850,
debug: true
});

//Drawing the stars
for (var i = 0; i < 100; i++){
r.circle(Rune.random(0,550),Rune.random(0,500), 1.5).fill(0).stroke(false);
}

//mountains
//var mountainGroup = r.group(100,100);

for (var i = 0; i < 320 ;i = i + 40){
r.triangle(150 + i, Rune.random(700,800), 250+i, Rune.random(200, 400), 400 + i, Rune.random(585, 800))
.fill(0).stroke(false);
}

for (var i = 0; i < 270 ;i = i + 30){
r.triangle(150 + i, Rune.random(700,800), 250+i, Rune.random(300, 500), 400 + i, Rune.random(585, 800))
.fill(255).stroke(false);
}

for (var i = 0; i < 270 ;i = i + 30){
r.triangle(150 + i, Rune.random(700,800), 250+i, Rune.random(400,585), 400 + i, Rune.random(580, 600))
.fill(0).stroke(false);
}

//Drawing the Martian
var guyGroup = r.group(70,585);
//arms
r.triangle(8, 5, 4, 5, -3, 30, guyGroup).fill(255).stroke(0).strokeWidth(2);
r.triangle(15, 5, 10, 5, 25, 30, guyGroup).fill(255).stroke(0).strokeWidth(2);
//hands
r.rect(1,23, 3,6, guyGroup).fill(255).stroke(0).strokeWidth(2).rotate(8);
r.rect(18,28, 3,6, guyGroup).fill(255).stroke(0).strokeWidth(2).rotate(-8);
//underbody
r.rect(5.5, 5, 10, 20, guyGroup).fill(0).stroke(0);
//Legs
r.rect(4, 25, 5, 23, guyGroup).fill(255).stroke(0).strokeWidth(2).rotate(-5);
r.rect(10, 25, 5, 23, guyGroup).fill(255).stroke(0).strokeWidth(2);
//shoes
r.rect(9, 47, 7, 7, guyGroup).fill(255).stroke(0).strokeWidth(2);
//body
r.rect(5.5, 10, 10, 5, guyGroup).fill(255).stroke(0).strokeWidth(2);
r.rect(5.5,18, 10,10, guyGroup).fill(255).stroke(0).strokeWidth(2);
//head
r.circle(10,-1, 12, guyGroup).fill(255).stroke(0).strokeWidth(2);
r.circle(10,-1, 8.5, guyGroup).fill(255).stroke(0).strokeWidth(2);

//Drawing the spaceship

var spaceGroup = r.group(420,30).rotate(10);

r.rect(-15,-8, 30,15,spaceGroup).fill(255).stroke(0).strokeWidth(2);
r.rect(-15,-8, 30,5,spaceGroup).fill(0).stroke(0).strokeWidth(2);

for(var j = 0; j < 2; j++) {
var lineGroup = r.group(0,0,spaceGroup)
for(var i = 0; i < 3; i++) {
//var sub = 10 – (i * 5);
r.line(-20, 15 + i * 5, 20, 15 + i * 5, lineGroup).strokeWidth(2).rotate(j * 180);
r.line(5 * i + 25, -10, 5 * i + 25, 10, lineGroup).strokeWidth(2).rotate(j * 180);
//connecting lines

}
}

for(var i = 0; i < 2; i++) {
r.line(0, -20 * i + 5, 0 , -20 * i + 15,lineGroup).strokeWidth(2);
}

//Drawing the ground
var groundGroup = r.group(0,650);
r.rect(-40,0, 800, 600,groundGroup).fill(0).stroke(0).rotate(-15);

r.draw();