fogón

← Animals3D assetfogon/cobayo

Cobayo

by fogonCC021033 blocks
CobayoDrag to turn it
// «Cobayo» · gpt-6-sol (medium)
// A round plump cartoon guinea pig, horizontal along y, head at the front (-y): a loaf-shaped body with patches of white, ginger and black, no visible tail, tiny round ears, black dot eyes and a pink nose, and four very tiny feet barely visible under the body.

part("body", [24, 24, 0]);

const ivory = ["#d9c8b2", "#f2e4ce", "#fff4e1"];
const ginger = ["#aa542b", "#d47432", "#ed984b"];
const charcoal = ["#191a22", "#282831", "#3c3a40"];

function fur(shades, z) {
  let i = z > 23 ? 2 : z < 12 ? 0 : 1;
  if (rand() < 0.075) i = Math.max(0, Math.min(2, i + (rand() < 0.5 ? -1 : 1)));
  return shades[i];
}

function inside(x, y, z, cx, cy, cz, rx, ry, rz) {
  return ((x-cx)/rx)**2 + ((y-cy)/ry)**2 + ((z-cz)/rz)**2 <= 1;
}

// A broad, low loaf. Markings are part of the fur, not raised spots.
for (let x = 8; x <= 40; x++)
for (let y = 8; y <= 44; y++)
for (let z = 3; z <= 31; z++) {
  if (!inside(x,y,z,24,26,17,16,18,14)) continue;

  let coat = ivory;
  if (((x-16)/10)**2 + ((y-27)/12)**2 < 1.1 && z >= 14)
    coat = ginger;
  if (((x-33)/10)**2 + ((y-35)/11)**2 < 1.05 && z >= 14)
    coat = charcoal;
  set(x,y,z,fur(coat,z));
}

// Four little paws peeking out beneath the loaf.
ellipsoid(14, 13, 2, 3, 3, 2, "#bb622e");
ellipsoid(34, 13, 2, 3, 3, 2, "#bb622e");
ellipsoid(14, 37, 2, 3, 3, 2, "#e6d4b9");
ellipsoid(34, 37, 2, 3, 3, 2, "#25252d");
box(13, 10, 0, 15, 14, 1, "#a9512a");
box(33, 10, 0, 35, 14, 1, "#a9512a");
box(13, 35, 0, 15, 39, 1, "#d4bea4");
box(33, 35, 0, 35, 39, 1, "#1a1a21");

// Big rounded head, with an unmistakable white blaze down its face.
for (let x = 10; x <= 38; x++)
for (let y = 2; y <= 22; y++)
for (let z = 7; z <= 31; z++) {
  if (!inside(x,y,z,24,12,19,14,10,12)) continue;
  let blaze = Math.abs(x-24) <= (z >= 22 ? 4 : 3) && y <= 15;
  let cheek = z <= 18 && y <= 10 && Math.abs(x-24) <= 10;
  set(x,y,z,fur(blaze || cheek ? ivory : ginger,z));
}

// Tiny rounded ears and their rosy centers.
ellipsoid(13, 12, 30, 3, 2, 4, "#d87838");
ellipsoid(35, 12, 30, 3, 2, 4, "#d87838");
ellipsoid(13, 9, 30, 2, 1, 2, "#e9a0a0");
ellipsoid(35, 9, 30, 2, 1, 2, "#e9a0a0");

// Puffy muzzle, bead eyes, and a small pink nose.
ellipsoid(20, 5, 14, 5, 3, 4, "#fff0d9");
ellipsoid(28, 5, 14, 5, 3, 4, "#fff0d9");
ellipsoid(17, 4, 23, 2, 2, 2, "#15151c");
ellipsoid(31, 4, 23, 2, 2, 2, "#15151c");
set(17, 2, 24, "#ffffff");
set(31, 2, 24, "#ffffff");
ellipsoid(24, 1, 15, 2, 2, 2, "#ef8f9c");
set(23, 0, 16, "#ffc0c3");
set(24, 1, 12, "#a96d68");

animate("body", {type:"bob", axis:"z", speed:6, amplitude:0.5});