# Chitrakāvya: poems that are programs

*Sanskrit poets encoded knight's tours, magic squares and palindromic surfaces into verse, a thousand years before Euler. An archive that reads those compositions as computational objects.*

# Poems that are also diagrams and algorithms.

Sanskrit poets encoded knight's tours, magic squares and palindromic surfaces into verse, about a thousand years before Euler. This archive reads those compositions as computational objects: one text that is a poem, a figure and a program at once.

Rebuilt from the project originally hosted by the Computational Sciences Laboratory at IIIT-Bangalore. Link-checked and Flash-free.

1 स्थि

30 रा

9 ग

20 सां

3 स

24 दा

11 रा

26 ध्या

16 वि

19 ह

2 ता

29 क

10 त

27 ता

4 म

23 ता

31 स

8 त्पा

17 दु

14 के

21 स

6 र

25 सा

12 मा

18 रं

15 ग

32 रा

7 ज

28 प

13 दं

22 न

5 य

 move numbers0 / 32

Pādukāsahasra 30.40. Step through the tour that turns verse 929 into verse 930.

## Computation is specifying a structure precisely enough that someone else can reproduce it.

By that definition a chitrakāvya verse is a program. It survives only when read both as sound and as shape. The shapes include wheels, lotuses, drums, swords and chessboards. The readings trace petals, spokes, palindromic symmetry, or the L-shaped jumps of a knight.

A bandha is built to be three things at once: a sound, a shape and a rule. The composer trades execution speed for descriptive density, and Sanskrit's stable word order and single-glyph akṣara make the trade possible.

Three families

-   Aakāra-citra
    
    [Bandha, the shape-poem](/chitrakavya/visuals)
    
    Syllables plotted on a grid form a recognisable figure. The reading rule lives in the figure.
    
-   Gati-citra
    
    [Turagapadabandha, the path-poem](/chitrakavya/knights-tour)
    
    A verse, a Hamiltonian path and a riddle in one. The knight's tour over a 4×8 board.
    
-   Vinyāsa-citra
    
    [Sarvatōbhadra, the arrangement-poem](/chitrakavya/visuals#sarvatobhadra)
    
    “Auspicious in every direction.” Reads the same forward, backward, down and up.
    

In the archive

[Visuals

Thirteen bandhas, drawn as hairline figures.

](/chitrakavya/visuals)[Pādukā

Verses 929 and 930, a chess puzzle that is a hymn.

](/chitrakavya/paduka)[Knight's Tour

Square by square, with the second verse appearing.

](/chitrakavya/knights-tour)[Resources

Papers, books, repositories and primary texts.

](/chitrakavya/resources)[About

The argument, the lineage, a reading list.

](/chitrakavya/about)

---

https://emergence.live/chitrakavya
