fogón

← Nature3D assetfogon/enredadera

Enredadera

by fogonCC01642 blocks
EnredaderaDrag to turn it
// «Enredadera» · gpt-6-sol (medium)
// A vine-covered wooden post: a thin vertical brown post wrapped with climbing green vines and leaves, with a few purple flowers.

const cx = 23.5;
const cy = 23.5;

// Solid, softly squared wooden post.
for (let z = 0; z <= 38; z++) {
  for (let x = 21; x <= 26; x++) {
    for (let y = 21; y <= 26; y++) {
      if ((x === 21 || x === 26) && (y === 21 || y === 26)) continue;
      let color = "#a96a38";
      if (y === 21 || x === 21) color = "#ba7941";
      if (y === 26 || x === 26) color = "#87512f";
      if (rand() < 0.08) color = "#c4884b";
      set(x, y, z, color);
    }
  }
}

// Broken vertical bark grooves, visible between turns of the vine.
for (const [x, y, a, b] of [
  [22, 21, 3, 12], [25, 21, 16, 27], [23, 21, 30, 37],
  [21, 23, 8, 19], [26, 24, 24, 35]
]) {
  for (let z = a; z <= b; z++) {
    if (z % 6 !== 0) set(x, y, z, "#784729");
  }
}

// Light wooden end grain.
cylinder(cx, cy, 39, 3, 1, "#d69a59");
box(22, 22, 39, 25, 25, 39, "#e9ae69");
box(23, 23, 39, 24, 24, 39, "#b97940");

// A continuous climbing vine spirals around all four sides.
function vinePoint(z) {
  const angle = z * 0.61 + 0.5;
  return [cx + Math.cos(angle) * 3.5, cy + Math.sin(angle) * 3.5, z];
}
for (let z = 1; z < 38; z += 0.45) {
  const a = vinePoint(z);
  const b = vinePoint(Math.min(z + 0.55, 38));
  line(...a, ...b, 0.8, z % 5 < 2 ? "#308e43" : "#3ba54b");
}

// Short twigs and chunky, sunlit leaves.
for (const z of [4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37]) {
  const [x, y] = vinePoint(z);
  const dx = (x - cx) / 3.5;
  const dy = (y - cy) / 3.5;
  const side = z % 2 ? 1 : -1;
  const tx = -dy * side;
  const ty = dx * side;
  const lx = x + dx * 1.5 + tx * 1.1;
  const ly = y + dy * 1.5 + ty * 1.1;

  line(x, y, z, lx, ly, z + 1, 0, "#318d3d");
  ellipsoid(lx, ly, z + 1,
    Math.abs(dx + tx) > 0.8 ? 2 : 1,
    Math.abs(dy + ty) > 0.8 ? 2 : 1,
    1, "#42b94d");
  set(lx, ly, z + 2, "#79dc69");
}

// A few leaves and tendrils spreading around the foot.
for (const [x, y, z] of [
  [19, 21, 1], [28, 23, 1], [22, 28, 1], [25, 19, 2]
]) {
  line(24, 24, 1, x, y, z, 0, "#328c40");
  ellipsoid(x, y, z, 2, 1, 1, "#48bf50");
  set(x, y, z + 1, "#78d768");
}

// Purple blossoms sit in front of the foliage, facing the viewer.
function flower(x, y, z) {
  line(x, 21, z - 2, x, y + 1, z, 0, "#359a42");
  for (const [ox, oz] of [[-1, 0], [1, 0], [0, -1], [0, 1]]) {
    sphere(x + ox, y + 1, z + oz, 1, "#a75bdd");
    set(x + ox, y, z + oz, "#cb85ef");
  }
  set(x, y - 1, z, "#ffd765");
  set(x, y - 1, z + 1, "#fff0a0");
}
flower(20, 17, 10);
flower(27, 17, 21);
flower(21, 16, 30);
flower(26, 17, 35);