Emergencia climática: la Tierra con sus continentes, que se derrite

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
hacklab 2026-10-14 22:04:59 +02:00
parent 82035a5ff8
commit 33c61af00d
38 changed files with 46 additions and 40 deletions

View file

@ -75,15 +75,21 @@ def hogar(o, col):
chorreon(o, x, 150, l, col)
def clima(o, col):
# El planeta que se derrite: anillo en zigzag, meridianos y chorreones.
# La Tierra que se derrite: anillo en zigzag, continentes en spray (América, África y Europa) y chorreones.
cx, cy, r, pts = 70, 72, 52, []
for i in range(220):
a = 2 * math.pi * i / 219
rr = r - (0 if i % 2 else 11) + random.uniform(-1.5, 1.5)
pts.append((cx + rr * math.cos(a), cy + rr * math.sin(a)))
o.append(f'<path d="M{" L".join(f"{x:.1f},{y:.1f}" for x, y in pts)}" fill="none" stroke="{col}" stroke-width="3.2" stroke-linejoin="round" filter="url(#spray)"/>')
linea(o, [(cx + 44 * math.cos(math.pi * k / 20), cy + 44 * math.sin(math.pi * k / 20) * .32) for k in range(21)], col, 4)
linea(o, [(cx + 44 * math.cos(math.pi * k / 20) * .38, cy - 44 * math.sin(math.pi * k / 20)) for k in range(-10, 11)], col, 4)
norteamerica = [(34, 48), (44, 38), (58, 32), (72, 33), (78, 40), (72, 48), (66, 56), (62, 64), (56, 68), (48, 62), (40, 56)]
sudamerica = [(60, 74), (70, 74), (78, 80), (80, 88), (74, 98), (68, 108), (64, 112), (62, 100), (58, 86)]
europa = [(90, 36), (100, 31), (110, 38), (106, 46), (96, 48), (90, 44)]
africa = [(90, 54), (104, 52), (112, 60), (112, 72), (104, 86), (98, 96), (94, 86), (92, 72), (86, 62)]
for c in (norteamerica, sudamerica, europa, africa):
c = [(cx + (x - cx) * .78, cy + (y - cy) * .78) for x, y in c]
relleno(o, c, col, paso=2.4)
linea(o, c + c[:1], col, 2.5)
for x, l in ((40, 26), (55, 40), (72, 30), (88, 44), (102, 20)):
y0 = cy + math.sqrt(max(0, r * r - (x - cx) ** 2)) - 4
chorreon(o, x, y0, l, col)