script_
================================================================================
workshop at the Informed Modularity Course,
KTH School of Architecture, 25th-27th Jan. 2006.
--------------------------------------------------------------------------------------------------------------------------------------------
"The idea becomes the machine that makes the art".
Sol LeWitt 1967
Walter Benjamin definedone of the tasks of art, in the Work of Art
in the Age of Mechanical Reproduction as ‘the creation
of a demand which could be fully satisfied only later'; a possible
reversal of this would be the understanding of technology as the satisfaction
of demands that have not yet been created. In script_
we will try to investigate the possibility of matching demands with the
surplus of possibilies implied in the technologies of programming and
computation, of which their use in architecture is, to a larger extend,
still relaying in forms of production strongly tied to a tradition of
designing through the geometrical projection devices implied in the drafting
of plans, sections and elevations.
We will be using for this the scripting extension in Rhino called RhinoScript.
Scripting as a type of programming (check precise definitions at script),
cannot be seen so much as a tool, but as an expression of the medium of
computation. One of the main concepts of computation can be identified
in the idea of the algorithm, in a general sense a synonym
of script or program.
An algorithm is a finite set of well-defined instructions
for accomplishing some task (from Wikipedia).
A standard example of an algorithm is a cooking recipe. For explaining
someone how to cook a cake or a stew one does not show a picture of it,
but explains step by step how to make it. What we are going to be doing
are in a way recipes for designs, instead of blueprints or 'pictures'
of the designs.Algorithms can be though as some sort of abstract machine
and in fact can be, linked, in their most extrict mathematical definition
to the concept of Turing
Machines.
Examples of algorithms.
Initially these 'recipes' will relate with some of the processes you
will identify in the sample you are bringing from the research tasks,
becomming the DEVICES common to both studios in the workshop,
and at a later stage you will FABRICATE, by literally
identifying these 'recipes' as architectural production processes or othrewise
processes of organisation of space (we will look at this later in the
workshop).
The important concepts we will look at in this introduction to programming
are:
Variables: Variables are parts of your code, mostly values
that may change, in contrast to constants, that wont. For example, if
you have written an algorithm like:
1. jump 7 times
2. draw a 43 cm long line on the floor
you could make variables like:
1. myvariable=check the time
2. jump myvariale times
3. draw a 43 cm long line on the floor
you make myvaraible a variable (depending on the time on your watch) and
43 is a constant. Other examples of variables that one could modify on
the cookie recipe bellow, given as an example of algorithm, are the amounts
of sugar, eggs, etc.
Loops: loops are parts of a program that are repeated.
If one has an algorithm like:
1. through a stick 10 cm long in the air.
2. Wherever it falls on the floor:
3. draw a line 5 cm long at 20 degrees,
4. draw a line 10cm long at 50 degrees,
5. draw a line 4cm long at 90 degrees,
6. repeat from line 1. until the floor is full of lines
There is a loop from line 6 to line 1. Loops are an essential aspect
of thinking in algorithms and processes of making. One can easily identify
'loops' in the recipe example too, in which things are repeated until
something happens (something becomes creamy, or fluffy... A simple loop
could be also:
read the above paragraph 25 times.
which could be written to as:
Keep on reading the paragraph above until you have read it 25 times.
Conditions:
1. Start walking out of the Architecture School in a straight line.
2. If you can't go straight turn left.
3. If the wind blows from the right, turn right.
*********************************************************************************************
tasks:
1.device:
From the samples brought in to the workshop in day one, try to identify
organisations and processes made of the constituents of algorithms: variables,
loops or conditions. These processes may be abstract (perhaps having to
do with the production of something in the sample, or with an event or
events that may be evident in it) or could have to do with some of the
formal and geometrical characteristics of the sample. Try to model or
represent these DEVICES through RhinoScript code, which may produce forms
or diagrams of the identified algorithms.
2.fabricate:
Interpret the possible abstract diagrams, or concrete geometries, as organisations
or architectonic events (divisions and differentiations, clustering, density
differences...) suggest links of these to concrete architectural contexts
and situations. The abstract machine or DEVICE that the algorithm is will
be thus become concrete and specific, at least to a certain degree.
--------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------
References:
Casey
Reas, Software Structures
Marius Waltz
Drawing Machines
www.generatorx.no
www.processing.org
CECA at UEL
examples
of algorithms:
================================================================================
1.LOGO:
--------------------------------------------------------------------------------------------------------------------------------------------
An example of an algorithm in LOGO, a computer language for children developed
by Seymour Papert at MIT during the late sixties. If one follows the the
steps you would walk in a square (forward means walk forward a number
of steps, right means turn right a number of degrees) .
forward 100
right 90
forward 100
right 90
forward 100
right 90
forward 100
right 90
it could also be written as:
repeat 4
[
forward 100
right 90
]
LOGO instructions are generally executed by a robot on a paper, or by
a simulated 'robot' on the screen.
F rom: www.bfoit.org
More information at the logo
foundation.
-------------------------------------------------------------------------------------------------------------------------------------------
-2.Recipe for chocolate chip cookies:
--------------------------------------------------------------------------------------------------------------------------------------------
INGREDIENTS:
* 1 cup butter flavored shortening
* 3/4 cup white sugar
* 3/4 cup brown sugar
* 2 eggs
* 2 teaspoons Mexican vanilla extract
* 2 1/4 cups all-purpose flour
* 1 teaspoon baking soda
* 1 teaspoon salt
* 2 cups milk chocolate chips
DIRECTIONS:
1. Preheat oven to 350 degrees F (175 degrees C). Grease cookie sheets.
2. In a large bowl, cream together the butter flavored shortening, brown
sugar and white sugar until light and fluffy. Add the eggs one at a time,
beating well with each addition, then stir in the vanilla .Combine the
flour, baking soda and salt; gradually stir into the creamed mixture.
Finally, fold in the chocolate chips. Drop by rounded spoonfuls onto the
prepared cookie sheets.
3. Bake for 8 to 10 minutes in the preheated oven, until light brown.
Allow cookies to cool on baking sheet for 5 minutes before removing to
a wire rack to cool completely.
From: allrecipes.com
-------------------------------------------------------------------------------------------------------------------------------------------
-3.Postscript code:
--------------------------------------------------------------------------------------------------------------------------------------------
%!PS
% program for drawing a number of circles
/doACircle
{ 0 0 100 0 360 arc stroke } def
0 1 100 {0 20 translate doACircle } for
showpage
If you want to see what the code above does, open a text editor (like
textpad in windows) copy the code above and paste it in the text file,
save it as whatevername.ps (*.ps extension) and open it in Adobe illustrator
or any other program that can read postscript files.
-------------------------------------------------------------------------------------------------------------------------------------------
-3.Rhinoscript algorithm:
--------------------------------------------------------------------------------------------------------------------------------------------
Option Explicit
sub circle()
Dim ctr,dir,i
Dim circt
for i=0 to 10
ctr=array(rnd*10,rnd*10,rnd*10)
dir=array(rnd*10,rnd*10,rnd*10)
'Rhino.command ("_CPlane 3Point 0,0,0 z " & CStr(0.9+mypt(0))
& "," & CStr(mypt(1)) & "," & CStr(mypt(2))
)
circt=Rhino.AddCircle (ctr, 2 ,dir)
next
end sub
circle()
If you want to see what the code above does, open Rhino andopen tools>RhinoScript>edit.
Copy the code above and paste it in the edit window you just opened. Click
the run button.
-------------------------------------------------------------------------------------------------------------------------------------------
-4.flowchart diagram:
--------------------------------------------------------------------------------------------------------------------------------------------
Flowchart from Douglas Hopfstader, Gödel,Escher Bach, an Eternal
Golden Braid. A flow char is anothre form of representing algorithms,
speciallyinteresting for showing processes that imply decisions and repetitions.
|