from onepic import *
W,H=1300,1480
s=render((-35,22),W,1300,mirror=True,marks=True,decay='fwd',labels=True)
s=s.replace(f'viewBox="0 0 {W} 1300" width="{W}" height="1300"',f'viewBox="0 0 {W} {H}" width="{W}" height="{H}"')
s=s.replace(f'',f'')
F='font-family="Inter, Helvetica, Arial, sans-serif"'
head=(f''
f'The one picture, with everything in it'
f'Weights, waves, mixing, spin, charge, colour, the mirror half, and the way things decay as time runs forward.')
leg=[("#c9a227","solid","gold pyramid: our side of the bag (the matrix seen from one spot)"),
("#2b7bb9","dash","blue pyramid: the mirror half (antimatter, the far side turned around)"),
("#16a085","dash","teal lines: the octahedron where the two pyramids overlap (Kepler's star, 1619)"),
("#c0392b","arrow","red arrows: decays as time runs forward (heavy settles toward light)"),
("#ffffff","circ","white circles: the blends the weak force meets (neutrino and quark mixing)"),
("#3b4650","text","marks in each bubble: half-arc = spin ½, number = charge, three dots = three colours (quarks only)")]
y0=1250; L=[]
for i,(c,k,t) in enumerate(leg):
x=40; y=y0+i*34
if k=="solid": L.append(f'')
elif k=="dash": L.append(f'')
elif k=="arrow": L.append(f'')
elif k=="circ": L.append(f'')
else: L.append(f'½ ⅔')
L.append(f'{t}')
foot=f'© 2026 Matthew Gelfman · trpgphysics.org · masses: Particle Data Group 2024 · mixing: NuFIT 2024'
s=s.replace('',head+"".join(L)+foot+'')
open("full_leg.svg","w").write(s)