// six wheeled rover on mars
var cx = 32, cz = 32;
var G = 10;
// flat red ground
fill(0, 0, 0, 63, G - 1, 63, "stone");
fill(0, G, 0, 63, G, 63, "red_sand");
// a few rocks
var rocks = [[10, 12], [50, 20], [18, 48], [44, 46], [24, 8]];
var i, j;
for (i = 0; i < rocks.length; i++) {
fill(rocks[i][0], G + 1, rocks[i][1], rocks[i][0] + 1, G + 1, rocks[i][1] + 1, "stone");
}
// wheels: 3 on each side, made of black blocks
var wxs = [cx - 8, cx, cx + 8];
var zz, wx, dx, dy;
for (i = 0; i < 3; i++) {
wx = wxs[i];
for (j = 0; j < 2; j++) {
zz = (j === 0) ? cz - 5 : cz + 5;
for (dx = -2; dx <= 2; dx++) {
for (dy = -2; dy <= 2; dy++) {
if (dx * dx + dy * dy <= 5) {
fill(wx + dx, G + 3 + dy, zz, wx + dx, G + 3 + dy, zz, "black_concrete");
}
}
}
}
}
// axles
for (i = 0; i < 3; i++) {
fill(wxs[i], G + 3, cz - 4, wxs[i], G + 3, cz + 4, "iron_block");
}
// body box
fill(cx - 7, G + 5, cz - 4, cx + 7, G + 8, cz + 4, "white_concrete");
// gold panel on the side
fill(cx - 4, G + 6, cz - 4, cx + 1, G + 7, cz - 4, "gold_block");
fill(cx - 4, G + 6, cz + 4, cx + 1, G + 7, cz + 4, "gold_block");
// solar panel on top
fill(cx - 9, G + 9, cz - 7, cx + 9, G + 9, cz + 7, "blue_concrete");
// camera mast
fill(cx + 4, G + 10, cz, cx + 4, G + 15, cz, "iron_block");
fill(cx + 3, G + 16, cz - 1, cx + 5, G + 17, cz + 1, "gray_concrete");
fill(cx + 2, G + 17, cz - 1, cx + 2, G + 17, cz + 1, "black_concrete");
// antenna
fill(cx + 8, G + 10, cz - 3, cx + 8, G + 15, cz - 3, "iron_bars");
// robot arm going down to the ground
fill(cx - 8, G + 6, cz + 2, cx - 12, G + 6, cz + 2, "light_gray_concrete");
fill(cx - 12, G + 1, cz + 2, cx - 12, G + 6, cz + 2, "light_gray_concrete");
fill(cx - 12, G + 1, cz + 2, cx - 12, G + 1, cz + 2, "iron_block");