fogón

← Basics3D assetfogon/regadera

Regadera

by fogonCC011825 blocks
RegaderaDrag to turn it
// «Regadera» · gpt-6-sol (medium)
// Watering can («Regadera»).

const cx = 24;
const cy = 24;

function bodyRadius(z) {
  if (z < 3) return 9.2 + z * 0.55;
  if (z < 19) return 11;
  if (z < 24) return 11 - (z - 19) * 0.28;
  return 9.6 - (z - 24) * 0.34;
}

// Solid, rounded body
for (let z = 0; z <= 29; z++) {
  const r = bodyRadius(z);
  for (let x = 12; x <= 36; x++) {
    for (let y = 12; y <= 36; y++) {
      const d = Math.hypot(x - cx, y - cy);
      if (d > r) continue;

      let color = "#327c70";
      if (z < 3) color = "#225c53";
      else if (z > 23) color = "#438f7e";
      else if (y < 22) color = "#3b8b7b";

      if (d > r - 1.2 && y < cy) color = "#459686";
      if (d > r - 1.2 && x > cx + 5) color = "#286c62";
      if (rand() < 0.055) color = z > 22 ? "#57a28d" : "#367c70";
      set(x, y, z, color);
    }
  }
}

// Raised vertical flutes on the front
for (let x = 14; x <= 34; x += 3) {
  for (let z = 2; z <= 23; z++) {
    const r = bodyRadius(z);
    const dx = x - cx;
    if (Math.abs(dx) >= r) continue;

    const yf = Math.round(cy - Math.sqrt(r * r - dx * dx));
    set(x, yf - 1, z, z < 4 ? "#39786d" : "#59a18c");
    if (x < 34) set(x + 1, yf - 1, z, "#398577");
  }
}

// Shading and flutes along the right side
for (let z = 1; z <= 21; z++) {
  for (const y of [18, 22, 27, 31]) {
    const r = bodyRadius(z);
    const dy = y - cy;
    const side = Math.round(cx + Math.sqrt(Math.max(0, r * r - dy * dy)));
    set(side, y, z, "#266d63");
    set(side - 1, y, z, "#499181");
  }
}

// Stepped shoulder
for (let z = 24; z <= 29; z++) {
  const r = bodyRadius(z);
  for (let x = 14; x <= 34; x++) {
    for (let y = 14; y <= 34; y++) {
      const d = Math.hypot(x - cx, y - cy);
      if (d <= r - 1.4 && d >= r - 3.1 && (x + y + z) % 4 === 0) {
        set(x, y, z, y < cy ? "#65aa95" : "#3e8576");
      }
    }
  }
}

// Open top and thick rolled rim
ellipsoid(cx, cy, 29, 6.2, 5.7, 1, "#183e39");

for (let z = 30; z <= 33; z++) {
  for (let x = 15; x <= 33; x++) {
    for (let y = 15; y <= 33; y++) {
      const d = Math.hypot((x - cx) / 8, (y - cy) / 7.3);
      if (d < 0.73 || d > 1.04) continue;
      if (z === 33 && y < cy + 1) continue;
      if (z === 32 && y < cy - 3) continue;

      let color = y < cy ? "#69b09a" : "#347d70";
      if (z === 33 || (z === 32 && y < cy)) color = "#77b8a0";
      if (d < 0.83) color = "#27665c";
      set(x, y, z, color);
    }
  }
}

for (let x = 20; x <= 28; x++) {
  for (let y = 20; y <= 27; y++) {
    if (Math.hypot((x - cx) / 6, (y - cy) / 5.5) < 1) {
      set(x, y, 29, y < 24 ? "#204c45" : "#173d38");
    }
  }
}

// Curved spout
line(15, 23, 14, 11, 23, 19, 2.7, "#286e65");
line(11, 23, 19, 8, 23, 26, 2.4, "#337e71");
line(8, 23, 26, 7, 23, 30, 2.1, "#469285");
line(13, 21, 17, 9, 21, 25, 0, "#59a18d");
line(9, 21, 25, 8, 21, 29, 0, "#67ab95");

// Golden sprinkler head
box(3, 19, 29, 10, 26, 30, "#a8893d");
box(4, 20, 31, 9, 25, 31, "#e7ca72");
box(3, 19, 32, 10, 19, 33, "#c7a34e");
box(3, 26, 31, 10, 26, 33, "#a8843c");
box(3, 20, 32, 3, 25, 34, "#e6c46a");
box(10, 20, 32, 10, 25, 34, "#d8b75f");
box(5, 21, 32, 8, 24, 32, "#665927");

for (const x of [5, 8]) {
  for (const y of [21, 24]) {
    set(x, y, 33, "#f1d67c");
    set(x, y, 34, "#b99343");
  }
}
box(5, 19, 34, 7, 20, 34, "#f0d47a");
box(7, 25, 34, 9, 26, 34, "#e2bf64");
set(6, 22, 33, "#554f2c");
set(8, 22, 33, "#554f2c");

// Tall arched handle with a tan wooden grip
line(33, 29, 25, 38, 29, 33, 1.5, "#216a60");
line(38, 29, 33, 38, 29, 37, 1.5, "#34887a");
line(38, 29, 37, 34, 29, 41, 1.5, "#287568");
line(34, 29, 41, 39, 29, 44, 1.5, "#317e70");
line(39, 29, 44, 43, 29, 43, 1.4, "#296f64");
line(37, 28, 36, 34, 28, 40, 0, "#5ca38e");
line(34, 28, 42, 39, 28, 45, 0, "#58a28d");

box(42, 27, 33, 45, 31, 41, "#b38d51");
box(43, 27, 35, 45, 27, 40, "#d0a968");
box(42, 27, 41, 45, 31, 42, "#d8b773");
box(44, 28, 34, 45, 31, 37, "#9b7948");

// Ivory flower on the front
box(30, 13, 13, 31, 15, 18, "#c7ad75");
box(30, 12, 14, 30, 13, 18, "#ead9a5");
box(28, 13, 18, 33, 15, 20, "#d8c48f");
box(30, 12, 16, 31, 14, 22, "#f0e2bc");
box(27, 13, 18, 29, 14, 20, "#f1e2b9");
box(32, 13, 18, 34, 14, 20, "#e7d4a3");
box(29, 13, 21, 32, 14, 22, "#f5e9c7");
box(29, 13, 16, 32, 14, 17, "#ddc99b");
box(30, 11, 18, 31, 12, 19, "#b3975d");
set(30, 10, 19, "#efd99c");