Skip to content

Instantly share code, notes, and snippets.

@davelab6
Forked from frankrolf/timm_ulrichs.py
Created May 8, 2018 17:59
Show Gist options
  • Save davelab6/ba9d5a6e7b39db27058c38f1c1ad643d to your computer and use it in GitHub Desktop.
Save davelab6/ba9d5a6e7b39db27058c38f1c1ad643d to your computer and use it in GitHub Desktop.
DrawBot script to create an animated version of “Anthologie zur Visuellen Poesie” by Timm Ulrichs
# DrawBot script to create an animated version of
# "Anthologie zur Visuellen Poesie" by Timm Ulrichs (1968),
# as requested by Nick Sherman here: https://www.instagram.com/p/BiAjODfHwCO/
# Thanks to Letterform Archive for sharing.
def e_square(x, y, side, rotation):
'''
Draw letter e in a square defined by its center
and the length of the sides.
'''
save()
rotate(rotation, (x, y))
stroke(0)
strokeWidth(1)
# add a stroke, because Helvetica Bold is not heavy enough
path = BezierPath()
path.text('e', font='HelveticaNeue-Bold', fontSize=56)
min_x, min_y, max_x, max_y = path.bounds()
p_width = (max_x - min_x)
p_height = (max_y - min_y)
translate(x - p_width / 2, y - p_height / 2)
drawPath(path)
restore()
margin = 10
width = height = 1000 + 2 * margin
center = width / 2, height / 2
square_size = 1000 / 25
steps = 24
for global_r_factor in range(steps//2):
newPage(width, height)
fill(243/256, 239/256, 228/256)
# eyedropper values from original image
rect(0, 0, width, height)
fill(0)
for x in range(steps + 1):
for y in range(steps + 1):
for r_factor in range(steps + 1):
if(
r_factor <= x <= steps - r_factor and
r_factor <= y <= steps - r_factor
):
rotation = (global_r_factor + r_factor) * (360 / 12)
e_square(
square_size / 2 + x * square_size + margin,
square_size / 2 + y * square_size + margin,
square_size, rotation
)
saveImage('~/Desktop/Timm Ulrichs - Anthologie zur Visuellen Poesie.gif')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment