Sei sulla pagina 1di 6

flt,J

Systems,
I Complex

andChaos
Fractals,

I
"strange attractor,"which looks clearly
chaotic.
The results they cite are impressive.
A healthy heart produced a broad
Fourier spectrum and a strange attracThese were all software engineering
tor. Unhealthy hearts showed either a
strategiesforgetting orgarized, the idea
Fourier spike and a limit cycle, or a
being that we need lots of order if we
nearly flat Fourier spectrum and a point
hope to cope with complexity in unattractor. Chaos, apparently, is healthy.
predictable environments.
This chaos seemsto be directed from
This month chaos gets its turn.
the nervous system,where researchers
There is mounting evidence that the
are finding evidence of further chaos.
management of a complex system in
Significantly, heart-rate variabitity dean uncertain environrnent requires a
creases after a heart transplant, which
healthy dose of chaos. Some of that
requires severing a connection between
evidence was presented in a recent
the heart and the nervous system.Chaos
Scientifi,cAmerican article, "Chaos and Timesof the Heorl
Fractalsin Human Physiology," by Ary The conventional physiological model also seemsto be present in the neryous
t. Goldberger, David R. Rigney, and that covers health, disease, and aging control of hormonal secretion and in
Bruce J. V'est, (February, 7990). Gold- is homeostasis.According to this model, other areasin the nervous system. One
berger et al focus on the management physiological systems ac:tto reduce vari- model shows how chaos could be proof one of the most complex of systems, ability and to mainAin constant or regu- duced in the nervous system: It inthe human body, but their conclusions larly periodic intemal states. Fluctua- volves feedback loops among neurons.
There's another chaotic clue in the
are interesting for what they say about tions in heart rate have been viewed
complex systems in general. There is as the response to extemal stresses, nervous system. The branching strucnothing inherently biological in their and it has been assumedthat the physi- ture of neurons seems to have fractal
ological system functions to return the dimension, which is significant because
mathematics.
Every operating system designer heart rate to its normal level. A per- of the connection between fractals and
knows you need a little randomness fectly normal heart in a perfectly chaos.
to avoid certain problems. The Dining stressless environment would, under
Philosophers problem, discussed here this model, tick like a metronome.
River'sEdge
The authors argue that the conven- Just what the relationship between
and more fully in David Harel's book,
Algoritbmr'cs (Addison-'Wesley, 1987), tional model is wrong. tVithin the past chaos andfradals is is not entirely clear.
is a classiccaseof deadlock that cannot five years evidence has been accumu- But there is a connection: Fractals are
be resolved without introducing an ele- lating that chaotic behavior in physi- often the remnant of chaotic nonlinear
ment of randomness.Any strictly deter- ological systems may be the product
dynamics. The picture seemsto be this:
ministic solution to the Dining Philoso- of healthy functioning, while regular, A chaotic process shapes an environphers, problem is guaranteed to fail. periodic behavior or steady-state be- ment, and the trace left behind is a
Vhile this sounds like what Goldber- havior is symptomatic of some probfnctal.
ger et al are saying about chaos in lem. Healthy young hearts often exA fractal, then, is a geometric form
human physiology, there is an impor- hibit the greatestirregularity, while regu- with the following distinctive charactant difference. Goldberger et al are larity of heartbeat is sometimes a pre- teristics: Infinite detail and self-similarnot merely describing a useful random cursor of heart failure.
rty at any scale. No matter how closely
One study the authors cite depends you examine it, you find more detail,
on examining heart rate data plotted
and it looks more or less the same at
as Fourier spectra and phase-space any level of magnification. A fractal can
plots. Fourier analysisdisplays periodi- be an infinitely branching line, an infitureakingof an existing model, but throw- city clearly as spikes; steady-statebe- nitely lumpy surface, or any similarly
ing out an existing mathematicalmodel havior as low, flat lines; and chaotic hairy obiect of higher dimensionality.
and replacing it with another
behavior as a broad spectrum. PhaseThe dimensionality of a fnaalis more
That new model is deterministic
space plots give a different picture, but complicated than this, though. Because
chaos, and that phrase is not, appar- are even better at identi$ring chaotic of its infinite detail, a fractal does not
ently, an oxymoron. (My favorite re- behavior. In phase-spaceplots, perio- really have a dimensiOn in the conven-cent additions to the oxymoron lexicon
dicity shows up as clearly cyclic figures tional sense. An infinitely branching
are'Justice Rehnquist," thanks toJohn
called "limit cycles," steady-statebehav- line has no single measure of length,
PerryBarlow, retired catderancher,Grate- ior maps into a point, and chaotic be- and is not a one-dimensional object. A
ful Dead lyricist, and computer book
havior produces something called a fractal's dimension is defined to be a
oo bad complexity isn't a little
simpler. Last month I presented
several of the current views on
how to rnanage complex systems.

author; and "reputable astrologer," an


oxymoronic self-cha racterization by a
notorious Reaganfamily advisor.)
Deterministic chaos arises from the
discipline of nonlinear dynamics, which
is the study of systems that respond
disproponionately to stimuli. There are
certain situations in which nonlinear
systems that are strictly deterministic
neverthelessbehave in seemingly random ways. This is not true randomness, but a constrained but erratic behavior called "chaos." It is the chaos
of the hean.

Michoel
Swoine

Dr. Dobb'sJournal, May L99O

r23

PROGRA IIIIIII NG PARADI


fu nction of the probability that it touches
any given point in the space containing
the fractal. The dimension of an infinitely branching line fractal is a number betvreen I and 2, This fractional
dimensionality is where fractals get their
name. There are some dizzyingconsequences of this fractional dimensionality, such as the ideas that a coastline
doesn't have any definable length, and
that a river has no edge.
Fractalshave received a lot of attention in computer science since their
discovery by Benoit Mandelbrot. But
they are not just of academic interest.
In cinematic computer graphics and
elsewhere, fractals are proving to be
powerful.If you want to model branch=
ing anatomical structuressuch as lungs
and neryes, floraJike trees or shrubb.ry, or coastlines or river meanders or
mountain chains or any sort of terrain,
you will do well to examine fractals.
There have been a number of articles and books about fractals in nature,
reminiscent of past articles and books
on mathematics in nature. Mathematical functions and forms such as the
spiral and helix, and the phi function
andFibonacci series,crop upwith amazing frequency in natural forms. Books
H.E. Huntley's TheDiuine Psosuch as.-----:-----+-

p@n
and Theodore A. Cook's 7be
Crln'
available in Dover paperback editions,
describe how such mathematical entities appear in odd places in nature.
The Fibonacci sequence is particularly common in nature. The sequence
begins 1,1,and each succeeding term
is the sum of the rvro that precede it.The pattem of interlocking spirals on
the face of a sunflower, with Fib(n)
spirals twisting clockwise and Fib(n+l)
spirals twisting counter clockwise, the
two sets of spirals defined on the same
set of florets, is particularly impressive.
For sunflowers, the value of n is 8,
producing interlocking spirals of 27 and
34 florets. The same mathematic structure appears in other plants: Pinecones
and pineapples show the same spirals,
but with a different value for n.
Intriguing as these examplesof mathematics in nature are, they don't seem
to offer any deep insights into nature.
Apparently the number of florets in
each row outward constrains the number of florets in the next concentric
row in a way consistent with the simple rule for generating Fibonacci numbers. Something like that. In any case,
the math may be nifty, but the underlying rtatural process generally tums out

I t's timeto wakeup to ZIM4GL


I the Entity-Relationship
I DBMSthat providesone
seamlesslanguagethroughout the entireapplication
process.
development
Experience
morepower,
portability
while
andflexibility,
reducingcodeand developmenttime.
Interested?
Call.circleor
writetoday.

'ZIM
perhrms
feslsother
datahases
dream

1-800-267-9972

(in Canada 1-613-727-1397)

SterlingSoftware
ZantheSystemsDivision
1200-38AntaresDrive
Ottawa,Ontario,CanadaK2E7V2

ahoul."
INFOWORLD,August21, 1989

ZH

vrh/(Irtvnt Aos/vt
uiltx,
xtillx,oilx,0s/2,
lletworks,
mdDOS

r24

CIRCLE NO. 'I45 ON READER SERVICE CARD

on examination not to be profound.


With fraaals, there seernsto be something deeper at work:
My ftience Proiecf
Since reading Tbe Science of Fractal
Imagesby Heinz-Otto Peitgenand Dietmar Saupe(Springer-Verlag,1988),I've
been playing with one particular algorithm for producing graphic forms that
branch like plants. A program that I've
written uses simple transformational
rules to produce branching structures
that look more like trees than anything
I could ever produce by hand.
What I find more interesting, and
what has kept me fiddling with the
algorithm off and on for two years, is
its apparent relevance to the process
of growth. It's fascinating to watch the
process of development of these fractal
flora. Starting from a single shoot, the
graphic develops into a rwig with a
couple of offshoots, then into something that looks like a b-tree in a windstorm, finally tuming into a credible
sketch of a bare tree. While there exist
algorithms for putting leaves on the
branches, it's not the verisimilitude of
the static image that impressesme, but
the accuracy of the simulation of the
development process.
Note: The development of the fracl
tal, the series of stagesit goes through\
as it increasesin complexity, is strictly I
an afiifact of the way fractals are de- |
fined. Although it is possible to pick \
parametersso as to create afinal image \
resembling one plant or another, it isn't j
possible, so far as I can tell, to control J
the process of development by the I
choice of parameters. I've made no I
attempt, in any case,to mirror any kind I
of natural procss; the program does f
it - er, naturally.
ho
Sornething is going on in the devel-\
opment of the fnaalthat has some*ring \
deep in common with what goes on I
in the growth of a plant. Fractals know {
j
something about biological growth.
Perhaps it has something to do with
what the Scientific American authors
say about fractals: That they are often
the remnant of chaotic nonlinear dgrq
namics. Apparently the presence in an 1
obiect of a static structure well mod- |
eled by a fractal is some evidencb of J
chaotii nonlinear dynamic pro..rt.t{
at work in the development of the ob- )
ject. If that's what's happening in my r
fractal flora, then the algorithm is doing more than drawing nice treelike
pictures. It is a fairly deep simulation
of the process of growth in organisms.
I don't want to overstate the point. I
don't think we're on the verge o.f algorithms for simulating human development that will acquire and lose their
Dr. Dobb'sloumal, May 199O

l0hpoffitReasons
Cko$mersUse
OtnHeM
[|

ft's fast and flexible.

The combination of relational B-tnee


indexing and network model database
technology delivers becer performance
than file managersusing relational
technology alone. Build simple B-tnee/
ISAM applicationsor complex database
applications. You decide how to
optimizeruntime

E wo royalties.
You savemoney, increaseprofits, and
application disribution is much simpler.

tt's writtenin C.

lZl
- Yo,tr applicationsane
portabi* to NIS-DOS,
UNIX and XENI)L
f,| neferential Integrity is
easyto maintain using
db FILE's network model
filistrucfure.
This increasesproductivity and lowers
developmentcosts.

[l-

an_rnn is upwardly

.ofrpatible with Raima's


db VISTA III Database
DevelopmentSystem.

If your application
exceed
db_FILE s capabilities,you can easily
upgradeto db_VISTA m.

free lifetime support

db F[LE*
Fite ffioogr,

2.2

File Structure:
Basedon B-tree indexing and
networkdatabase
model. Both
accessmethodsmay be used
independentlyor in combination
for real power.
Data Types Supported:
StandardC datatypesplus
db_addrfor userdefined
recordlinkages.
Transaction processing
supported
Not RAM resident
Operating Systems
Supported:
MS-DOS,LI-I{IX,XEND(

CompleteC sourcecode
is now included!
- the
l9l
- an RETRIEVE
SQt -basedQuery and
Report Writer is now
includedin this specialoffen,
db_RETRIEVEprovidesa relational
view of db_FILEdatabases.
EmbedSQL
into your applicationor useitad lwc.

SPECIAL LIMITED
OFTER: You get
db_FILE, db_RETRIEVE
and the sourcecodefor eachall at onelowprice!
Single-UserPackageT$295.00
A $1780value.

Mutti-UserPackaget$595.00
A $2890value.
rrctuCesdb_FIl,E,db_RETRIEVEand
SourceCode
iffita8es

C Compilers Supported:
LINIX, XENIX, Microsoft,
Laftice, TurboC

You won't find a better value

Hardware Independent

promotion*o so ordernow to take


advantageof the hemendoussavings.

Major LANs Supported

t-NITAIMA
Ltt

coRPoFrATroN

anywhere! Tt is is alimitedtime

Ordering is easy! CaIl


1-800-dbRAIMA for your
nearestdistributon
Ask about the many otherproducts and
servicesRaima Corporation offers,
including consulting, application
developmentsewices,and training.

*Raimareservestheright to discontinuethis
Fomotion at anytime withoutnotice,sopleasecheckpricing whenyou call.
RaimaCorporation324.5l46hPlaceS.E.,Bellevue,WA!}8007UsA(206)?4?.55?0Telex:65(E018237McII'IwFAx:(2M)747-tist_re'as:Q|4)23|.3|3|Internatfxla|I}bubm:
UJL:(099)500919 Germany:071n62$ Switzerland:(OlY2'O/.lO France:(l)46tD2828 Benetux:3t(0215g]S14 Swedm:(013)l24Zg0ttdy:M5l5M7n
Norway: 472448g55
Ilennark (2)887249 Sirryapore:4683888 Australia: (AD959 5122 Japan: (03)4737432 Taiwan: (V2)5I 3n7
Mexico: (53)57 35 94 Central Arnerica: (506)i8 07 64
Caribbean:(809)8344069 Colombia: 57 12189245 Argentina: 5413135371 Chile:5626964308 Unrguay: g2tg37 Bruil: (0192)52977O @1989
CIRCLE NO.421 ON READER SERVICE CARD

o
(Jl

o
'Tl

R A I T I T I NPGA R A D I G I I i S
(continued from page 124)
gill slits as ontogeny recapitulates phylogeny. But it is intriguing that the fractalflora simulate stagesof natural growth
with no prompting in the form of rigged
parameters. The fact that fractals have
infinite detail and self-similarity implies
a lot about how they develop, and in
fact allows a very simple initial rule to
apply at successively more complex
stagesof development, just as the rules
for organic development must apply to
the earh stagesof organ development
and alSo to the later stages in which
organs interact in complex systems.
Fractals and DNA ^ppear to have
similar problems to solve. Is it possible

that they solve them in similar ways?


Fieldof Dreoms
One of the dreams of science fiction,
and consequently of the artificial intelligence community that reads science
fiction stories for research topics, has
always been the system that programs
itself. The machine that actively seeks
out knowledge in order to grow more
wise. The vague notions of how this
might come about seem always to rest
on faith in critical mass. Even Douglas
Hofstadter'svision of artificial consciousness assumes that sufficient complexity somehow magically transforms a
system into an intelligence.

Critical mass probably isn't enough;


natural systems need a plan of development, the genetic blueprint. It seems
reasonable to expect that highly complex and adaptive afiificial systems
would need some plan, too. The current Most Likely to Succeed paradigm
for machine leaming, or adaptive systems, is neural nets. Currently, neural
nets are designed with as much naivete
regarding neurophysiology as regarding neuroanatomy. There is little reason to think that exposinga blank slate
neural net to unpredictable events will
lead it somehow to cope with its environment. If neural nets are to grow
more complex in useful ways, don't

CIRCLE M'.53 OT.IREADERSERVICECARD

a26

Dr. Dobb'sJournal, May 199O

we need to build in a plan for recognizing what is useful, and shouldn't it be


a planthat can admit of more sophisticated interpretation as the system gets
more sophisticated?

Do artificial neural nets, such as real


networks of neurons, need a dose of
chaos?

Flora
Fractal
Here's a sketch of the fractal program
I've written. It doesn't merit a pseudocode descriptircn,becausethe underlying algorithm is not efficient. My
purposes had as much to do with
teaihing HyperTalk as with explorI implemented it io as
inq fracta.ls,-so
to keep the concepts visibrle,emplqy
simple user-comprehensiblegraphic
tools, and use onty HyperTal[ cbde.
A seriousexploration of fractalswould
have to abandon all of these constraints.
-Th.eprogram. uses turtle qraphjcs,
which is to say that the user describes
the figures to be drawn in terms of
strings of one-character commands,
which specify the direction and movement of an imaginary drawing turtle.
(Vhen you've b?en editor of imagazine originally called Dr. Dobb'sJournal of nny neUC Calistbenics and
Ortltodontia, you leam how to write
things like thit with a straitht face,)
The program draws the fractals by
passing the turtle graphic commands
to a simple turtle graphic engine.
The program recognizes these turtle graphic commands:
Drawing: F Forward 1 unit, pen
down; U Forward 1 unit, pen up
.Tum o".'u"it titt
O"i.dt"ti"t,
>Turn one unit right
Contexft [ Store current turtle position & direction; I Resetturtle to
previous poqition & Al*ctffi
,' .

Figute 1: Tjpkal fractal flora


Dr. Dobb'sJournal, May 199O

Fractals start from a simple base


figure, and are transformed to new
levels of complexity via transformation rules.The programstepsthrough
these levels, transforming the current
string of turtle graphic charactersinto
a new string. It draws the current
version of the fractal from the rurtle
graphic string at each level. The "true"
fractal requires infinite levels of detail, so the program is only drawing
successiveapproximations. Figure 1
shows a typical image generated by
the program.
The program starts by prompting
the user for parameters.The user must
give the fraital a title, a base string of
turtle graphic commands (the single
command F is typical), a repeatMode,
a unitAngle, and a set of rules for
transforming the base string to produce higher levels of the fractal. RepeatMode controls how the program
steps through the levels, and unitAngle (0=360)controls how sharply the
turtle turns.
A typical transformation rule is F
-> F[>F][<F].This rurns each straight
line at level n into a fork consisting
of one step forward and branches to
the left and right. The user enters
es transformalon nd_qsih
on*,
to specific promptsl Eachsuch prompt
shows a turtle graphic characterand
asks what it is to be transformed into.
Initially, these characters are just the
charactersin the base string, but as
new rules are added, they may add
Inew' Characters,trequirirgn.*'rules,'
, Ru]-esnot involrrlng commands [and] i
witl produce figures such as coastlines and mountain ridges; using [andJ
' will'pro ce:branchingltructuds such
as trees and blood vessels.
Perhaps the main point of describing this process is to show how inefficient fractalsare. BeCauseeach transformation is a functio4, one could, I
suppose, decide how many levels
deep you want to go and compute
the composition of the functions
needed, applying :,this.functiorlt.,For
me, computing and drawing each successive level is important because it
is the process of fra*al growth that
+--M.S.
I'm interestedin.

ThePowerof
LISP
Sneed
and
Sirhpliqity
of
L

You are comfortable with C, you like


its simplicity and run-time performance.
We have good news for you: you do not
have to give up all this in order to take
advantage of Lisp's tremendous power.
And this is done without changing C's
syntax or adding a preprocessor. For
example:
LisP
Set
Set

x=NIL'
(y,
(x,

Y=NIL;

MakeExp ('r(C&C ruodel)"));


GetProp (Car(y), Cadr(y)))i

B-Trees and document retrieval


functionsmake LisnC a sood candidate
for ob.iectoriented data Sasedesisn.
Functionsfor definingand manipulating
obiects (inheritancesirpported)aie
iniluded as samplecode.
ln the Regular Edition the Lisp space
is created in RAM.

$2g5oo
In the Extended Edition LispC
supports over 1 Giga byte of vlrtual

Lisp spac-e.

$ggs*

LispC's memory overhead


is small. between 20 and
lp Kb. Linking LispC's
7 obiect
code into your
applicltion is royalty free.
The demo included in the package
allows you to trv all the LisriC fuictions
without- writing one line of cbde. People
with litle experience in Lisp will also
appreciate th-e Introduction to Symbolic
Prbcessine. Source code available too.
An incremental garbage collector
makes LispC ideal for
real time

Conpare
latticePerformance,
Featurc$,
& Value!
I,ATrICE C
DEVELOPMEl{T
SYSTEM FOR
DOS & OS/2
r Runs under DOS or OS/2 to create DOS,
OS/2, and Family Mode Programs
I C languageextensions for added
versatility
o Global Optimizer allows your program to
run up b 3A%faster
t OS/2 API Library and Bind Utility
eliminate the need for OS/2
developers kit

ONLYs250.00

tArncE

80286C

DEVELOPMEh[T
SYSTEM FOR
DOS & OS/2
r Runs under DOSor OS/2 to create DOS,
OS/2, or Extended DOS Programs
o 80286 DOS Extender with no run-time
royalties!
r Createsprograms of up to nearly 16 MB
r Extended DOSConfiguration Optimizer
assuresmaximum performance
r Compiler,Debugger,Libraries,and Tools
Performance Tuned for 286 Systems
o Improved debuggingenvironment
speedsprogram development

oNLY $495.00

tATilCE 80386 C
DEVELOPMENT
SYSTEM FOR

DOS& Os/z
o Runs under DOSor Os/zto create OS/2
or Extended DOS Programs
. Creates Programs usingfull 1z-bitpower
o 80386 DOS Extender with no ntn-tirne
rcyalties!
r Compiler,Debugger,Libraries,and Tools
Performance Tuned for 386 Systems
. Compatible with PharL,apDOSExtender
0NLY $895.00

CALL ONWBITE TODAYFON


A FNEE CATALOG LISTING
ALL I.ATTICE TOOLS.
CIRCLE NO.142 ON READER SERVICECARD