Phillip Trelford's Array

POKE 36879,255

Animating Lohse

Richard Paul Lohse was a Swiss born painter and graphic artist who typically produced pieces that had “interacting colour elements in various logical/mathematical relations visible to the eye”

Out of curiosity I’ve taken a small number of Lohse’s work, generated them procedurally and added simple animations.

Sechs Serigraphien

Sechs Serigraphien

Here I imagined the centre blocks bleeding out and filling the adjacent blocks a line at a time.


15 systematische Farbreihen mit 5 gleichen horizontalen Rythmen

15 systematische Farbreihen mit 5 gleichen horizontalen Rythmen

This picture is composed of lines with a 15 row colour progression with each column having an offset. To animate it I rotate each column’s colours in an opposing direction.


Lohse inspired animated spiral

This Lohse inspired spiral consists of alternating block patterns animated anti-clockwise.

Opposing Spiral

Lohse inspired animated opposing spiral

The same pattern with alternating block patterns rotating clockwise and anti-clockwise.

Four Similar Groups

Four Similar Groups

Here I imagined the red blocks shooting up and down and  from side-to-side.


Each piece was generated procedurally using an F# script. A parameterized function is used to generate a frame as a bitmap, with a series of frames created to form an animated gif.

For example to draw the 15 lines

// Column widths
let xs = [3;2;1;4;2;1;4;2;1;4;2;1;4;2;1]
// Column color offsets 
let ys = [0;10;14;8;11;6;9;4;7;2;5;12;4;13;1]
// Image width and height
let width,height=476,450
// Block width and height
let w,h = 14,30

// Returns image using specified color offset
let draw n =
   let image = new Bitmap(width,height)
   use graphics = Graphics.FromImage(image)
   for y = 0 to 14 do xs ys
      |> List.mapi (fun i xy -> i,xy)
      |> List.scan (fun x (i,(dx,dy)) ->
         let n = if i%2 = 0 then -n else n
         let brush = brushes.[(15 + y + dy + n) % 15]
         graphics.FillRectangle(brush, x*w, y*h, w*dx,h)
         x + dx
      ) 0 |> ignore

#r @"Gif.Components.dll" 
open Gif.Components

let encoder = AnimatedGifEncoder()
if encoder.Start(@"c:\temp\15lines.gif") then
   for i = 0 to 15 do
      encoder.AddFrame(draw i) |> ignore
   encoder.Finish() |> ignore

Full Scripts

Have fun!

Pingbacks and trackbacks (1)+

Comments are closed