fogón

← Farm3D assetfogon/cerca-de-granja

Cerca de granja

by fogonCC04726 blocks
Cerca de granjaDrag to turn it
// «Cerca de granja» · gpt-6-sol (medium)
// A straight section of white-painted wooden farm fence: three thick square posts in a row with pointed tops, two horizontal rails between them plus a diagonal cross brace in each section, standing on a strip of green grass with a few tufts.

// Sunny grass strip
box(3, 17, 0, 45, 30, 0, "#378b32");
box(3, 17, 1, 45, 30, 1, "#55b943");
box(4, 18, 2, 44, 29, 2, "#70cd4d");

for (let i = 0; i < 125; i++) {
  const x = 4 + Math.floor(rand() * 41);
  const y = 18 + Math.floor(rand() * 12);
  set(x, y, 2, rand() < 0.55 ? "#7bd557" : "#5cbd43");
}

// Two solid, square wooden rails in each span
for (const [a, b] of [[8, 24], [24, 41]]) {
  for (const z of [10, 19]) {
    box(a, 22, z - 1, b, 24, z + 1, "#d7e2df");
    box(a, 21, z, b, 21, z + 1, "#f8fbef");
    box(a, 22, z + 1, b, 24, z + 1, "#ffffff");
    box(a, 22, z - 1, b, 24, z - 1, "#c4d2d0");
  }
}

// A stout diagonal cross brace on the viewer-facing side of each span
for (const [a, b, rise] of [[9, 23, true], [25, 39, false]]) {
  for (let x = a; x <= b; x++) {
    const t = (x - a) / (b - a);
    const z = Math.round(rise ? 11 + t * 8 : 19 - t * 8);
    box(x, 20, z - 1, x, 22, z + 1, "#e2e9df");
    set(x, 19, z, "#fffdf2");
    set(x, 20, z + 1, "#ffffff");
    set(x, 21, z - 1, "#cbd6d2");
  }
}

// Three thick, square posts with crisp collars and pointed caps
for (const x of [7, 24, 41]) {
  box(x - 2, 21, 3, x + 2, 25, 23, "#e1e9e6");
  box(x - 2, 21, 3, x + 1, 21, 23, "#f8fbf4");
  box(x + 2, 21, 3, x + 2, 25, 23, "#c7d5d3");
  box(x - 2, 21, 22, x + 2, 25, 23, "#ffffff");

  // Slightly projecting square collar
  box(x - 3, 20, 24, x + 3, 26, 25, "#d9e3e0");
  box(x - 3, 20, 24, x + 2, 20, 25, "#ffffff");
  box(x + 3, 20, 24, x + 3, 26, 25, "#c4d1d0");
  box(x - 3, 20, 26, x + 3, 26, 26, "#fffdf2");

  box(x - 2, 21, 27, x + 2, 25, 27, "#f4f8ef");
  box(x - 1, 22, 28, x + 1, 24, 28, "#ffffff");
  box(x - 1, 22, 29, x + 1, 24, 29, "#edf3ec");
  box(x, 23, 30, x, 23, 30, "#fffdf0");

  // Tiny galvanized nail heads fastening the rails
  for (const z of [10, 19]) {
    set(x, 20, z, "#8b9d9e");
    set(x, 19, z, "#bec9c5");
  }
}

// A few chunky grass tufts along the front and back edges
for (const [x, y] of [
  [6, 17], [13, 18], [19, 16], [30, 17], [36, 18], [44, 17],
  [11, 29], [32, 29], [42, 30]
]) {
  line(x, y, 2, x, y, 5, 0, "#48aa36");
  line(x - 1, y, 2, x - 2, y, 4, 0, "#66c746");
  line(x + 1, y, 2, x + 2, y, 4, 0, "#79d34f");
  set(x, y, 5, "#88db58");
}