ACCP

From Media Design: Networked & Lens-Based wiki
Jump to navigation Jump to search
Encoding the word "Manifesto"

Analogue Circular Communication Protocol

Research

Caesar cipher left shift of 3
Alberti cipher disk
Michael Winkler's system

Since the Roman times mankind was interested to hide written sentences such as in the case of Caesar cipher, which shifts one letter in the alphabet. In the Middle Ages the Italian architect Leon Battista Alberti developed the first polyalphabetic substitution with mixed alphabets and variable period for a cipher disk. In the 1980’s the American artist Michael Winkler started to explore a process, which generates abstract visualizations of the alphabetic code underlying the spelling of words.

Key questions

  • How is possible to translate text into a visual medium without losing its correlation to the original source?
  • How is possible to create a system, where the user is triggered to decode the system?
  • What is the difference between data visualisation, encoding/decoding, illustration?
  • What is the relationship of the concept to the reader?

Concept

Where does the message starts? Where does the message ends?

The user is challenged by the coding tool ACCP to discover the rules behind the circular decoding system and decipher the message. Through the programming language Python and the software DrawBot the textual input such as words is processed and mapped into a spatial graphical system. The 26 characters of the alphabet and the 10 numbers are arranged in a radial manner around the circle. While analysing the graphs the user examines the physicality of the words and discovers hidden patterns of the content. While placing the radial stencil toolkit in front of the radial system – suddenly the message becomes decryptable.

This project established from an exploration of alternative possibilities of translating textual input into different visual mediums, while keeping correlation to the original source.

Since pirate libraries deal about specific access to knowledge – the goal was as well to give back this notion in the concept of decoding / encoding messages.

Encoding System

Manifesto in movement
Decoding system
Encoding system of a whole text
shadowlibrary in movement
Encoding the sentences: "Information is free"
Encoding parts of the Guerrilla Open Access Manifesto

The encoding system works based on the following rules

  • 26 characters of the alphabet and the 10 numbers are arranged in a radial manner around the circle
  • From the right middle side of the circle the alphabet starts with a 0
  • After every third letter a number follows
  • Only words are possible to encode, since the whole would become too complex and impossible to decode
  • The starting position of the first letter is marked with red colour and the light fading out gradient shows it's way
  • If a letter is used more than one time an arrow shows the way of reading

Decoding System

The decoding system works based on the following rules

  • While placing the radial stencil toolkit (the middle circle is cut out to be able the see the graph) in front of the radial system (the alphabet and the numbers are visible on it) – suddenly the message becomes decryptable
  • Depending on the position and the focus of the user the message becomes decryptable
  • After a few trials the brain starts to remember the coordinates of each character, which speeds up this process


Script

After some research I came across DrawBot, which fulfilled my needs of the quick visualisation.

DrawBot is a powerful, free application for MacOSX that invites you to write simple Python scripts to generate two-dimensional graphics. The builtin graphics primitives support rectangles, ovals, (bezier) paths, polygons, text objects and transparency.

The textual input needs to preprocessed beforehand with OCR and saved as .txt file. For the script string + math (import cos, sin, radians, degrees) are needed, because lines will be drawn between the characters. After importing the textual input the letters are set in uppercase and the punctuation is taken away due the limitations of the 36 characters. The script takes each word separately and splits the on characters to be able to draw the lines between two characters. An oval shows the position of the characters on the radial system.


Experiments

One of the early experiments (the circle shows the words but can't draw yet the lines between them)

  1 #import sys
  2 #from defconAppKit.tools.textSplitter import splitText
  3 
  4 #from svglib.svglib import svg2rlg
  5 
  6 import string 
  7 
  8 #import json
  9 #data = json.load(open("test2.json"))
 10 #print(data)
 11 
 12 i = open("test_circle.svg")
 13 
 14 f = open("output2.txt", 'r+', encoding="utf-8")
 15 content = f.read()
 16 #content = text.read()
 17 s = content.upper()
 18 #print(s)
 19 
 20 string.punctuation
 21 
 22 
 23 punctuation = string.punctuation + " " + "—" + "””" +"’"
 24 
 25 for i in string.punctuation:
 26     s = s.replace(i,"")
 27     #print(i)
 28 
 29 #print(s)
 30 
 31 for i in punctuation:
 32     s = s.replace(i,"")
 33    # print(i)
 34     
 35 #print(s)
 36 
 37 
 38 
 39 s1 = s.replace("É", "E")
 40 
 41 print(s1)
 42 
 43 words = content.split(" ")
 44 
 45 #print(words)
 46 
 47 #words = content.split(" ")
 48 
 49 #print(words)
 50 
 51 r = [elem.upper() for elem in content]
 52 #print(newList)
 53 print(r[0])
 54 print(r[2:4])
 55 print(r[3:5])
 56 print(r[4:6])
 57 print(r[5:7])
 58 
 59 
 60 #def copying_letters():
 61     
 62 #def draw_word():
 63     
 64 
 65 from math import cos, sin, radians, degrees
 66 CANVAS = 1000
 67 radius = 400
 68 code=["0","A","B","C","1","D","E","F","2","G","H","I","3","J","K","L","4","M","N","O","5","P","Q","R","6","S","T","U","7","V","W","X","8","Y","Z","9"]
 69 
 70 fill(0, 0, 1, 1)
 71 
 72 # draw an oval
 73 #    x    y    w    h
 74 
 75 
 76 translate(CANVAS/2, CANVAS/2)
 77 
 78 fill(1)
 79 stroke(0)
 80 
 81 oval(-radius, -radius, radius*2, radius*2)
 82 
 83 numberAllElements = len(code)
 84 numberOfThisElement1 = code.index("R")
 85 
 86 
 87 x1 = radius * cos(radians(360/numberAllElements*numberOfThisElement1))
 88 
 89 y1 = radius * sin(radians(360/numberAllElements*numberOfThisElement1))
 90 
 91 oval(x1-5, y1-5, 10, 10)
 92 
 93 
 94 numberOfThisElement2 = code.index("U")
 95 
 96 x2 = radius * cos(radians(360/numberAllElements*numberOfThisElement2))
 97 
 98 y2 = radius * sin(radians(360/numberAllElements*numberOfThisElement2))
 99 
100 oval(x2-5, y2-5, 10, 10)
101 
102 line ((x1 , y1), (x2 , y2))
103 
104 
105 numberOfThisElement3 = code.index("U")
106 
107 x1 = radius * cos(radians(360/numberAllElements*numberOfThisElement3))
108 
109 y1 = radius * sin(radians(360/numberAllElements*numberOfThisElement3))
110 
111 
112 numberOfThisElement4 = code.index("S")
113 
114 x1 = radius * cos(radians(360/numberAllElements*numberOfThisElement4))
115 
116 y1 = radius * sin(radians(360/numberAllElements*numberOfThisElement4))
117 
118 oval(x1-5, y1-5, 10, 10)
119 
120 line ((x1 , y1), (x2 , y2))

Final outcome

After the experimental phase I concluded that only words are possible to encode, since the whole would become too complex and impossible to decode. In this manner the decrypting will be possible.

Python3 running in DrawBot (MacOSX dependency)

  1 import string 
  2 from math import cos, sin, radians, degrees
  3 
  4 #drawing the line between the letters
  5 
  6 def drawLine(letter1, letter2):
  7     numberAllElements = len(code)
  8     numberOfThisElement1 = code.index(letter1)
  9     x1 = radius * cos(radians(360/numberAllElements*numberOfThisElement1))
 10     y1 = radius * sin(radians(360/numberAllElements*numberOfThisElement1))
 11     fill(1)
 12     stroke(1)
 13     strokeWidth(1.2)
 14     oval(x1-5, y1-5, 10, 10)
 15     numberOfThisElement2 = code.index(letter2)
 16     x2 = radius * cos(radians(360/numberAllElements*numberOfThisElement2))
 17     y2 = radius * sin(radians(360/numberAllElements*numberOfThisElement2))
 18     fill(1)
 19     stroke(1)
 20     strokeWidth(1.2)
 21     line ((x1 , y1), (x2 , y2))
 22     oval(x2-5, y2-5, 10, 10)
 23     
 24 #writing a function to show the alphabet around the circle
 25 
 26 def show_the_alphabeth(code):
 27     numberAllElements = len(code)
 28     
 29     for i,letter in enumerate(code):
 30         x1 = (radius+30) * (cos(radians(360/numberAllElements * i)))
 31         y1 = (radius+30) * (sin(radians(360/numberAllElements * i)))
 32                
 33         font("Graebenbach", 30)
 34         fill(1)
 35         stroke(1)
 36         text(letter,x1,y1)
 37 
 38 #calling the function for drawing the line and fill in the letters
 39 
 40 def drawString(string):
 41     for i, letter in enumerate(string):
 42         if i < len(string)-1:
 43             drawLine(string[i], string[i+1])
 44 
 45 #def each_word_color(text):
 46     #for i, letter in enumerate(text):
 47         #if i == text.split(" ")
 48         #fill(1, 0, 0, 0)
 49         #oval(x-5, y-5, 10, 10)
 50 #–––––––––––––––––––––––––––––––––––––––––––––––––––#
 51 
 52 #import the text
 53 
 54 f = open("output2.txt", 'r+', encoding="utf-8")
 55 content = f.read()
 56 #content = text.read()
 57 s = content.upper()
 58 #print(s)
 59 
 60 #removing the punctuation
 61 
 62 x = s
 63 x = [''.join(c for c in s if c not in string.punctuation + '\n' + '—' + '' + '”' + '’' + '\t') for s in x]
 64 x = [s for s in x if s]
 65 #print(x)
 66 x = [s.replace("É", "E") for s in x]    
 67 
 68 #defining the size of the CANVAS
 69 
 70 fill(0)
 71 CANVAS = 1000
 72 
 73 #defining the radius of the circle
 74 
 75 radius = 400
 76 
 77 #defining the Elements
 78 
 79 code=["0","A","B","C","1","D","E","F","2","G","H","I","3","J","K","L","4","M","N","O","5","P","Q","R","6","S","T","U","7","V","W","X","8","Y","Z","9"]
 80 
 81 #defining the colour of the canvas
 82 
 83 fill(0, 0, 0)
 84 rect(0, 0, CANVAS, CANVAS)
 85 
 86 #moving everything in the middle of the canvas
 87 
 88 translate(CANVAS/2, CANVAS/2)
 89 
 90 #defining the colour, stroke, oval of the oval (x y w h)
 91 fill(0)
 92 #stroke(0.5)
 93 strokeWidth(0.5)
 94 oval(-radius, -radius, radius*2, radius*2)
 95 
 96 #call the function to show the alphabeth
 97 
 98 show_the_alphabeth(code)
 99   
100 #call the functions
101 
102 text = ''.join(x)
103 text = text.split(" ")
104 print("Drawing Words with Lines:")
105 print(text)
106 for word in text:
107     drawString(word)
108     
109 #for each_word_color in text:
110     #oval
111     
112 #saving the file
113 
114 #saveImage("testcircletext2.pdf")


Further goals

  • Developing a digital decoding system
  • Investigating a research into steganography and creating a project with Python and DrawBot