fogón

← Animals3D assetfogon/cebra

Cebra

by fogonCC09323 blocks
CebraDrag to turn it
// «Cebra» · gpt-6-sol (medium)
// A chunky cartoon zebra, horizontal along y, head at the front (-y): a white horse-like body with bold black stripes, four legs with black hooves, a head with a black muzzle, black dot eyes, upright ears and a short stiff black and white striped mane along the neck. A thin tail with a black tuft.

const white = "#f4f1e9";
const light = "#fffdf5";
const shade = "#d7d4cc";
const black = "#202125";
const deep = "#111317";

// Round, chunky body.
ellipsoid(24, 26, 21, 11, 13, 8, white);

// Fur shading and bold stripes that wrap over the back and down the flanks.
forEach((x, y, z, color) => {
  if (color !== white) return;
  const surface =
    !get(x - 2, y, z) || !get(x + 2, y, z) ||
    !get(x, y, z + 2);
  if (!surface) return;

  set(x, y, z, z >= 25 ? light : z <= 17 ? shade : white);
  const stripePosition = y - (z - 21) * 0.20
    - (Math.abs(x - 24) - 7) * 0.07;
  if (z >= 16 && [19, 25, 31, 36].some(v => Math.abs(stripePosition - v) < 1.45)) {
    set(x, y, z, black);
  } else if (rand() < 0.045) {
    set(x, y, z, z > 22 ? light : shade);
  }
});

// Chest and rising neck.
ellipsoid(24, 15, 26, 7, 7, 10, white);
ellipsoid(24, 13, 29, 6, 6, 9, light);
forEach((x, y, z, color) => {
  if (y < 10 || y > 21 || z < 24 || z > 37) return;
  if (color !== white && color !== light) return;
  if (Math.abs(x - 24) < 4) return;
  const diagonal = z - (y - 15) * 0.65;
  if (Math.abs(diagonal - 27) < 1.25 ||
      Math.abs(diagonal - 33) < 1.15) {
    set(x, y, z, black);
  }
});

// Short, stiff mane along the back of the neck.
line(24, 20, 24, 24, 17, 38, 2, black);
for (let z = 27; z <= 38; z += 3) {
  const y = Math.round(20 - (z - 27) * 0.27);
  box(22, y, z, 26, y + 1, z + 1, deep);
  box(23, y + 1, z + 2, 25, y + 2, z + 3, z % 2 ? white : black);
}

// Big horse-like head and upright ears.
ellipsoid(24, 10, 33, 6, 6, 6, white);
ellipsoid(24, 8, 30, 5, 5, 4, shade);
ellipsoid(24, 5, 29, 5, 3, 3, black);
box(21, 2, 29, 22, 3, 30, deep);
box(26, 2, 29, 27, 3, 30, deep);

for (const x of [19, 29]) {
  ellipsoid(x, 11, 40, 2, 2, 4, black);
  box(x, 9, 39, x, 9, 42, white);
  set(x, 9, 43, shade);
}

// Simple, bright cartoon eyes.
for (const x of [19, 29]) {
  sphere(x, 8, 34, 1, deep);
}
set(18, 7, 35, light);
set(30, 7, 35, light);

// Thin tail with a dark tuft.
line(24, 38, 23, 24, 42, 21, 1, shade);
line(24, 42, 21, 24, 43, 19, 1, black);
ellipsoid(24, 43, 18, 2, 2, 3, black);
box(24, 44, 16, 24, 45, 17, deep);

// Four independently swinging legs.
function leg(name, x, y, speed) {
  part(name, [x, y, 16]);
  ellipsoid(x, y, 13, 3, 3, 5, white);
  box(x - 2, y - 2, 5, x + 2, y + 2, 13, white);
  box(x - 2, y - 2, 5, x + 2, y - 2, 8, shade);
  box(x - 3, y - 3, 0, x + 3, y + 2, 3, black);
  box(x - 3, y - 3, 3, x + 3, y + 2, 4, "#38393b");
  box(x - 2, y - 3, 0, x + 2, y - 3, 1, deep);
  animate(name, { type: "swing", axis: "x", speed, amplitude: 0.3 });
  part("body");
}

leg("front-left", 17, 17, 5);
leg("front-right", 31, 17, -5);
leg("rear-left", 17, 34, -5);
leg("rear-right", 31, 34, 5);