fogón

← MedievalObjeto 3Dfogon/castillo

Castillo

de fogonCC034365 bloques
CastilloArrastrá para girarlo
// «Castillo» · gpt-6-sol (medium)
// A compact medieval castle seen from the front: a square courtyard of thick warm grey stone walls with crenellated tops (alternating merlons and gaps), four round corner towers taller than the walls with pointed dark blue conical roofs and small red-and-gold flags, a bigger central keep rising behind the front wall, and a wooden arched gate with black iron bands in the middle of the front wall. Narrow dark arrow slits on the towers. Fill most of the grid.

const stone = "#aaa397", light = "#c5bcac", dark = "#817f78";
const mortar = "#77766f", moss = "#78836a";
const slate = "#283c58", slateLight = "#405879", slateDark = "#1c2c43";
const wood = "#69432d", woodLight = "#865837", iron = "#252a30";
const red = "#a52f39", gold = "#dfb755";

function masonry(x0, y0, z0, x1, y1, z1) {
  box(x0, y0, z0, x1, y1, z1, stone);
}

// Square, thick courtyard walls.
masonry(8, 8, 0, 40, 11, 19);
masonry(8, 37, 0, 40, 40, 19);
masonry(8, 12, 0, 11, 36, 19);
masonry(37, 12, 0, 40, 36, 19);

box(12, 8, 19, 36, 11, 20, light);
box(12, 37, 19, 36, 40, 20, light);
box(8, 12, 19, 11, 36, 20, light);
box(37, 12, 19, 40, 36, 20, light);

// Alternating, broad merlons on all four walls.
for (let x = 13; x <= 35; x += 5) {
  masonry(x, 8, 21, Math.min(x + 2, 36), 11, 23);
  masonry(x, 37, 21, Math.min(x + 2, 36), 40, 23);
}
for (let y = 13; y <= 35; y += 5) {
  masonry(8, y, 21, 11, Math.min(y + 2, 36), 23);
  masonry(37, y, 21, 40, Math.min(y + 2, 36), 23);
}

// Rear keep: broad stone body and buttressed front.
masonry(16, 23, 0, 33, 37, 35);
box(15, 22, 0, 18, 24, 32, dark);
box(31, 22, 0, 34, 24, 32, dark);
box(16, 22, 32, 33, 23, 36, light);
box(16, 23, 35, 33, 37, 36, dark);
for (let x = 16; x <= 33; x += 4)
  box(x, 22, 36, Math.min(x + 2, 33), 23, 38, light);

// Steep, tiled gable roof on the keep.
for (let z = 37; z <= 44; z++) {
  const inset = z - 37;
  box(15 + inset, 22, z, 34 - inset, 38, z,
      z % 2 ? slate : slateLight);
  set(15 + inset, 21, z, slateDark);
  set(34 - inset, 21, z, slateDark);
}
box(23, 21, 44, 26, 39, 44, slateDark);

// Keep windows, recessed and framed with pale stone.
for (const x of [19, 29]) {
  box(x - 1, 21, 25, x + 2, 22, 32, light);
  box(x, 20, 26, x + 1, 20, 31, slateDark);
  box(x, 19, 29, x + 1, 19, 29, gold);
  box(x - 1, 20, 25, x + 2, 20, 25, dark);
}
box(23, 21, 33, 27, 22, 35, light);
box(24, 20, 33, 26, 20, 34, slateDark);

// Royal banner between the upper windows.
box(24, 20, 23, 26, 20, 30, gold);
box(24, 19, 24, 26, 19, 29, red);
box(25, 18, 26, 25, 18, 28, gold);
set(24, 19, 23, red);
set(26, 19, 23, red);

// Four round towers, with heavy cornices, conical roofs and flags.
for (const [cx, cy] of [[8, 8], [40, 8], [8, 40], [40, 40]]) {
  cylinder(cx, cy, 0, 5.4, 30, stone);
  cylinder(cx, cy, 27, 5.8, 2, dark);
  cylinder(cx, cy, 29, 5.9, 2, light);
  cylinder(cx, cy, 31, 5.7, 1, slateDark);

  for (let z = 32; z <= 41; z++) {
    const r = Math.max(0.65, 5.9 - (z - 32) * 0.58);
    cylinder(cx, cy, z, r, 1, z % 2 ? slate : slateLight);
  }
  set(cx, cy, 42, gold);
  box(cx, cy, 43, cx, cy, 46, dark);
  box(cx + 1, cy, 44, cx + 4, cy, 46, gold);
  box(cx + 1, cy - 1, 44, cx + 3, cy - 1, 45, red);
  box(cx + 1, cy - 1, 46, cx + 2, cy - 1, 46, red);
  set(cx + 4, cy - 1, 44, red);

  // Deep, narrow arrow slits facing the viewer.
  const faceY = cy - 6;
  box(cx, faceY, 16, cx, faceY, 21, slateDark);
  set(cx, faceY - 1, 19, iron);
  box(cx - 1, faceY, 19, cx + 1, faceY, 19, dark);
  set(cx, faceY - 1, 19, slateDark);
  box(cx, faceY, 7, cx, faceY, 10, slateDark);
}

// Subtle stone variation, confined to visible masonry.
forEach((x, y, z, color) => {
  if (color !== stone) return;
  if (rand() < 0.085) set(x, y, z, light);
  else if (rand() < 0.075) set(x, y, z, dark);
  else if (z < 13 && rand() < 0.012) set(x, y, z, moss);
});

// Staggered block joints along the exposed front wall.
for (let z = 3; z <= 18; z += 4) {
  for (let x = 14 + ((z / 4 | 0) % 2) * 2; x <= 35; x += 5) {
    if (x < 18 || x > 30 || z > 15) {
      set(x, 7, z, mortar);
      set(x, 8, z, mortar);
    }
  }
}

// Arched gate recess cut into the front curtain.
for (let z = 0; z <= 13; z++) {
  const half = z <= 9 ? 5 : z <= 11 ? 4 : z === 12 ? 3 : 2;
  box(24 - half, 7, z, 24 + half, 11, z, null);
}

// Double timber doors, following the curve of the opening.
for (let z = 0; z <= 13; z++) {
  const half = z <= 9 ? 5 : z <= 11 ? 4 : z === 12 ? 3 : 2;
  for (let x = 24 - half; x <= 24 + half; x++)
    box(x, 6, z, x, 7, z, x % 2 ? wood : woodLight);
}
box(24, 5, 0, 24, 5, 12, wood);
for (const z of [3, 8, 11]) {
  const half = z <= 9 ? 5 : 4;
  box(24 - half, 5, z, 24 + half, 5, z, iron);
  for (let x = 24 - half + 1; x < 24 + half; x += 2)
    set(x, 4, z, "#b5a378");
}
for (let z = 1; z <= 10; z += 3) {
  set(21, 5, z, iron);
  set(27, 5, z, iron);
}
set(23, 4, 5, gold);
set(25, 4, 5, gold);

// Chunky pale voussoirs and a projecting keystone around the arch.
box(17, 5, 0, 18, 7, 11, dark);
box(30, 5, 0, 31, 7, 11, dark);
for (let z = 10; z <= 14; z++) {
  const half = z <= 11 ? 5 : z === 12 ? 4 : z === 13 ? 3 : 2;
  box(24 - half - 1, 5, z, 24 - half, 6, z, light);
  box(24 + half, 5, z, 24 + half + 1, 6, z, light);
}
box(21, 5, 15, 27, 6, 15, light);
box(23, 4, 15, 25, 5, 16, gold);
box(17, 5, 0, 31, 7, 0, dark);