mas110 exhibition .fundamentals of computational media design.spring 2000.professor john maeda
megan's static pieces . megan's dynamic pieces

 

paper 60

command geom x r p
{
// objective:
// to create a plot of the first 5 terms of
// the geometric sequence x*(r^n)
// where n ranges from 1 to 5
//
// variables:
// x, r - as defined for the above series
// p - sets the pen color for the graph

pen p
set n x

repeat m 0 r
{
set a m // r^1
set b (a * a) // r^2
set c (b * a) // r^3
set d (c * a) // r^4
set e (d * a) // r^5

set aa (n * a) // term 1: x*(r^1)
set bb (n * b) // term 2: x*(r^2)
set cc (n * c) // term 3: x*(r^3)

set dd (n * d) // term 4: x*(r^4)
set ee (n * e) // term 5: x*(r^5)

// let's plot the values for each term
// vertically in a bar graph:

// term 1:
line 6 aa 13 aa
line 6 (aa+1) 13 (aa+1)

// term 2:
line 26 bb 33 bb
line 26 (bb+1) 33 (bb+1)

// term 3:
line 46 cc 53 cc
line 46 (cc+1) 53 (cc+1)

// term 4:
line 66 dd 73 dd
line 66 (dd+1) 73 (dd+1)

// term 5:
line 86 ee 93 ee
line 86 (ee+1) 93 (ee+1)
}
}

// Let's compare some different GP's now

// 2*(3^n) in white
geom 2 3 0

// 3*(3^n) in pale grey
geom 3 3 25

// 4*(3^n) in black
geom 4 3 100

// it is easy to note the different growth
// patterns for these geometric progressions
// relative to one another