50 . Shades of Grey

The artwork won the Grand Prize of the Japan Media Art Festival 2015, Art Division. Details can be available at the festival website.

The artwork 50 . Shades of Grey is part of the Early White Exhibition curated by Cally Yu in 1A Space Gallery. In this work, I created a very simply graphical pattern of 50 shades of grey tone with different programming languages I have learnt in the past, and which were already obsolete and no longer popular nowadays. The graphical pattern is extremely simple. I decide to show only the codes and not the image in the exhibition.

The work is both a conceptual and visual art piece. The visual part is a simple computer graphics pattern displaying 50 shades of grey tone. Nevertheless, it documents my training as a computer artist, using programming languages to create imagery on screen. The software tools come and go at increasing speed, echoing the ever shortening cycle of IT trends. I self learnt all the programming languages over the last thirty years. Some of them were popular at some points in time in the creative art/design histories. Some of them disappeared from the industries. The fear of obsolescence is a haunting theme in the computer business, as well as in the digital arts. In the work, I go back to these old programming languages, which I have worked with in different years in my life, to generate the same image, fifty shades of grey tone ranging from black to white, as reflected in the Chinese title of the work, Half a Hundred, Half White.

Audience can compare among the different programming languages as poetic text and their relative time in history. The programming languages I have chosen are: Basic, Fortran, Pascal, Lisp, Lingo (Director), ActionScript (Flash). These languages are once popular and now obsolete.

Basic was released around 1964. I came across Basic in some leisure readings in 1981 and last used it in 1985 in a course project.

width=800:height=800:shades=50
inc=width/shades
setdisplay(width,height,32,1)
paper(rgb(255,255,255))
cls
setautoback(25)
 
for i=1 to shades
	c=i*255/shades
	ink(rgb(c,c,c))
	bar((i-1)*inc,0,i*inc,height)
next
 
waitkey(k_escape)

Fortran was released around 1958. I learnt computer programming with Fortran in 1981, the first course in my university study and last coded it in an internship in 1983.

The codes below used the GnuFor2 interface between the GNU Fortran and Gnuplot.

program grey
use gnufor2
implicit none
 
integer, parameter  :: Nm = 800
integer             :: rgb(3, Nm, Nm)
integer             :: i, j, k
integer             :: shades
integer             :: step
integer             :: c
 
shades = 50
step = Nm/shades
 
do i = 1, shades
     c = (i-1)*255/shades
     do j = (i-1)*step, i*step
          do k = 1, Nm
               rgb(1,j,k) = c
               rgb(2,j,k) = c
               rgb(3,j,k) = c
           end do
     end do
end do
 
call image(rgb, pause=-1.0, persist='no')
end program grey

Pascal was released around 1970. I used Pascal in the 2nd course in university in 1982 and last used it in a computer graphics course in 1984.

unit Unit1;
{$mode objfpc}{$H+}
interface
uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;
type
  { TGrey }
  TGrey = class(TForm)
    procedure FormPaint(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;
var
  Grey:     TGrey;
  idx:       integer;
  shades:    integer;
  step:      integer;
  col:       integer;
 
implementation
{$R *.lfm}
{ TGrey }
 
procedure TGrey.FormPaint(Sender: TObject);
begin
     shades := 50;
     step := Round(Grey.width/shades);
 
     for idx:= 0 to (shades-1) do
     begin
       col := 255-Round(idx*255/shades);
       canvas.Brush.Color := RGBToColor(col, col, col);
       canvas.FillRect(0, 0, (shades-idx)*step, Grey.height);
     end;
end;
end.

Lisp was released around 1959. I first encountered Lisp in a programming language course in 1983 and my last program in Lisp was the artificial intelligence course in 1984.

(ql:quickload :lispbuilder-sdl)
(defvar *SIZE* 800)
(defvar *SHADES* 50)
(defvar *STEP* (/ *SIZE* *SHADES*))
(defvar *COL* 0)
 
(defun box(n) 
   (cond ((>= n *SHADES*) nil)
         ((< n *SHADES*) (progn
                     (setq *COL* (/ (* n 255) *SHADES*))
                     (sdl:draw-box-* (* *STEP* n) 0 *STEP* *SIZE* 
                         :color (sdl:color :r *COL* :g *COL* :b *COL*))
                     (box (+ n 1))))))
 
(sdl:with-init()
   (sdl:window *SIZE* *SIZE* :title-caption "50 . Shades of Grey")
   (setf (sdl:frame-rate) 60)
 
   (sdl:with-events ()
      (:quit-event () t)
      (:key-down-event () (sdl:push-quit-event))
      (:idle ()
         (sdl:clear-display sdl:*black*)
         (box 0)
         (sdl:update-display))))

Lingo (Director) was released around 1993. I first wrote in Lingo in my master degree study in 1996 and last coded in Lingo in 2002 for an interactive installation project.

on exitFrame me
   width = the stageRight - the stageLeft
   height = the stageBottom - the stageTop
   shades = 50
   step = width/shades
   objImage = _movie.stage.image
 
   repeat with i = 1 to shades
      c = integer((i-1)*255/shades)
      objImage.fill(point((i-1)*step,0), point(i*step,height), rgb(c,c,c))
   end repeat
   halt
end

ActionScript (Flash) was released around 2000. I first employed ActionScript for teaching computer programming in 2002 and last used ActionScript in 2005 for a location based game.

import flash.display.Shape;
 
var square:Shape = new Shape();
var shades:uint = 50;
var step:uint = 256 / shades;
var w:uint = stage.stageWidth / shades;
 
addChild(square);
 
for (var i:uint=0; i<shades; i++)
{
	var grey:uint = Math.floor(i * step);
	var col:uint = (grey << 16) + (grey << 8) + grey;
	square.graphics.beginFill(col);
	square.graphics.drawRect(i*w, 0, (i+1)*w, stage.stageHeight);
	square.graphics.endFill();
}

Other than the six programming languages shown in the exhibition, I also created the same graphical pattern with other languages/tools I use recently.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.