fogón

← AnimalesObjeto 3Dfogon/lagartija

Lagartija

de fogonCC04914 bloques
LagartijaArrastrá para girarlo
// «Lagartija» · gpt-6-sol (medium)
// A cartoon lizard, horizontal along y, head at the front (-y): a slim body in bright green with yellow spots, a pointed head with round eyes, four splayed short legs with little toes and a long thin tail curving to the side.

// Bright green body, with a lighter back and a warm belly.
ellipsoid(24, 24, 10, 8, 11, 6, "#49c934");
ellipsoid(24, 23, 13, 7, 10, 3, "#67df40");
ellipsoid(24, 22, 5, 6, 9, 2, "#c5e85a");

// Broad head tapering into a little pointed snout.
ellipsoid(24, 12, 12, 8, 8, 5, "#51ce37");
ellipsoid(24, 8, 11, 6, 5, 3, "#69df40");
box(22, 3, 10, 26, 5, 11, "#69df40");
box(23, 2, 10, 25, 3, 10, "#82e64a");

// Subtle green variation on the large surfaces.
forEach((x, y, z, color) => {
  if (color === "#49c934" && rand() < 0.055)
    set(x, y, z, "#54d23a");
  if (color === "#51ce37" && rand() < 0.045)
    set(x, y, z, "#5bd73b");
});

// Bold, flat yellow spots following the curved top of the back.
function spot(cx, cy, rx, ry, color) {
  for (let x = Math.floor(cx - rx); x <= Math.ceil(cx + rx); x++)
    for (let y = Math.floor(cy - ry); y <= Math.ceil(cy + ry); y++) {
      if (((x - cx) / rx) ** 2 + ((y - cy) / ry) ** 2 > 1) continue;
      for (let z = 19; z >= 9; z--) {
        if (get(x, y, z)) {
          set(x, y, z, color);
          break;
        }
      }
    }
}
spot(21, 19, 2, 2, "#f5e94d");
spot(27, 20, 2, 2, "#ffe95a");
spot(24, 24, 2.5, 2, "#f5e94d");
spot(19, 26, 1.5, 2, "#ffe95a");
spot(29, 27, 1.5, 2, "#f5e94d");
spot(24, 30, 1.5, 1.5, "#ffe95a");

// High-set, round toy eyes, looking toward the front.
for (const x of [18, 30]) {
  sphere(x, 10, 17, 3, "#348e30");
  sphere(x, 9, 17, 2.5, "#fff9df");
  sphere(x, 7, 17, 1.4, "#17292a");
  set(x - 1, 6, 18, "#ffffff");
}
set(22, 3, 11, "#348e30");
set(26, 3, 11, "#348e30");
line(21, 5, 8, 24, 4, 8, 0, "#378e31");
line(24, 4, 8, 27, 5, 8, 0, "#378e31");

// Each short, splayed leg swings independently from its shoulder or hip.
function leg(name, side, y, speed) {
  const hipX = 24 + side * 7;
  const footX = 24 + side * 15;
  part(name, [hipX, y, 9]);
  ellipsoid(hipX + side * 2, y, 7, 3, 3, 3, "#3bad30");
  line(hipX + side * 2, y, 7, footX - side, y + 1, 2, 2, "#48bd32");
  ellipsoid(footX, y, 1, 3, 2.5, 1.5, "#64d83a");
  for (const dx of [-2, 0, 2]) {
    ellipsoid(footX + dx, y - 2, 0, 1, 2, 0.8, "#91e64d");
  }
  animate(name, { type: "swing", axis: "x", speed, amplitude: 0.3 });
}
leg("front-left", -1, 18, 5);
leg("front-right", 1, 18, -5);
leg("rear-left", -1, 29, -5);
leg("rear-right", 1, 29, 5);

// Long, narrowing tail curves to the right.
part("tail", [24, 33, 10]);
line(24, 32, 10, 26, 36, 9, 2.5, "#39aa30");
line(26, 36, 9, 30, 40, 8, 1.8, "#4bc334");
line(30, 40, 8, 35, 43, 8, 1.2, "#59d139");
line(35, 43, 8, 39, 45, 10, 0.7, "#6cdd40");
sphere(27, 37, 11, 1, "#dce94b");
sphere(32, 41, 9, 1, "#e8e94b");
animate("tail", { type: "swing", axis: "z", speed: 4, amplitude: 0.3 });