Floodlight Big Ben in the BritX ident
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -113,23 +113,23 @@ AMBER, STONE, NIGHT = '#E8A33D', '#1A2230', '#0B0F18'
|
||||
rng = random.Random(115)
|
||||
stars = ''.join(f'<circle cx="{rng.randrange(1920)}" cy="{rng.randrange(620)}" r="{rng.choice((1.5, 2, 2.5))}" fill="#DCE6F5" opacity="{rng.uniform(.3, .9):.2f}"/>' for _ in range(110))
|
||||
render(exports / 'bg_sky.png', svg(1920, 1080, f'<rect width="1920" height="1080" fill="url(#s)"/>{stars}<circle cx="1120" cy="170" r="52" fill="#E8EDF5"/><circle cx="1120" cy="170" r="120" fill="url(#m)"/>',
|
||||
'<linearGradient id="s" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#060A14"/><stop offset=".55" stop-color="#16233A"/><stop offset=".8" stop-color="#4A3226"/></linearGradient><radialGradient id="m"><stop offset=".3" stop-color="#E8EDF5" stop-opacity=".35"/><stop offset="1" stop-color="#E8EDF5" stop-opacity="0"/></radialGradient>'))
|
||||
'<linearGradient id="s" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#060A14"/><stop offset=".5" stop-color="#1C2C4A"/><stop offset=".66" stop-color="#6A4630"/></linearGradient><radialGradient id="m"><stop offset=".3" stop-color="#E8EDF5" stop-opacity=".35"/><stop offset="1" stop-color="#E8EDF5" stop-opacity="0"/></radialGradient>'))
|
||||
def windows(x, y, w, h, seed, rate=.35):
|
||||
rng = random.Random(seed)
|
||||
return ''.join(f'<rect x="{wx}" y="{wy}" width="8" height="12" fill="{AMBER}" opacity="{rng.uniform(.5, 1):.2f}"/>' for wy in range(y, y + h, 22) for wx in range(x, x + w, 18) if rng.random() < rate)
|
||||
# The City, with a dome and tall towers, far off.
|
||||
far = '<path d="M210 700V610Q210 540 280 530V490h14v40Q364 540 364 610V700Z" fill="#1A2436"/>'
|
||||
for x, w, h, s in ((0, 140, 170, 1), (150, 70, 120, 2), (400, 110, 150, 3), (520, 80, 260, 4), (610, 130, 140, 5), (760, 70, 190, 6), (850, 150, 120, 7), (1010, 90, 170, 8)):
|
||||
far += f'<rect x="{x}" y="{700 - h}" width="{w}" height="{h}" fill="#1A2436"/>' + windows(x + 8, 712 - h, w - 14, h - 24, s, .25)
|
||||
far += f'<rect x="{x}" y="{700 - h}" width="{w}" height="{h}" fill="#2A3A55"/>' + windows(x + 8, 712 - h, w - 14, h - 24, s, .25)
|
||||
far += '<polygon points="640,700 690,330 740,700" fill="#202C42"/>'
|
||||
render(exports / 'bg_skyline.png', svg(1920, 1080, far))
|
||||
# Parliament and the clock tower, where the flight ends.
|
||||
ben = '<rect x="1000" y="640" width="920" height="70" fill="#141B28"/>' + ''.join(f'<polygon points="{x},640 {x + 10},600 {x + 20},640" fill="#141B28"/>' for x in range(1000, 1920, 46)) + windows(1010, 650, 900, 50, 9, .4)
|
||||
ben += ('<rect x="1490" y="240" width="130" height="470" fill="#1E2736"/><rect x="1480" y="225" width="150" height="16" fill="#2A3548"/><polygon points="1490,225 1555,70 1620,225" fill="#1E2736"/><rect x="1551" y="30" width="8" height="50" fill="#2A3548"/>'
|
||||
'<rect x="1478" y="245" width="154" height="154" fill="#2A3548"/><circle cx="1555" cy="322" r="66" fill="#FFE9B0"/><circle cx="1555" cy="322" r="66" fill="none" stroke="#141B28" stroke-width="7"/>'
|
||||
'<path d="M1555 322V278M1555 322L1588 340" stroke="#141B28" stroke-width="7" stroke-linecap="round"/>' + ''.join(f'<rect x="{x}" y="420" width="12" height="270" fill="#141B28"/>' for x in (1510, 1540, 1570, 1600)))
|
||||
render(exports / 'bg_big_ben.png', svg(1920, 1080, ben + '<circle cx="1555" cy="322" r="130" fill="url(#g)"/>', '<radialGradient id="g"><stop offset=".45" stop-color="#FFE9B0" stop-opacity=".35"/><stop offset="1" stop-color="#FFE9B0" stop-opacity="0"/></radialGradient>'))
|
||||
river = '<rect y="700" width="1920" height="380" fill="url(#r)"/>' + ''.join(f'<rect x="{x}" y="{y}" width="{w}" height="4" fill="{AMBER}" opacity="{o}"/>' for x, y, w, o in ((1480, 730, 150, .6), (1500, 770, 110, .4), (1530, 820, 70, .3), (300, 760, 200, .3), (820, 740, 160, .3), (600, 860, 260, .2), (1100, 930, 300, .2)))
|
||||
ben = '<rect x="1000" y="640" width="920" height="70" fill="#5A4830"/>' + ''.join(f'<polygon points="{x},640 {x + 10},600 {x + 20},640" fill="#5A4830"/>' for x in range(1000, 1920, 46)) + windows(1010, 650, 900, 50, 9, .4)
|
||||
ben += ('<rect x="1490" y="240" width="130" height="470" fill="url(#stone)"/><rect x="1480" y="225" width="150" height="16" fill="#C9A15C"/><polygon points="1490,225 1555,70 1620,225" fill="#7A6238"/><rect x="1551" y="30" width="8" height="50" fill="#C9A15C"/>'
|
||||
'<rect x="1478" y="245" width="154" height="154" fill="#A8854A"/><circle cx="1555" cy="322" r="66" fill="#FFE9B0"/><circle cx="1555" cy="322" r="66" fill="none" stroke="#141B28" stroke-width="7"/>'
|
||||
'<path d="M1555 322V278M1555 322L1588 340" stroke="#141B28" stroke-width="7" stroke-linecap="round"/>' + ''.join(f'<rect x="{x}" y="420" width="12" height="270" fill="#7A6238"/>' for x in (1510, 1540, 1570, 1600)))
|
||||
render(exports / 'bg_big_ben.png', svg(1920, 1080, ben + '<circle cx="1555" cy="322" r="130" fill="url(#g)"/>', '<radialGradient id="g"><stop offset=".45" stop-color="#FFE9B0" stop-opacity=".35"/><stop offset="1" stop-color="#FFE9B0" stop-opacity="0"/></radialGradient><linearGradient id="stone" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#A8854A"/><stop offset="1" stop-color="#E8B865"/></linearGradient>'))
|
||||
river = '<rect y="700" width="1920" height="380" fill="url(#r)"/>' + ''.join(f'<rect x="{x}" y="{y}" width="{w}" height="4" fill="{AMBER}" opacity="{o}"/>' for x, y, w, o in ((1470, 716, 170, .9), (1490, 744, 130, .8), (1500, 778, 110, .65), (1515, 820, 80, .5), (1530, 870, 50, .35), (300, 760, 200, .3), (820, 740, 160, .3), (600, 860, 260, .2), (1100, 930, 300, .2)))
|
||||
render(exports / 'bg_water.png', svg(1920, 1080, river, '<linearGradient id="r" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#1C2738"/><stop offset="1" stop-color="#06090F"/></linearGradient>'))
|
||||
# Tower Bridge, which the camera flies over.
|
||||
tower = lambda x: (f'<g><rect x="{x}" y="180" width="260" height="620" fill="{STONE}"/><polygon points="{x - 14},180 {x + 130},40 {x + 274},180" fill="#10161F"/>'
|
||||
|
||||
Reference in New Issue
Block a user