Kapitel
12
Programming
and Architecture
lecture
There are many ideas for architectural design that existed as philosophical
frameworks, but could not be applied easily with the traditional tools. 'Types
and Instances' or 'Levels of Detail' are two examples. With the computer and
the possibility to use programming languages to formulate concepts, many
existing and new ideas became available for the architectural design process.
Here some examples under the topics: Formalising Architecture, Artificial
Intelligence and Virtual Architecture, will be presented
Parameterized prototypes can easily be formulated with an object oriented
language. The important characteristics need to be described and the way to
apply them with given parameters.
Four structural prototypes have been programmed at the chair for CAAD. Because
of their architectural characteristics they were named after Le Corbusier,
Rossi, Sterling, and Lerup. The instances of these prototypes always had
correct dimensions for walls, roofs, columns, beams. The dimensions got
calculated and checked, while the user defined parameters like size, material,
and roof type.
Different instances of the Lerup prototype
Grammar in natural languages uses rules to define how words may be combined to
form sentences. For design grammars relations between design elements are
defined by rules in the form of: "if context_specification then
design_decission".
Of particular interest are shape grammars, introduced by George Stiny in 1975.
The development of shape grammars begins by specifying a vocabulary of 3D-forms
or shapes. Then the rules to combine shapes are defined with spatial relations.
In standard shape grammars the spatial relations between elements of shapes -
their relative lengths and angles - are maintained in the shape rules. In
parameterized shape grammars these relations are allowed to changed.
Shape grammars can be used to explore design languages as well as to discover
rules underlying a set of related designs.
Shape grammar to design according to Richard Meier rules (Heng Jung
Hsiung)
Case-based reasoning is often applied in the architectural design process. As
an AI concept it means to simulate the reasoning of an expert, which is based
on remembered cases. The motivation for such a method is to profit from good
experiences and not to repeat bad ones. To be applicable for the reasoning
process the cases have to be selected and analysed carefully. Also the process
of adaptation of cases has to be formalised. A difficulty with case-based
reasoning is that the memory for storing the cases is limited and that a high
number of cases can slow down the process.
Buildings of Campi and Pessina have been used to build a case-based reasoning
system at the chair of CAAD.
Buildings of Campi and Pessina have been used in this case-based
reasoning system.
Darwin's theory about The Origin of Species on the Basis of Natural
Selection was influential for the development of genetic algorithms.
Genetic algorithm's start with a set of one or more individuals and apply
selection and reproduction operators to evolve successful individuals, as
measured by a fitness function.
Genetic algorithms have been applied to produce design, films, music and art.
Genetic images by Karl Sims at Thinking Machines
Virtual reality widens the possibilities for architectural action a lot.
Virtual reality (VR) depends on computers to be displayed and to allow some
interaction. Therefore virtual worlds and the possiblities for interaction
always have to be described to a machine. Because VR is a new field, many ideas
cannot yet be realised with a simple VR tool, but need to be formulated by
writing a program.
In virtual reality not only objects are virtual, but also time. It is not
linear anymore, one can move back and forward in time, speed time up or make it
slower, and map time to form, or vice versa.
SCULPTOR: Form as a function of time
In virtual reality things that could not exist in reality can be shown.
Non-realistic features can be used to display additional information about
realistic features. I.e.: Walls can become transparent to display the plumbing,
parts can start to blink to draw the user's attention, foreign elements can
show up to illustrate something.
VR is famous for evoking new sensations through displaying the unrealistic,
which is as important a part of a virtual design as the realistic. Design in VR
is architectural design, it is spatial and much more. Think of the extreme
possibilities of VR, like: Walls can morph into landscapes, one can fly through
solid parts, or the size of objects does ntot match with one's experience. Such
ideas may sound scary, but if they are designed well, they allow new and
interesting experiences.
A Jenny Holzer interpretation by Florian Wenz and his
students
The final touch to your programming experience will be to add some action
related to your object.
In the last exercise you created an object and inserted it in the scenegraph,
when the object was selected it was simply lifted up into the air. This time
you have to add a selection function to the program yourself, using your old
object or creating a new one. You have to decide what changes this object
should go through. In order to do this you
will have to change the "selectionAction"-function in "student.c++". If you
want the object to be returned to its old state on deselection, all nodes that
you insert have to be grouped under a separator or group node by the name of
"_CHOSEN". If you want the change to be permanent you can insert a node
anywhere under the top node of your object. The _CHOSEN node has to be inserted
under all circumstances, whether it has an effect or not. Here are some ideas
that could be explored:
- scale your model
- insert text nodes for additional information
- add spotlights and motion
- add a counter variable that keeps track of how many times the object has
been selected, which then influences the way the object reacts
There are a
lot of possibilities. If you produce a node, which you would like to find again
later, give it a special name. It is possible to create very complex object
behaviour. As mentioned before the strength of Inventor is not only the
modelling of objects but also the visualisation of concepts or ideas.
These are steps to copy the object from your previous exercise to this one:
- Copy your button bitmap (student_bitmap.h) from exercise 11 to the
exercise12 directory without changing the name of the file.
- Copy the lines of code you have written or changed in the file student.c++
in exercise11 to the file student.c++ in exercise12. Don't copy the whole file,
because some other functions are different now.
- If you have added functions, you have to copy them too, from student.c++
and student.h.
- In exercise12.c++ you have to remove '/*' and '*/' in the function
MyViewer::studentPushCB();
Now everything you had in exercise11 should be
working, make the test by compiling and running it.
- the code has to be added to student::selectAction(SoSelection *selected).
Make it a child of action, i.e. action->addChild(yournode) if it should not
be permanent.
- Remember to include the .h-file for any new kind of node.
- Start with something small, like a translation or adding text. Test the
modification by compiling and running exercise12. And then take the next step.
- Use the online books to see examples of program code.
Please hand in three files, you can use the following commands:
cp student_bitmap.h ~prog/abgabe/exercise12/yourname_bitmap.h
cp student.h ~prog/abgabe/exercise12/yourname.h
cp student.c++ ~prog/abgabe/exercise12/yourname.c++
example1: ADDING TEXT non-permanently
// Choose a font
SoFont *myFont = new SoFont;
myFont->name.setValue("Times-Roman");
myFont->size.setValue(24.0);
action->addChild(myFont);
// add a Seperator so that the translation is not applied
to the object
SoSeparator *infoSep = new SoSeparator;
// Translation so that the string is in front of the
object
SoTransform *infoTrans = new SoTransform;
// TEXT2 = screen alligned text, no change in size, no
rotation
SoText2 *infoText = new SoText2;
infoTrans->translation.setValue(.25,.0,1.25);
infoText->string = "I'm a not chair";
infoSep->addChild(infoTrans);
infoSep->addChild(infoText);
action->addChild(infoSep);
example2:
MOVE THE OBJECT permanently
SoTransform *move = new SoTransform;
move->translation.setValue(1.0,.0,.0);
selected->insertChild(move, 1);
This website has been archived and is no longer maintained.