mw on December 6th, 2008

This post introduces three fundamental programming constructs.

Continue reading about DBN tutorial: Modules

mw on December 6th, 2008

Programming languages allow us to be lazy and DBN is no exception. The basic idea to reduce the size of the program from the previous post is to abstract the algorithm’s steps into a new DBN command. The name of the command will reflect what the algorithm produces. The way to do it in DBN [...]

Continue reading about DBN tutorial: Commands

mw on November 30th, 2008

Let us recap the steps we took in the previous post to produce a centred square:

We choose the left coordinate of our square, e.g. left = 20.
We know that the left bottom vertex of a centred square is on the main diagonal and hence bottom = left.
By definition, the left and right sides are equally [...]

Continue reading about DBN tutorial: Variables

mw on November 29th, 2008

In DBN, the canvas for our artistic output is a virtual square sheet of paper, 101 points wide, with the lower bottom point having coordinates [0 0] and the top right point having coordinates [100 100]. The DBN command
line X1 Y2 X2 Y2
draws a straight line from endpoint [X1 Y1] to endpoint [X2 Y2]. For [...]

Continue reading about DBN tutorial: Lines

mw on November 23rd, 2008

To execute DBN programs we need the DBN programming environment, available on the DBN website. It can be downloaded and executed on various platforms because it is written in Java. Even more simply, the environment can be run directly from the website as a Java applet, within a web browser. I use the applet instead [...]

Continue reading about DBN tutorial: Getting started

mw on November 23rd, 2008

DBN (Design by Numbers) is a very simple language to program small, non-trivial, interactive, and animated computer art works. DBN can also be used as a language to introduce fundamental computing concepts (like variable, iteration, selection) because the immediate visual feedback obtained by executing a DBN program helps one to understand the program’s instructions [...]

Continue reading about DBN tutorial: Introduction