fogón

← AnimalesObjeto 3Dfogon/cangrejo

Cangrejo

de fogonCC05073 bloques
CangrejoArrastrá para girarlo
// «Cangrejo» · gpt-6-sol (medium)
// A cartoon red crab facing front (-y): a wide flat oval red-orange shell, two eyes on short stalks, two big claws in front and three thin pointed legs on each side.

// A cheerful, wide-shelled crab. Front is toward -y.
const red = "#e9472d";
const lightRed = "#ff6940";
const orange = "#ff8650";
const darkRed = "#ab3028";
const shadow = "#c43b29";

// Six thin, bent legs, with pointed toes on the floor.
for (const side of [-1, 1]) {
  const hipX = 24 + side * 11;
  const legs = [
    { hipY: 19, kneeY: 17, toeY: 15 },
    { hipY: 26, kneeY: 27, toeY: 28 },
    { hipY: 32, kneeY: 36, toeY: 39 }
  ];

  for (const leg of legs) {
    line(hipX, leg.hipY, 12, 24 + side * 17, leg.kneeY, 10, 1.5, darkRed);
    line(24 + side * 17, leg.kneeY, 10, 24 + side * 20, leg.toeY - 1, 7, 1.2, red);
    line(24 + side * 20, leg.toeY - 1, 7, 24 + side * 22, leg.toeY, 0, 0.7, shadow);
    set(24 + side * 22, leg.toeY, 0, darkRed);
  }
}

// Rounded lower rim and broad, flattened upper shell.
ellipsoid(24, 25, 11, 14, 9, 4.5, darkRed);
ellipsoid(24, 25, 13, 13.5, 9.3, 5.5, red);

// Light catches the top; tiny color variations keep the large surface lively.
forEach((x, y, z, color) => {
  if (color === red && z >= 13 && !get(x, y, z + 1)) {
    const n = rand();
    if (z >= 16) set(x, y, z, n < 0.12 ? orange : lightRed);
    else if (n < 0.13) set(x, y, z, shadow);
    else if (n < 0.32) set(x, y, z, lightRed);
  }
});

// A few bold, toy-like markings on the shell.
for (const [x, y] of [[16, 23], [20, 29], [28, 28], [33, 23]]) {
  for (let z = 20; z >= 12; z--) {
    if (get(x, y, z)) {
      set(x, y, z, orange);
      break;
    }
  }
}

// Each oversized claw has its own shoulder pivot.
for (const side of [-1, 1]) {
  const pivotX = 24 + side * 10;
  const palmX = 24 + side * 15;

  part(side < 0 ? "leftClaw" : "rightClaw", [pivotX, 18, 12]);

  // Short arm and chunky mitten-like palm.
  line(pivotX, 18, 12, palmX - side * 2, 13, 12, 2, darkRed);
  line(pivotX, 18, 13, palmX - side * 2, 13, 13, 1.4, lightRed);
  ellipsoid(palmX, 9, 11, 4.3, 4.3, 3.5, darkRed);
  ellipsoid(palmX, 9, 12.5, 4.2, 4, 3, lightRed);
  ellipsoid(palmX - side, 10, 15, 2, 1.5, 0.8, orange);

  // Two separated, blunt tips make the pincers readable from above.
  line(palmX - side * 2.5, 7, 12, palmX - side * 2, 3, 12, 1.1, red);
  line(palmX + side * 2, 7, 12, palmX + side * 1.5, 3, 12, 1.1, red);
  set(palmX - side * 2, 3, 13, lightRed);
  set(palmX + side * 1.5, 3, 13, lightRed);

  animate(side < 0 ? "leftClaw" : "rightClaw", {
    type: "swing", axis: "z", speed: side < 0 ? 3 : -3, amplitude: 0.3
  });
}
part("body");

// Short stalks and two big white eyes facing forward.
for (const x of [19, 29]) {
  cylinder(x, 19, 17, 1.5, 8, red);
  ellipsoid(x, 18, 25, 2.5, 2.4, 2.6, "#fff2d7");
  ellipsoid(x, 15.7, 25, 1.2, 0.9, 1.4, "#272022");
  set(x - 1, 14, 26, "#ffffff");
}

// Little smile and rosy cheek patches on the front of the shell.
for (const x of [22, 23, 24, 25, 26]) set(x, 15, 11, "#772f2c");
set(21, 15, 12, "#772f2c");
set(27, 15, 12, "#772f2c");
ellipsoid(18, 16, 12, 1.5, 0.5, 1, "#ff8061");
ellipsoid(30, 16, 12, 1.5, 0.5, 1, "#ff8061");