Identidad: símbolo, logotipo (Dracutaz) y firma; dibujo nuevo con presencias; League Gothic

- docs/marca: símbolo (calle-persona) en positivo, negativo y naranja; logotipo
  en una y dos líneas, convertido a trazados; hoja de marca y alternativas
  de pincel (solo uso personal)
- docs/calle.svg: calle pintada que se disuelve, sin edificios; las presencias
  forman una persona grande con el puño en alto
- maqueta: firma en la cabecera, portada con lema y dibujo; League Gothic en
  lugar de New Rocker, Anton y Special Elite
This commit is contained in:
hacklab 2026-10-13 13:14:36 +02:00
parent df4d68724d
commit 69d84e5a3d
25 changed files with 1451 additions and 1999 deletions

View file

@ -1,156 +1,108 @@
# Genera docs/calle.svg: calle en perspectiva, gente saliendo de los portales.
# Calzada y acera con líneas limpias; edificios a mano alzada; gente con trazo difuso.
# Genera docs/calle.svg: calle pintada que se disuelve, con «presencias» que,
# juntas, forman una figura grande con el puño en alto (a la manera de Suso33).
import sys, random, math
random.seed(1310)
random.seed(26)
OUT = sys.argv[1]
W, H = 1200, 640
VX, VY, F = 600, 205, 500 # punto de fuga y focal
EYE = 4.0 # cámara a 4 m (desde un balcón)
ROAD, WALK, TOP = 3.4, 6.6, -16.0 # medio ancho calzada, fachada, altura
W, H = 1600, 900
VX, VY = 800, 70 # punto de fuga
INK, ORA = "#111", "#ff7a1a"
o = []
add = o.append
def P(X, Y, Z): # Y hacia abajo, suelo en Y = EYE
return VX + X * F / Z, VY + Y * F / Z
def poly(pts, **a):
d = "M" + " L".join(f"{x:.1f},{y:.1f}" for x, y in pts) + "Z"
add(f'<path d="{d}" ' + " ".join(f'{k.replace("_","-")}="{v}"' for k, v in a.items()) + "/>")
def line(p, q, w, filt=None, col=INK, op=1):
f = f' filter="url(#{filt})"' if filt else ""
add(f'<line x1="{p[0]:.1f}" y1="{p[1]:.1f}" x2="{q[0]:.1f}" y2="{q[1]:.1f}" stroke="{col}" stroke-width="{w:.1f}" stroke-linecap="round" opacity="{op}"{f}/>')
def esc(y): # tamaño según la distancia
return max(0.0, (y - VY) / (H - VY))
ZN, ZF = 4.4, 400.0
add(f'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 {W} {H}" width="{W}" height="{H}">')
def edge(xb, y): # x de una recta que va del punto de fuga a (xb, H)
return VX + (xb - VX) * esc(y)
Y0 = 210 # lo de arriba queda en blanco: se recorta
add(f'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 {Y0} {W} {H - Y0}" width="{W}" height="{H - Y0}">')
add('''<defs>
<filter id="lapiz" x="-5%" y="-5%" width="110%" height="110%"><feTurbulence type="fractalNoise" baseFrequency="0.035" numOctaves="2" seed="3"/><feDisplacementMap in="SourceGraphic" scale="4"/></filter>
<filter id="trazo" x="-30%" y="-30%" width="160%" height="160%"><feTurbulence type="fractalNoise" baseFrequency="0.13" numOctaves="2" seed="5" result="t"/><feDisplacementMap in="SourceGraphic" in2="t" scale="3.5" result="d"/><feGaussianBlur in="d" stdDeviation="0.45"/></filter>
<filter id="spray" x="-30%" y="-30%" width="160%" height="160%"><feTurbulence type="fractalNoise" baseFrequency="0.09" numOctaves="3" seed="8" result="t"/><feDisplacementMap in="SourceGraphic" in2="t" scale="9" result="d"/><feGaussianBlur in="d" stdDeviation="0.7"/></filter>
<radialGradient id="luz"><stop offset="0" stop-color="#ff7a1a" stop-opacity=".9"/><stop offset="1" stop-color="#ff7a1a" stop-opacity="0"/></radialGradient>
<clipPath id="lienzo"><rect width="1200" height="640"/></clipPath>
<filter id="brocha" x="-10%" y="-10%" width="120%" height="120%"><feTurbulence type="fractalNoise" baseFrequency="0.015 0.15" numOctaves="3" seed="4" result="t"/><feDisplacementMap in="SourceGraphic" in2="t" scale="6"/></filter>
<filter id="pintura" x="-20%" y="-20%" width="140%" height="140%"><feTurbulence type="fractalNoise" baseFrequency="0.6" numOctaves="2" seed="9" result="t"/><feDisplacementMap in="SourceGraphic" in2="t" scale="2.2"/></filter>
<filter id="sombra" x="-20%" y="-20%" width="140%" height="140%"><feGaussianBlur stdDeviation="1.2"/></filter>
<filter id="grano"><feTurbulence type="fractalNoise" baseFrequency="0.012 0.05" numOctaves="4" seed="2"/><feColorMatrix values="0 0 0 0 0.07 0 0 0 0 0.07 0 0 0 0 0.07 0 0 0 -2.2 1.25"/></filter>
<linearGradient id="fv" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#000"/><stop offset=".3" stop-color="#000"/><stop offset=".62" stop-color="#fff"/></linearGradient>
<radialGradient id="fh" cx=".5" cy=".95" r=".75"><stop offset=".55" stop-color="#fff"/><stop offset="1" stop-color="#000"/></radialGradient>
<linearGradient id="gl"><stop offset="0" stop-color="#000"/><stop offset=".12" stop-color="#fff"/><stop offset=".88" stop-color="#fff"/><stop offset="1" stop-color="#000"/></linearGradient>
<mask id="lados" maskUnits="userSpaceOnUse" x="0" y="0" width="1600" height="900"><rect width="1600" height="900" fill="url(#gl)"/></mask>
<mask id="borde" maskUnits="userSpaceOnUse" x="0" y="0" width="1600" height="900"><rect width="1600" height="900" fill="url(#fh)"/></mask>
<mask id="disipa" maskUnits="userSpaceOnUse" x="0" y="0" width="1600" height="900"><g mask="url(#borde)"><rect width="1600" height="900" fill="url(#fv)"/></g></mask>
</defs>''')
add(f'<g clip-path="url(#lienzo)"><rect width="{W}" height="{H}" fill="#fff"/>')
# luz naranja al fondo de la calle
add(f'<ellipse cx="{VX}" cy="{VY-10}" rx="170" ry="120" fill="url(#luz)"/>')
add(f'<g filter="url(#spray)">')
for _ in range(28):
a = random.uniform(0, 2*math.pi); r = random.uniform(30, 190)
add(f'<circle cx="{VX+r*math.cos(a)*1.2:.0f}" cy="{VY-10+r*math.sin(a)*.7:.0f}" r="{random.uniform(1.5,6):.1f}" fill="{ORA}"/>')
add('</g>')
# --- calle pintada: todo dentro de la máscara que la disipa ---
add('<g mask="url(#lados)"><g mask="url(#disipa)">')
road = [(VX, VY), (edge(-150, H), H), (edge(1750, H), H)]
add(f'<path d="M{VX},{VY} L-150,{H} L1750,{H}Z" fill="#f1efe9"/>')
def brush(x0, y0, x1, y1, w, n, col=INK, op=.85):
for _ in range(n):
j = lambda: random.uniform(-w, w) * .5
add(f'<line x1="{x0+j():.1f}" y1="{y0+j():.1f}" x2="{x1+j():.1f}" y2="{y1+j():.1f}" '
f'stroke="{col}" stroke-width="{random.uniform(w*.25, w*.6):.1f}" stroke-linecap="round" opacity="{random.uniform(op*.5, op):.2f}"/>')
add('<g filter="url(#brocha)">')
for xb, w in ((-150, 26), (1750, 26)): # bordillos
y0 = VY + 40
brush(edge(xb, y0), y0, xb, H + 30, w, 7)
add('</g></g></g>')
# --- fachadas (a mano alzada) ---
def fachada(s):
X = s * WALK
# línea de cornisas / pisos
for Y in (EYE - 3.2, EYE - 6.8, EYE - 10.4, EYE - 14.0):
line(P(X, Y, ZN), P(X, Y, ZF), 2.2, "lapiz")
# aristas verticales de los portales y ventanas
z = ZN + 1.2
i = 0
while z < 90:
dz = 1.5
# portal
poly([P(X, EYE, z), P(X, EYE - 2.6, z), P(X, EYE - 2.6, z + dz), P(X, EYE, z + dz)],
fill=ORA if i % 2 == 0 else "#fff", stroke=INK, stroke_width=f"{max(1.2, 30/z):.1f}", filter="url(#lapiz)")
if i % 2 == 1:
poly([P(X, EYE, z+.2), P(X, EYE - 2.4, z+.2), P(X, EYE - 2.4, z + dz-.2), P(X, EYE, z + dz-.2)], fill=INK, opacity=".85", filter="url(#lapiz)")
# ventanas encima
for Yb in (EYE - 4.2, EYE - 7.8, EYE - 11.4):
poly([P(X, Yb, z+.15), P(X, Yb - 1.8, z+.15), P(X, Yb - 1.8, z + dz-.15), P(X, Yb, z + dz-.15)],
fill="none", stroke=INK, stroke_width=f"{max(.8, 18/z):.1f}", filter="url(#lapiz)")
z += dz + 2.2 + z * .12
i += 1
fachada(-1); fachada(1)
# --- figura grande: siluetas sencillas en coordenadas de la imagen ---
def cap(px, py, ax, ay, bx, by, r): # cápsula (segmento con radio)
dx, dy = bx - ax, by - ay
t = max(0, min(1, ((px - ax) * dx + (py - ay) * dy) / (dx * dx + dy * dy)))
return math.hypot(px - (ax + t * dx), py - (ay + t * dy)) < r
K, YT = .8, 250 # escala y altura de la figura
def dentro(x, y):
x, y = 800 + (x - 800) / K, 60 + (y - YT) / K
return (math.hypot(x - 772, (y - 205) * .9) < 56 or # cabeza
cap(x, y, 790, 372, 815, 560, 88) or # tronco
cap(x, y, 735, 360, 590, 270, 34) or cap(x, y, 590, 270, 560, 150, 32) or # brazo en alto
math.hypot(x - 556, y - 128) < 46 or # puño
cap(x, y, 880, 360, 960, 470, 32) or cap(x, y, 960, 470, 935, 585, 30) or # brazo bajo
cap(x, y, 770, 590, 700, 735, 44) or cap(x, y, 700, 735, 650, 870, 40) or # pierna
cap(x, y, 860, 590, 940, 720, 44) or cap(x, y, 940, 720, 1010, 860, 40)) # pierna
# --- acera y calzada (líneas limpias) ---
for s in (-1, 1):
# acera (gris claro) y bordillo
poly([P(s*ROAD, EYE-.15, ZN), P(s*WALK, EYE-.15, ZN), P(s*WALK, EYE-.15, ZF), P(s*ROAD, EYE-.15, ZF)], fill="#f2f2f2")
poly([P(s*ROAD, EYE-.15, ZN), P(s*ROAD, EYE, ZN), P(s*ROAD, EYE, ZF), P(s*ROAD, EYE-.15, ZF)], fill=INK)
line(P(s*ROAD, EYE-.15, ZN), P(s*ROAD, EYE-.15, ZF), 3)
line(P(s*WALK, EYE, ZN), P(s*WALK, EYE, ZF), 3)
# juntas de las baldosas
z = ZN
while z < 120:
line(P(s*ROAD, EYE-.15, z), P(s*WALK, EYE-.15, z), max(.6, 9/z))
z *= 1.12
for k in (1, 2):
Xk = s * (ROAD + (WALK - ROAD) * k / 3)
line(P(Xk, EYE-.15, ZN), P(Xk, EYE-.15, ZF), .8, op=.6)
# línea discontinua central
z = ZN
while z < 200:
poly([P(-.08, EYE, z), P(.08, EYE, z), P(.08, EYE, z+2.2), P(-.08, EYE, z+2.2)], fill=INK)
z += 2.2 + 2.6 + z * .08
# bordes de la calzada
for s in (-1, 1):
line(P(s*(ROAD-.25), EYE, ZN), P(s*(ROAD-.25), EYE, ZF), 2.4)
# paso de cebra delante
for i in range(-6, 7):
x0 = i * .52
poly([P(x0-.2, EYE, ZN+.2), P(x0+.2, EYE, ZN+.2), P(x0+.2, EYE, ZN+2.6), P(x0-.2, EYE, ZN+2.6)], fill=INK)
# --- gente (trazo difuso) ---
def persona(X, Z, col=INK, pose=None):
x, y = P(X, EYE, Z)
h = 1.72 * F / Z
if pose is None:
pose = random.choice(["anda", "anda", "puño", "brazos", "anda"])
paso = random.uniform(-1, 1)
w = max(1.1, .042 * h)
hd = (x + random.uniform(-.02, .02) * h, y - .9 * h)
nk, hip = (x, y - .8 * h), (x + paso * .01 * h, y - .48 * h)
sh_l, sh_r = (x - .11 * h, y - .78 * h), (x + .11 * h, y - .78 * h)
pie_l, pie_r = (x - .05*h - paso*.08*h, y), (x + .05*h + paso*.08*h, y)
rod_l, rod_r = (x - .04*h - paso*.04*h, y - .25*h), (x + .04*h + paso*.05*h, y - .25*h)
if pose == "puño":
m_l, c_l = (x - .14*h, y - .46*h), (x - .15*h, y - .62*h)
m_r, c_r = (x + .1*h, y - 1.18*h), (x + .17*h, y - .98*h)
elif pose == "brazos":
m_l, c_l = (x - .26*h, y - 1.12*h), (x - .2*h, y - .95*h)
m_r, c_r = (x + .26*h, y - 1.12*h), (x + .2*h, y - .95*h)
# --- presencias ---
def presencia(x, y, s, col):
h = 46 * s # alto de la figura
r = h * random.uniform(.10, .13) # cabeza
lean = random.uniform(-.12, .12) * h
w = h * random.uniform(.13, .19) # hombros
fx = x + lean # pies
# sombra hacia abajo a la derecha
L = h * random.uniform(.9, 1.3)
add(f'<path d="M{fx-w*.25:.1f},{y:.1f} L{fx+L*.85:.1f},{y+L*.42:.1f} L{fx+L*.85+w*.25:.1f},{y+L*.42-w*.2:.1f} L{fx+w*.3:.1f},{y-w*.15:.1f}Z" fill="{INK}" opacity=".22" filter="url(#sombra)"/>')
sx, sy = x, y - h + 2 * r # hombros
split = random.random() < .35 # piernas abiertas al andar
if split:
d = (f'M{sx-w/2:.1f},{sy:.1f} Q{sx-w*.55:.1f},{sy+h*.35:.1f} {fx-w*.32:.1f},{y:.1f} '
f'L{fx-w*.12:.1f},{y:.1f} L{fx:.1f},{y-h*.3:.1f} L{fx+w*.12:.1f},{y:.1f} L{fx+w*.32:.1f},{y:.1f} '
f'Q{sx+w*.55:.1f},{sy+h*.35:.1f} {sx+w/2:.1f},{sy:.1f} Z')
else:
m_l, c_l = (x - .15*h - paso*.05*h, y - .44*h), (x - .16*h, y - .6*h)
m_r, c_r = (x + .15*h + paso*.05*h, y - .44*h), (x + .16*h, y - .6*h)
def tr(*pts, ww):
d = "M" + " L".join(f"{a+random.uniform(-.6,.6):.1f},{b+random.uniform(-.6,.6):.1f}" for a, b in pts)
add(f'<path d="{d}" fill="none" stroke="{col}" stroke-width="{ww:.1f}" stroke-linecap="round" stroke-linejoin="round"/>')
for pas in range(2): # dos pasadas desplazadas = trazo suelto
ww = w * (1 if pas == 0 else .6)
dx, dy = (0, 0) if pas == 0 else (random.uniform(-.03, .03) * h, random.uniform(-.02, .02) * h)
add(f'<g opacity="{.92 if pas == 0 else .45}" transform="translate({dx:.1f},{dy:.1f})">')
tr(nk, hip, ww=ww * 1.5)
tr(hip, rod_l, pie_l, ww=ww)
tr(hip, rod_r, pie_r, ww=ww)
tr(sh_l, c_l, m_l, ww=ww * .85)
tr(sh_r, c_r, m_r, ww=ww * .85)
tr(sh_l, sh_r, ww=ww * 1.2)
add(f'<ellipse cx="{hd[0]:.1f}" cy="{hd[1]:.1f}" rx="{.062*h:.1f}" ry="{.072*h:.1f}" fill="{col}"/>')
add('</g>')
d = (f'M{sx-w/2:.1f},{sy:.1f} Q{sx-w*.45:.1f},{sy+h*.45:.1f} {fx-w*.1:.1f},{y:.1f} '
f'L{fx+w*.1:.1f},{y:.1f} Q{sx+w*.45:.1f},{sy+h*.45:.1f} {sx+w/2:.1f},{sy:.1f} Z')
add(f'<path d="{d}" fill="{col}"/>')
add(f'<ellipse cx="{sx+lean*.1:.1f}" cy="{sy-r*.9:.1f}" rx="{r:.1f}" ry="{r*1.12:.1f}" fill="{col}"/>')
gente = []
# saliendo de los portales (en la acera)
for s in (-1, 1):
z = ZN + 1.2; i = 0
while z < 70:
if i % 2 == 0:
for k in range(random.randint(1, 3)):
gente.append((s * random.uniform(WALK - 1.6, WALK - .4), z + random.uniform(.2, 1.4), INK))
z += 1.5 + 2.2 + z * .12; i += 1
# bajando a la calzada, hacia el centro
for _ in range(42):
Z = math.exp(random.uniform(math.log(6.5), math.log(70)))
gente.append((random.uniform(-ROAD + .4, ROAD - .4), Z, ORA if random.random() < .22 else INK))
gente.sort(key=lambda g: -g[1])
add('<g filter="url(#trazo)">')
for X, Z, col in gente:
persona(X, Z, col)
add('</g>')
# salpicaduras sueltas
add('<g filter="url(#spray)">')
for _ in range(40):
add(f'<circle cx="{random.uniform(0,W):.0f}" cy="{random.uniform(H*.55,H):.0f}" r="{random.uniform(1,3.5):.1f}" fill="{INK}" opacity=".7"/>')
add('</g>')
pts = []
def libre(x, y, s):
return all(math.hypot(x - a, (y - b) * 1.6) > 17 * max(s, t) for a, b, t in pts)
for _ in range(200000): # la figura grande, densa
x, y = random.uniform(400, 1150), random.uniform(240, 890)
if dentro(x, y):
s = .62 + .38 * esc(y)
if libre(x, y, s * 1.35):
pts.append((x, y, s))
grande = len(pts)
for _ in range(900): # poca gente suelta, por la calle
y = random.uniform(300, 880)
x = random.uniform(edge(-150, y), edge(1750, y))
s = .62 + .38 * esc(y)
if not dentro(x, y) and libre(x, y, s * 5) and random.random() < .35:
pts.append((x, y, s))
pts.sort(key=lambda p: p[1]) # de lejos a cerca
add('<g filter="url(#pintura)" mask="url(#lados)">')
for x, y, s in pts:
presencia(x, y, s, ORA if random.random() < .05 else INK)
add('</g></svg>')
open(OUT, "w").write("\n".join(o))
print(f"{len(pts)} presencias ({grande} en la figura grande)", file=sys.stderr)