Chronicling the Martians

I designed a book cover/poster for Ray Bradbury’s Martian Chronicles as my final Printing Code project. To prepare for the assignment, I reread a few of the stories and looked at the covers for previous editions. I also looked at photos of the surface of Mars from the Curiosity rover. The Martian Chronicles, like all science fiction, is very much a product of its time, despite its being about the future. I wanted my design to reference this idea–the future as imagined by the past. Like my previous projects, the design is generative, so the result differs slightly each time I run the program. Here are two versions that I printed:

The font is intended to suggest rockets and the retro-futuristic lines of 1960s design. I used arcs and rounded edges to achieve this result. This is the code for the font:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
class Letter
{
   PVector pos;  //upper left corner of letter
   float distX, distY;  //bounding box parameters
 
   Letter(float xpos, float ypos, float distX_)
   {
     pos = new PVector(xpos, ypos);
     distX = distX_;
     distY = 5*distX/4;
   }
 
   void a()
   {
     canvas.pushMatrix();
     canvas.line(pos.x, pos.y + distY, pos.x + distX/2, pos.y);  //left diag
     canvas.line(pos.x + distX/2, pos.y, pos.x + distX, pos.y + distY);  //right diag
     canvas.arc(pos.x, pos.y + distY, 1.88*distX, 1.75*distX, -PI/2, -PI/12);
     canvas.popMatrix(); 
   }
 
   void b()
   {
     canvas.pushMatrix();
     canvas.translate(-distX/8, 0);
     canvas.line(pos.x + distX/4, pos.y, pos.x + distX/4, pos.y + distY);  //vert
     canvas.arc(pos.x + distX/4, pos.y + distY/4, 1.75*distX, 1.1*distY/2, -5*PI/8, PI/2.5);  //top arc
     canvas.arc(pos.x + distX/4, pos.y + 3*distY/4, 1.75*distX, 1.1*distY/2, -3*PI/8, 1.8*PI/3);  //bottom arc
     canvas.popMatrix();
   }
 
   void c()
   {
     canvas.pushMatrix();
     canvas.arc(pos.x + distX, pos.y + distY/2, 1.75*distX, distY, PI/2, 3*PI/2);
     canvas.popMatrix(); 
   }
 
   void d()
   {
     canvas.pushMatrix();
     canvas.translate(distX/8, 0);
     canvas.arc(pos.x, pos.y + distY/2, 1.75*distX, distY, -PI/2, PI/2);
     canvas.line(pos.x, pos.y, pos.x, pos.y + distY);
     canvas.popMatrix(); 
   }
 
   void e()
   {
     canvas.pushMatrix();
     canvas.arc(pos.x + distX, pos.y + distY/2, 1.75*distX, distY, PI/2, 3*PI/2);
     canvas.line(pos.x + 0.125*distX, pos.y + distY/2, pos.x + distX, pos.y + distY/2);
     canvas.popMatrix(); 
   }
 
   void h()
   {
     canvas.pushMatrix();
     canvas.line(pos.x + distX/4, pos.y + distY, pos.x + distX/4, pos.y);  //left vert
     canvas.line(pos.x + distX, pos.y, pos.x + distX, pos.y + distY);  //right vert
     canvas.arc(pos.x, pos.y + distY, 2*distX, 1.75*distX, -PI/2, 0);
     canvas.popMatrix(); 
   }
 
   void i()
   {
     canvas.pushMatrix();
     canvas.line(pos.x + distX/2, pos.y, pos.x + distX/2, pos.y + distY);
     canvas.popMatrix(); 
   }
 
   void l()
   {
     canvas.pushMatrix();
     canvas.translate(distX/4, 0);
     canvas.line(pos.x, pos.y, pos.x, pos.y + distY);
     canvas.line(pos.x, pos.y + distY, pos.x + 0.75*distX, pos.y + distY);
     canvas.popMatrix(); 
   }
 
   void m()
   {
     canvas.pushMatrix();
     canvas.line(pos.x, pos.y, pos.x, pos.y + distY);  //left vert
     canvas.line(pos.x, pos.y, pos.x + distX/2, pos.y + distY);  //left diag
     canvas.line(pos.x + distX/2, pos.y + distY, pos.x + distX, pos.y);  //right diag
     canvas.line(pos.x + distX, pos.y, pos.x + distX, pos.y + distY);  //right vert
     canvas.popMatrix(); 
   }
 
   void n()
   {
     canvas.pushMatrix();
     canvas.line(pos.x, pos.y, pos.x, pos.y + distY);  //left vert
     canvas.line(pos.x, pos.y, pos.x + distX, pos.y + distY);  //diag
     canvas.line(pos.x + distX, pos.y, pos.x + distX, pos.y + distY);  //right vert
     canvas.popMatrix(); 
   }
 
   void o()
   {
     canvas.pushMatrix();
     canvas.ellipse(pos.x + distX/2, pos.y + distY/2, 0.88*distX, distY);
     canvas.popMatrix(); 
   }
 
   void r()
   {
     canvas.pushMatrix();
     canvas.translate(-distX/8, 0);
     canvas.arc(pos.x + distX/4, pos.y + distY/4, 1.75*distX, 1.1*distY/2, -5*PI/8, PI/2.5);  //top arc
     canvas.line(pos.x + distX/4, pos.y, pos.x + distX/4, pos.y + distY);
     canvas.arc(pos.x + 1.56*distX, pos.y + distY/2, 2.1*distX, 1.8*distX, PI/2, PI);  //tail
     canvas.popMatrix();
   }
 
   void s()
   {
     canvas.arc(pos.x + distX, pos.y + distY/4, 1.75*distX, 1.1*distY/2, 5*PI/8, 3*PI/2);  //top arc
     canvas.arc(pos.x + distX/4, pos.y + 3*distY/4, 1.75*distX, 1.1*distY/2, -3*PI/8, PI/2);  //bottom arc
   }
 
   void t()
   {
     canvas.pushMatrix();
     //canvas.translate(distX/8, 0);
     canvas.line(pos.x + distX/2, pos.y, pos.x + distX/2, pos.y + distY);  //vert
     canvas.line(pos.x, pos.y, pos.x + distX, pos.y);  //horiz
     canvas.popMatrix(); 
   }
 
   void u()
   {
     canvas.pushMatrix();
     canvas.arc(pos.x + distX/2, pos.y, 0.8*distX, 2*distY, 0, PI);
     canvas.popMatrix(); 
   }
 
   void y()
   {
     canvas.pushMatrix();
     canvas.arc(pos.x + distX/2, pos.y, distX, distY, 0, PI);
     canvas.line(pos.x + distX/2, pos.y + distY/2, pos.x + distX/2, pos.y + distY);
     canvas.popMatrix(); 
   }
}

The rest of the design incorporates red mountains, which change with each iteration. I added the rocket in the upper left to move the viewer’s gaze and to shift the weight of the composition a bit. The rocket is also important in the context of the book; Bradbury’s stories are concerned with human interaction with Mars. The rocket disrupts the horizontal movement of the mountains and text as the rockets in the stories herald the disruption that will befall the red planet. This is the code for the design:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
//Kim Ash
//Printing Code
//martian - creates generative book cover for Ray Bradbury's Martian Chronicles
 
import toxi.color.*;
import toxi.color.theory.*;
import toxi.util.datatypes.*;
 
PGraphics canvas;
int canvas_width = 5100;
int canvas_height = 7650;
 
float ratioWidth = 1;
float ratioHeight = 1;
float ratio = 1;
 
Letter [] ray;
Letter [] bradbury;
Letter [] the;
Letter [] martian;
Letter [] chronicles;
float name = canvas_width/19;
float title = canvas_width/15;
 
void setup()
{ 
  size(510, 765);
  colorMode(HSB, 1, 1, 1);
  canvas = createGraphics(canvas_width, canvas_height);
  calculateResizeRatio();
  ray = new Letter[3];
  bradbury = new Letter[8];
  the = new Letter[3];
  martian = new Letter[7];
  chronicles = new Letter[10];
 
  canvas.beginDraw();
    canvas.colorMode(HSB, 1, 1, 1);
    TColor col = TColor.newHSV(.04, .98, .98);
    ColorTheoryStrategy rcomp = new RightSplitComplementaryStrategy();
    ColorList rcompList = ColorList.createUsingStrategy(rcomp, col);
    TColor back = rcompList.get(3);
    canvas.background(back.hue(), back.saturation(), back.brightness());
    canvas.smooth();
    canvas.noFill();
    //canvas.strokeCap(PROJECT);
 
    //author
    TColor authorC = rcompList.get(4);
    canvas.stroke(authorC.hue(), authorC.saturation(), authorC.brightness());
    canvas.strokeWeight(canvas.width/200);
    //Ray
    canvas.strokeWeight(canvas.width/150);
    canvas.pushMatrix();
      canvas.translate(2.3*canvas.width/30, canvas.width/15);
      canvas.pushMatrix();
      canvas.translate(canvas.width/15, 0);
      for(int i=0; i<ray.length; i++)  {
        ray[i] = new Letter(i*canvas.width/15, 0, name);
      }
      ray[0].r();
      ray[1].a();
      ray[2].y();
      canvas.popMatrix();
 
      //Bradbury
      canvas.pushMatrix();
      canvas.translate(5*canvas.width/15, 0);
      for(int i=0; i<bradbury.length; i++)  {
        bradbury[i] = new Letter(i*canvas.width/15, 0, name);
      }
      bradbury[0].b();
      bradbury[1].r();
      bradbury[2].a();
      bradbury[3].d();
      bradbury[4].b();
      bradbury[5].u();
      bradbury[6].r();
      bradbury[7].y();
      canvas.popMatrix();
    canvas.popMatrix();
 
    //title
    TColor titleC = rcompList.get(5);
    canvas.stroke(titleC.hue(), titleC.saturation(), titleC.brightness());
    //The
    canvas.pushMatrix();
    canvas.translate(21*canvas.width/30, 2.5*canvas.height/15);
    for(int i=0; i<the.length; i++)  {
      the[i] = new Letter(1.2*i*canvas.width/15, 0, title);
    }
    the[0].t();
    the[1].h();
    the[2].e();
    canvas.popMatrix();
 
    //Martian
    canvas.pushMatrix();
    canvas.translate(5.71*canvas.width/15, 3.5*canvas.height/15);
    for(int i=0; i<martian.length; i++)  {
      martian[i] = new Letter(1.2*i*canvas.width/15, 0, title);
    }
    martian[0].m();
    martian[1].a();
    martian[2].r();
    martian[3].t();
    martian[4].i();
    martian[5].a();
    martian[6].n();
    canvas.popMatrix();
 
    //Chronicles
    canvas.pushMatrix();
    canvas.translate(2*canvas.width/15, 4.5*canvas.height/15);
    for(int i=0; i<chronicles.length; i++)  {
      chronicles[i] = new Letter(1.2*i*canvas.width/15, 0, title);
    }
    chronicles[0].c();
    chronicles[1].h();
    chronicles[2].r();
    chronicles[3].o();
    chronicles[4].n();
    chronicles[5].i();
    chronicles[6].c();
    chronicles[7].l();
    chronicles[8].e();
    chronicles[9].s();
    canvas.popMatrix();
 
    //mountains
    ColorTheoryStrategy s = new AnalogousStrategy();
    ColorList colors = ColorList.createUsingStrategy(s, col);
 
    canvas.pushMatrix();
    canvas.strokeWeight(canvas.width/50);  //150
    canvas.translate(0, canvas.height/4);
    float noiseCount = 0;
    noiseDetail(1);
    for(int m=1; m<5; m++)
    {
      TColor c = colors.get(m);
      canvas.stroke(c.hue(), c.saturation(), c.brightness());
      canvas.beginShape();
      canvas.translate(0, canvas.height/8);
      for(int i=0; i<canvas.width + 40; i+=100)
      {
        float ranY = noise(noiseCount);
        canvas.vertex(i, ranY*canvas.height/3);
        canvas.strokeWeight(canvas.width/150);
        canvas.line(i, ranY*canvas.height/3, i, canvas.height);
        noiseCount += 0.12;
        canvas.strokeWeight(canvas.width/50);
      }
      canvas.endShape();
    } 
    canvas.popMatrix();
 
    //rocket
    TColor rocket = colors.get(3);
    canvas.stroke(rocket.hue(), 0.07+rocket.saturation(), rocket.brightness());
    canvas.strokeWeight(canvas.width/150);
    for(int i=0; i<3; i++)  {
      canvas.bezier(0, i*canvas.width/15, (2.5-i/3)*canvas.width/15, 1.4*canvas.height/15, 6.1*canvas.width/15, canvas.height/3, 5.6*canvas.width/15, 4.5*canvas.height/15);
    }
    grid(canvas.width/15);
  canvas.endDraw();
 
  float resizedWidth = (float) canvas.width * ratio;
  float resizedHeight = (float) canvas.height * ratio;
  //displays canvas onscreen
  image(canvas, (width/2) - (resizedWidth/2), (height/2) - (resizedHeight/2), resizedWidth, resizedHeight);
 
  canvas.save("martian.tiff");
}
 
 
/* resizing function */
void calculateResizeRatio()
{
  ratioWidth = (float) width / (float) canvas.width;
  ratioHeight = (float) height / (float) canvas.height;
 
  if(ratioWidth < ratioHeight)  ratio = ratioWidth;
  else                          ratio = ratioHeight;
}
 
//grid
void grid(float pageMargin)
{
  //bounding box for manuscript grid
  canvas.noFill();
  canvas.stroke(0.4, 1, 1,0);  //change alpha value to see gridlines
  canvas.strokeWeight(canvas.width/300);
  canvas.rect(pageMargin, pageMargin, canvas.width - (2*pageMargin), canvas.height - (2*pageMargin));
  canvas.line(5.6*canvas.width/15, pageMargin, 5.6*canvas.width/15, canvas.height-(pageMargin));
  //canvas.line(canvas.width-2*pageMargin, pageMargin, canvas.width-2*pageMargin, canvas.height-pageMargin);
  canvas.line(pageMargin, 4.5*canvas.height/15, canvas.width-pageMargin, 4.5*canvas.height/15);
}