File:Roesch vs Schlage, 1910.gif

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia

Original file(800 × 800 pixels, file size: 1.63 MB, MIME type: image/gif, looped, 33 frames, 50 s)

Summary

Description
English: Animation of the 1910 Roesch vs Schlage chess game which was used by Stanley Kubrick in his movie 2001: A Space Odyssey
Date
Source Own work
Author Morn
GIF development
InfoField
 
This GIF graphic was created with Python.
Source code
InfoField

Python code

Source code
#!/usr/bin/env python3

# Plot a PGN game using python-chess and ImageMagick

import os
import chess.pgn
import chess.svg

pgn = open('roesch_schlage_1910.pgn')
game = chess.pgn.read_game(pgn)
board = game.board()

def svg(i):
    lm = board.peek()
    a = [(lm.from_square, lm.to_square)]
    s = chess.svg.board(board, arrows = a, size = 800)

    f1 = "g_%04u.svg" % i
    f2 = "g_%04u.png" % i

    with open(f1, 'w') as f:
        f.write(s)
    os.system("convert %s %s" % (f1, f2))
    os.system("rm %s" % f1)

i = 1

for m in game.mainline_moves():
    board.push(m)
    svg(i)
    i += 1

# pause animation at the end:
for j in range(3):
    svg(i)
    i += 1

# create animation with
# convert -delay 150 g_*.png -loop 0 g.gif

PGN

[Event "Hamburg"]
[Site "Hamburg GER"]
[Date "1910.??.??"]
[EventDate "?"]
[Round "?"]
[Result "0-1"]
[White "Roesch"]
[Black "Willi Schlage"]
[ECO "C77"]
[PlyCount "30"]

1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6 5.Qe2 b5 6.Bb3 Be7 7.c3
O-O 8.O-O d5 9.exd5 Nxd5 10.Nxe5 Nf4 11.Qe4 Nxe5 12.Qxa8 Qd3
13.Bd1 Bh3 14.Qxa6 Bxg2 15.Re1 Qf3 0-1

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

16 December 2020

image/gif

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current13:10, 16 December 2020Thumbnail for version as of 13:10, 16 December 2020800 × 800 (1.63 MB)MornUploaded own work with UploadWizard
The following pages on the English Wikipedia use this file (pages on other projects are not listed):

Global file usage

The following other wikis use this file: