Chapter 5
The Fourth Dimension
Althoughwenormallythinkofspaceasthreedimensional,mathematicsisnotsoconstrained.Strangeattractors
canbeembeddedinspaceoffourandevenhigherdimensions.Theircalculationisastraightforwardextensionof
whatwehavedonebefore.Thechallengeistofindwaystovisualizesuchhighdimensionalobjects.Thischapter
exploitsanumberofappropriatevisualizationtechniquesafteradigressiontoexplainwhydimensionshigher
thanthreeareusefulfordescribingtheworldinwhichwelive.
5.1 Hyperspace
Ordinary space is threedimensional. The position of any point relative to an arbitrary origin can be
characterizedbyasetofthreenumbersthedistanceforwardorback,rightorleft,upordown.Anobject,such
asasolidball,inthisspacemayitselfbethreedimensional,orperhaps,likeaneggshellofnegligiblethickness,it
maybetwodimensional.Youcanalsoimagineaninfinitelyfinethread,whichisonedimensional,ortheperiod
attheendofthissentence,whichisessentiallyzerodimensional.Althoughwecaneasilyvisualizeobjectswith
dimensionslessthanorequaltothree,itishardtoenvisionobjectsofhigherdimension.
Beforediscussingthefourthdimension,itisusefultoclarifyandrefinesomefamiliarterms.Perhapsthebest
exampleofaonedimensionalobjectisastraightline.Thelinemaystretchtoinfinityinbothdirections,orit
mayhaveends.Alineremainsonedimensionalevenifitbends,inwhichcasewecallitacurve.
Whenwesaythatacurveisonedimensional,wearereferringtoits topologicaldimension.Bycontrastthe
Euclideandimensionisthedimensionofthespaceinwhichthecurveisembedded.Ifthelineisstraight,both
dimensionsareone,butifitcurves,theEuclideandimensionmustbehigherthanthetopologicaldimensionin
orderforittofitintothespace.Bothdimensionsareintegers.Onedefinitionofafractalisanobjectwhose
HausdorffBesicovitch(fractal)dimensionexceedsitstopologicaldimension.Forexampleacoastlineonaflat
maphasatopologicaldimensionofone,aEuclideandimensionoftwo,andafractaldimensionbetweenoneand
two.Itisaninfinitelylongline.Onaglobe,itsEuclideandimensionwouldbethree.
Aspecialandimportantexampleofacurveisa circleacurveoffinitelengthbutwithoutends,every
segmentofwhichliesataconstantdistancefromapointatthecenter.Everycircleliesinaplane,whichisaflat,
twodimensionalentity.Likealine,theplanemaystretchtoinfinityinalldirections,oritmayhaveedges.Ifa
planehasanedge,wecallitadisk.Notethedistinctionbetweenacircle,whichisaonedimensionalobjectthat
doesnotincludeitsinterior,andacirculardisk,whichisatwodimensionalobjectthatincludestheinterior.
Justasnotalllinesarestraight,notalltwodimensionalobjectsareflat.Asheetofpaperofnegligible
thicknessremainstwodimensionalifitiscurledorevencrumpledup,inwhichcaseitisnolongeraplanebutis
stillasurface.AcurvedsurfacehasaEuclideandimensionofatleastthree.Asurfacecanbefinitebutwithout
edges.Anexampleisasphere,everysegmentofwhichisataconstantdistancefromitscenter.
Notethatjustasacircledoesntincludeitsinterior,neitherdoesasphere.Whenwewanttorefertothe
threedimensional region bounded by a sphere, we call it a ball. This terminology is universal among
mathematicians,butnotamongphysicists,whosometimesconsiderthedimensionofcirclesandspherestobethe
minimumEuclideandimensionofthespaceinwhichtheycanbeembedded(twoandthree,respectively).
Anotherexampleofafinitesurfacewithoutedgesisatorus,mostfamiliarasthesurfaceofadoughnutor
innertube.Suchcurvedspaceswithoutedgesareusefulwheneveroneofthevariablesisperiodic.Spacesof
arbitrarydimensions,whetherflatorcurved,arecalled manifolds.Thebranchofmathematicsthatdealswith
theseshapesiscalledtopology.
Ifwecoulddescribetheworldpurelybyspecifyingthepositionofobjects,threedimensionswouldsuffice.
However,ifyouconsiderthemotionofabaseball,youareinterestednotonlyinwhereitis,butinhowfastitis
movingandinwhatdirection.Sixnumbersareneededtospecifybothitspositionanditsvelocity.Thissix
dimensionalspaceiscalledphasespace.Furthermore,iftheballisspinning,sixmoredimensionsareneeded,
one to specifytheangleandanothertospecifytheangular velocityabout eachofthreeperpendicularaxes
throughtheball.
Ifyouhave two spinningballsthatmoveindependently,youneedaphasespacewith twice asmany(24)
dimensions,andsoforth.Contemplatethephasespacedimensionrequiredtospecifythemotionofmorethan
1025moleculesineverycubicmeterofair!Sometimesphysicistsevenfinditusefultoperformcalculationsinan
infinitedimensionalspace,calledHilbertspace.
Youmightalsobeinterestedinotherpropertiesoftheballs,suchastheirtemperature,color,orradius.Thus
thestateoftheballsastimeadvancescanbedescribedbyacurve,or trajectory,insomehighdimensionalspace
called statespace,inwhichthevariousperpendiculardirectionscorrespondtothequantitiesthatdescribethe
balls.Thetrajectoryisacurveconnectingtemporallysuccessivepointsinstatespace.
Youhaveprobablyheardoftimereferredtoasthefourthdimensionandassociatetheideawiththetheoryof
relativity.LongbeforeEinstein,itwasobviousthattospecifyanevent,asopposedtoalocation,itisnecessaryto
specifynotonlywheretheeventoccurred(X,Y,andZ)butalsowhen(T).Wecanconsidereventstobepointsin
thisfourdimensionalspace.
Notethatthespatialcoordinatesofapointarenotunique.Anobjectfourfeetinfrontofoneobservermight
besixfeettotherightofasecondandtwofeetaboveathird.Thevaluesof X,Y,andZofthepositiondependon
wherethecoordinatesystemislocatedandhowitisoriented.However,wewouldexpectthevariousobserversto
agreeontheseparationbetweenanytwolocations.Similarlyweexpectallobserverstoagreeonthetimeinterval
betweentwoevents.
Thespecialtheoryofrelativityassertsthatobserversusuallydonotagreeoneithertheseparationorthetime
intervalbetweentwoevents.Eventsthataresimultaneousforoneobserverwillnotbesimultaneousforasecond
movingrelativetothefirst.Similarly,twosuccessiveeventsatthesamepositionasseenbyoneobserverwillbe
seenatdifferentpositionsbytheother.
Youhaveprobablyheardthat,accordingtothespecialtheoryofrelativity,movingclocksrunslowand
movingmetersticksareshortened.(Itisalsotruethattheeffectivemassofanobjectincreaseswhenitmoves,
leadingtothefamous E=mc2,butthatsanotherstory.)Thesediscrepanciesremainevenaftertheobservers
correctfortheirmotionandforthetimerequiredfortheinformationabouttheeventstoreachthemtravelingat
thespeedoflight.Itisimportanttounderstandthatthesefactshavenothingtodowiththepropertiesofclocks
andmetersticksandthattheyarenotillusions;theyarepropertiesofspaceandtime,neitherofwhichpossessthe
absolutequalitieswenormallyascribetothem.
Whatisremarkableisthatallobserversagreeontheseparationbetweentheeventsinfourdimensional
spacetime.Thisseparationiscalledthe properlength,anditiscalculatedfromthePythagoreantheoremby
takingthesquarerootofthesumofthesquaresofthefourcomponentsafterconvertingthetimeinterval( T)to
adistancebymultiplyingitbythespeedoflight(c).Theonlysubtletyisthatthesquareofthetimeentersasa
negativequantity:
Properlength=[DX2+DY2+DZ2c2DT2]1/2 (Equation5A)
BecauseoftheminussigninEquation5A,timeisconsideredtobeanimaginarydimension;animaginary
numberisonewhosesquareisnegative.Note,however,thatthewordimaginarydoesnotmeanitisanyless
realthantheotherdimensions,onlythatitssquarecombineswiththeothersthroughsubtractionratherthan
addition. If you are unfamiliar with imaginary numbers, dont be put off by the name. They arent really
imaginary;theyarejusttheotherpartofcertainquantitiesthatrequireapairofnumbersratherthanasingle
numbertospecifythem.
Theminussignalsomeansthatproperlength,unlikeordinarylength,maybeimaginary.Iftheproperlength
isimaginary,wesaytheeventsareseparatedinatimelike,asopposedtoaspacelike,manner.Timelikeevents
canbecausallyrelated(oneeventcaninfluencetheother),butspacelikeeventscannot,becauseinformation
aboutonewouldhavetotravelfasterthanthespeedoflighttoreachtheother,whichisimpossible.Events
separatedinatimelikemanneraremoreconvenientlycharacterizedbyapropertime:
Propertime=[DT2DX2/c2DY2/c2DZ2/c2]1/2
(Equation5B)
Inthiscase,timeisreal,butspaceisimaginary.Properlengthisthelengthofanobjectasmeasuredbyan
observermovingwiththesamevelocityastheobject,andpropertimeisthetimemeasuredbyaclockmoving
withthesamevelocityastheobserver.
Quantitiessuchasproperlengthandpropertimeonwhichallobserversagree,independentoftheirmotion,
arecalledinvariants.Thespeedoflightitselfisaninvariant.Therearemanyothers,andtheyallinvolvefour
componentsthatcombinebythePythagoreantheorem.
Thus the theory of relativity ties space and time together in a very fundamental way. One persons
spaceisanotherpersonstime.Sincespaceandtimecanbetradedbackandforth,thereisnoreasontocall
timethefourthdimensionanymorethanwecallwidththeseconddimension.Itisbetterjusttosaythat
spacetimeisfourdimensional,witheachdimensiononanequalfooting.Theapparentasymmetrybetween
spaceandtimecomesfromthelargevalueof c (3x10 8 meterspersecond,oraboutabillionmilesper
hour)andthefactthattimemovesinonlyonedirection(pasttofuture).Itisalsoimportanttounderstand
that,althoughspecialrelativityiscalledatheory,ithasbeenextensivelyverifiedtohighaccuracyby
manyexperiments,mostofwhichinvolveparticleaccelerators.
Theforegoingdiscussionexplainswhyitmightbeusefultoconsider fourdimensionalspaceandfour
dimensionalobjects,butitisprobablyfruitlesstowastetoomuchtimetryingtovisualizethem.However,wecan
describethemmathematicallyasextensionsoffamiliarobjectsinlowerdimensions.
Forexample,a hypercube isthefourdimensionalextensionofthethreedimensionalcube andthetwo
dimensionalsquare.Ithas16corners,32edges,24faces,andcontains8cubes.Its hypervolume isthefourth
powerofthelengthofeachedge,justasthevolumeofacubeisthecubeofthelengthofanedgeandtheareaof
asquareisthesquareofthelengthofanedge.
A hypersphere consistsofallpointsatagivendistancefromitscenterinfourdimensionalspace.Its
hypersurface isthreedimensionalandconsistsofaninfinitefamilyofspheres,justasthesurfaceofan
ordinarysphereistwodimensionalandconsistsofaninfinitefamilyofcircles.Wehavereasontobelieve
that our Universe might be a hypersurface of a very large hypersphere, in which case we could see
ourselvesifwepeeredfarenoughintospace,exceptforthefactthatwearealsolookingbackwardtoa
timebeforeEarthexisted.WewouldalsoneedanincrediblypowerfultelescopetoseeEarthinthisway.
ThusourperceptionthatspaceisthreedimensionalcouldbeanalogoustotheancientviewthatEarthwas
flat,aconsequenceofexperiencelimitedtoasmallportionofitssurface.
5.2 Projections
Theprevioussectionwasintendedtomotivateyourconsiderationofstrangeattractorsembedded
infourdimensional space, but most of the discussionis not essentialtowhat follows. Wewill now
describe the computer program necessarytoproduce attractors in four dimensions and then develop
methodstovisualizethem.
Themathematicalgeneralizationfromthreetofourdimensionsisstraightforward.Whereasbeforewehad
threevariablesX,Y,andZwenowhaveafourth.Havingusedupthethreelettersattheendofthealphabet,
wemustbackupanduse W forthefourthdimension,butrememberthatallthedimensionsareonanequal
footing.WeusethefirstlettersM,N,O,andPtocode4Dattractorsofsecondthroughfifthorders,respectively.
Thenumberofcoefficientsforthesecasesis60,140,280,and504,respectively.Thenumberofcoefficientsfor
order O is(O +1)(O +2)(O +3)(O +4)/6.Thenumberoffourdimensionalfifthordercodesis25 504,a
numbertoolargetocomparetoanythingmeaningful;itmightaswellbeinfinite.
TheprogrammodificationsrequiredtoaddafourthdimensionareshowninPROG18.
PROG18. Changes required in PROG17 to add a fourth dimension
1000 REM FOUR-D MAP SEARCH
1020 DIM XS(499), YS(499), ZS(499), WS(499), A(504), V(99), XY(4), XN(4), COLR%(15)
1070 D% = 4
1120 TRD% = 0
'Dimension of system
'Display third dimension as projection
1540 W = .05
1550 XE = X + .000001: YE = Y: ZE = Z: WE = W
1610 WMIN = XMIN: WMAX = XMAX
1720 M% = 1: XY(1) = X: XY(2) = Y: XY(3) = Z: XY(4) = W
2010 M% = M% - 1: XNEW = XN(1): YNEW = XN(2): ZNEW = XN(3): WNEW = XN(4)
2180
IF W < WMIN THEN WMIN = W
2190
IF W > WMAX THEN WMAX = W
2210 XS(P%) = X: YS(P%) = Y: ZS(P%) = Z: WS(P%) = W
2410 IF ABS(XNEW) + ABS(YNEW) + ABS(ZNEW) + ABS(WNEW) > 1000000! THEN T% = 2
2470 IF ABS(XNEW - X) + ABS(YNEW - Y) + ABS(ZNEW - Z) + ABS(WNEW - W) < .000001 THEN T% = 2
2540 W = WNEW
2910 XSAVE = XNEW: YSAVE = YNEW: ZSAVE = ZNEW: WSAVE = WNEW
2920 X = XE: Y = YE: Z = ZE: W = WE: N = N - 1
2950 DLZ = ZNEW - ZSAVE: DLW = WNEW - WSAVE
2960 DL2 = DLX * DLX + DLY * DLY + DLZ * DLZ + DLW * DLW
3010
ZE = ZSAVE + RS * (ZNEW - ZSAVE): WE = WSAVE + RS * (WNEW - WSAVE)
3020
XNEW = XSAVE: YNEW = YSAVE: ZNEW = ZSAVE: WNEW = WSAVE
3150 IF WMAX - WMIN < .000001 THEN WMIN = WMIN - .0000005: WMAX = WMAX + .0000005
3680 IF Q$ = "D" THEN D% = 1 + (D% MOD 4): T% = 1
3920 IF N = 1000 THEN D2MAX = (XMAX - XMIN) ^ 2 + (YMAX - YMIN) ^ 2 + (ZMAX - ZMIN) ^ 2 + (WMAX - WMIN) ^
2
3940 DX = XNEW - XS(J%): DY = YNEW - YS(J%): DZ = ZNEW - ZS(J%): DW = WNEW - WS(J%)
3950 D2 = DX * DX + DY * DY + DZ * DZ + DW * DW
4760 IF D% > 2 THEN FOR I% = 3 TO D%: M% = M% / (I% - 1): NEXT I%
IfyourunPROG18undercertainoldversionsofBASIC,suchasBASICAandGWBASIC,youarelikely
togetanerrorinline2710whentheprogramattemptstoconstructacodeforthefourthorderandfifthorder
mapsasaresultofthestringlengthlimitof255characters.Insuchacase,youmayneedtorestrictthesearchto
secondandthirdorders bysetting OMAX% =3inline 1060. Alternatively, itsnot difficulttomodifythe
programtostorethecodeinapairofstringsortoreplacethestringwithaonedimensionalarrayofintegers
containingthenumericequivalentsofeachcharacterinthestring,perhapswithaterminatingzerotosignifythe
endofthestring.Forexample,afterdimensioningCODE%(504)inline1020,line2710wouldbecome
2710
CODE%(I%) = 65 + INT(25 * RAN)
andline2740wouldbecome
2740
A(I%) = (CODE%(I%) - 77) / 10
Alsonoticethatthesearchforattractorsispainfullyslowunlessyouhaveaveryfastcomputerandagood
compiler.ReferbacktoTable22,whichlistssomeoptionsforincreasingthespeed.Thesearchcanbemade
fasterbylimitingittosecondorderbysettingOMAX%=2inline1060.
We have another trick we can use to increase dramatically the rate at which fourdimensional strange
attractorsarefoundwithoutsacrificingvariety.Itturnsoutthatmostoftheseattractorshavetheirconstantterms
nearzero.Thereasonpresumablyhastodowiththefactthattheorigin(X=Y=Z=W=0)isthenafixedpoint,
andtheinitialconditionischosenneartheorigin(X0=Y0=Z0=W0=0.05).Ifthefixedpointisunstable,then
wehaveoneoftheconditionsnecessaryforchaos.Itiseasytoaccomplishthisbyaddingafterline2730a
statementsuchas
2735
IF I% MOD M% / D% = 1 THEN MID$(CODE$, I% + 1, 1) = "M"
Thisincreasestherateoffindingattractorsbyaboutafactorof50.Manyoftheattractorsillustratedinthis
chapterwereproducedinthisway.Thischangealsoincreasestherateforlowerdimensionalmaps,butbya
muchsmallerfactor.Thisimprovementsuggeststhatthereisyetroomtooptimizethesearchroutinebyamore
intelligentchoiceofthevaluesoftheothercoefficients.
NotethatPROG18doesnotattempttodisplaythefourthdimensionbutprojectsitontotheotherthree,for
whichallthevisualizationtechniquesofthelastchapterareavailable.Dontwastetoomuchtimetryingto
understand what it means to project a fourdimensional object onto a threedimensional space. It is just a
generalizationofprojectingathreedimensionalobjectontoatwodimensionalsurface.Intheprogram,itsimply
involvesplottingX,Y,andZandignoringthevariableW.
Someexamplesoffourdimensionalattractorsprojectedontothetwodimensional XY planeareshownin
Figures 51 through 520. They dont look particularly different from those obtained by projecting three
dimensionalattractorsontotheplaneor,indeed,byjustplottingtwodimensionalattractorsdirectly.Notethat
mostoftheseattractorshavefractaldimensionslessthanorabout2.0,soperhapsitisnottoosurprisingthattheir
projectionsresemblethoseproducedbyequationsoflowerdimension.Itisraretofindattractorswithfractal
dimensionsgreaterthan3.0producedbyfourdimensionalpolynomialmaps,aswillbeshowninSection8.1.
Figure 5-1. Projection of four-dimensional quadratic map
Figure 5-2. Projection of four-dimensional quadratic map
Figure 5-3. Projection of four-dimensional quadratic map
Figure 5-4. Projection of four-dimensional quadratic map
Figure 5-5. Projection of four-dimensional quadratic map
Figure 5-6. Projection of four-dimensional quadratic map
Figure 5-7. Projection of four-dimensional quadratic map
Figure 5-8. Projection of four-dimensional quadratic map
Figure 5-9. Projection of four-dimensional quadratic map
Figure 5-10. Projection of four-dimensional quadratic map
Figure 5-11. Projection of four-dimensional quadratic map
Figure 5-12. Projection of four-dimensional quadratic map
Figure 5-13. Projection of four-dimensional quadratic map
Figure 5-14. Projection of four-dimensional quadratic map
Figure 5-15. Projection of four-dimensional quadratic map
Figure 5-16. Projection of four-dimensional quadratic map
Figure 5-17. Projection of four-dimensional quadratic map
Figure 5-18. Projection of four-dimensional cubic map
Figure 5-19. Projection of four-dimensional cubic map
Figure 5-20. Projection of four-dimensional quartic map
5.3 Other Display Techniques
ProjectingtwoofthefourdimensionsontotheremainingtwoisakintobuyingaFerraritomaketripstothe
grocerystore.Muchofoureffortiswasted.Weneedtousethetechniquesdevelopedinthelastchapterto
displaythreedimensionsanddeviseadditionalmethodstodisplaysimultaneouslythefourthdimension.
Sincewehaveseveralmethodsfordisplayingthreedimensions,weshouldbeabletousesomeofthemin
combinationtovisualizeallfourdimensions.Table51summarizesthedisplaytechniqueswehaveusedand
indicatesthenumberofdimensionsthatcanbevisualizedwithvariouscombinationsofthem.Inthetable,adash
indicatesthatthecombinationisnotpossible,andaquestionmarkindicatesthatthecombinationispossiblebut
leadstocontradictoryvisualinformation.
Table 5-1. Combinations of display techniques and the number of dimensions that can be
visualized with each
Third Dimension
Project Shadow Bands Color Anaglyph Stereo
Slices
Fourth
Dimension
Project
2D
Shadow 3D
Bands
3D
Color
3D
Anaglyph 3D
Stereo
3D
Slices
3D
3D
4D
4D
?
?
4D
3D
4D
?
4D
4D
4D
4D
3D
4D
4D
4D
4D
3D
?
4D
?
4D
3D
?
4D
4D
?
4D
3D
4D
4D
4D
4D
4D
-
InTable51,theentriesin boldface aretheoneswewillimplementintheprogram.Theywerechosen
becauseoftheirvisualeffectiveness,easeofprogramming,andlackofredundancywithothercombinations.
Casesbelowandtotheleftofthediagonalduplicatethoseaboveandtotheright.Thechangesneededinthe
programtoproducesuchfourdimensionaldisplaysareshowninPROG19.
PROG19. Changes required in PROG18 to display the fourth dimension
1000 REM FOUR-D MAP SEARCH (With 4-D Display Modes)
1040 PREV% = 5
'Plot versus fifth previous iterate
1120 TRD% = 1
'Display third dimension as shadow
1130 FTH% = 2
'Display fourth dimension as colors
3630 IF Q$ = "" OR INSTR("ADHIPRSX", Q$) = 0 THEN GOSUB 4200
3720 IF Q$ = "H" THEN FTH% = (FTH% + 1) MOD 3: T% = 3: IF N > 999 THEN N = 999: GOSUB 5600
4330
PRINT TAB(27); "H: Fourth dimension is ";
4340
IF FTH% = 0 THEN PRINT "projection"
4350
IF FTH% = 1 THEN PRINT "bands
4360
IF FTH% = 2 THEN PRINT "colors
"
"
5010 C4% = WH%
5020 IF D% < 4 THEN GOTO 5050
5030
IF FTH% = 1 THEN IF INT(30 * (W - WMIN) / (WMAX - WMIN)) MOD 2 THEN GOTO 5330
5040
IF FTH% = 2 THEN C4% = 1 + INT(NC% * (W - WMIN) / (WMAX - WMIN) + NC%) MOD NC%
5050 IF D% < 3 THEN PSET (XP, YP): GOTO 5330
'Skip 3-D stuf
5060 IF TRD% = 0 THEN PSET (XP, YP), C4%
5080
IF D% > 3 AND FTH% = 2 THEN PSET (XP, YP), C4%: GOTO 5110
5130 IF TRD% <> 2 THEN GOTO 5160
5140
IF D% > 3 AND FTH% = 2 AND (INT(15 * (Z - ZMIN) / (ZMAX - ZMIN) + 2) MOD 2) = 1 THEN PSET (XP, YP), C4%
5150
IF D% < 4 OR FTH% <> 2 THEN C% = COLR%(INT(60 * (Z - ZMIN) / (ZMAX - ZMIN) + 4) MOD 4): PSET (XP, YP),
C%
5260
XRT = XA + (XP + XZ * (Z - ZA) - XL) / HSF: PSET (XRT, YP), C4%
5270
XLT = XA + (XP - XZ * (Z - ZA) - XH) / HSF: PSET (XLT, YP), C4%
5320
PSET (XP, YP), C4%
5630 IF TRD% = 3 OR (D% > 3 AND FTH% = 2 AND TRD% <> 1) THEN FOR I% = 0 TO NC%: COLR%(I%) = I% + 1:
NEXT I%
In presenting sample displays from PROG19, we ignore those that convey only threedimensional
informationandconcentrateonthenewcombinationsthatpermitfullfourdimensionaldisplays.Theyfallinto
twogroupsthosethatrequiretheuseofcolorandthosethatdonot.Examplesofthethree4Dmonochrome
combinationsareshowninFigures521through544,andexamplesofthesixcolorcombinationsareshownin
Plates17through22.
Figure 5-21. Four-dimensional quadratic map with shadow bands
Figure 5-22. Four-dimensional quadratic map with shadow bands
Figure 5-23. Four-dimensional quadratic map with shadow bands
Figure 5-24. Four-dimensional quadratic map with shadow bands
Figure 5-25. Four-dimensional quadratic map with shadow bands
Figure 5-26. Four-dimensional quadratic map with shadow bands
Figure 5-27. Four-dimensional quadratic map with shadow bands
Figure 5-28. Four-dimensional cubic map with shadow bands
Figure 5-29. Four-dimensional quadratic map with stereo bands
Figure 5-30. Four-dimensional quadratic map with stereo bands
Figure 5-31. Four-dimensional quadratic map with stereo bands
Figure 5-32. Four-dimensional cubic map with stereo bands
Figure 5-33. Four-dimensional cubic map with stereo bands
Figure 5-34. Four-dimensional cubic map with stereo bands
Figure 5-35. Four-dimensional quartic map with stereo bands
Figure 5-36. Four-dimensional quartic map with stereo bands
Figure 5-37. Four-dimensional quadratic map with sliced bands
Figure 5-38. Four-dimensional quadratic map with sliced bands
Figure 5-39. Four-dimensional quadratic map with sliced bands
Figure 5-40. Four-dimensional quadratic map with sliced bands
Figure 5-41. Four-dimensional cubic map with sliced bands
Figure 5-42. Four-dimensional quartic map with sliced bands
Figure 5-43. Four-dimensional quartic map with sliced bands
Figure 5-44. Four-dimensional quintic map with sliced bands
Youmightbeinterestedinthechallengeofproducingattractorsembeddedindimensionshigherthanfour.In
five dimensions, you need to define a new variable, say V, and modify the program as was done for four
dimensionsin PROG18.Theprogramhasbeenwrittentomakeitrelativelyeasytoextendittofiveoreven
higherdimensions.Beforewarnedthatthecalculationwillbeveryslow.Youwillalmostcertainlywanttosetthe
coefficientsoftheconstanttermstozeroandprobablyrestrictyoursearchtoquadraticmaps.Thenumberof
fifthdimensionpolynomialcoefficientsfororderOis(O+1)(O+2)(O+3)(O+4)(O+5)/24.WithO=5,the
numberis1260.
Thesimplestdisplaytechniqueistoprojectthefifthdimensionontotheotherfour.Thisiswhattheprogram
doesautomaticallyifyoudontdoanythingspecial.Severalcombinationsoftechniques,whichwehavealready
developed,arecapableofdisplayingfivedimensions.Youmighttrycombiningshadows,bands,andcolor,for
example.Table52liststhesevenpossiblecombinationsoffivedimensionaldisplaytechniquesthatdontleadto
visualcontradictions.
Table 5-2. Combinations of display techniques that can be used in five dimensions
Shadow
Shadow
Shadow
Bands
Bands
Bands
Bands
Bands
Color
Color
Anaglyph
Stereo
Color
Slices
Slices
Stereo
Slices
Slices
Color
Stereo
Slices
Foraheroicexerciseinprogramming,visualization,andpatience,youcantrytoextendthecalculationtosix
dimensions.Asixdimensional, fifthordersystemofpolynomialshas 2772coefficients.There areonlytwo
appropriate combinations of display techniques suitable for six dimensions: shadowbandscolorslices and
bandscolorstereoslices.Ifyoudecidetotrysevendimensions,youmustinventanewdisplaytechnique.
5.4 Writing on the Wall
Sincefourdimensionalattractorshavethegreatestcomplexityandvarietyofallthecasesdescribedinthis
book,theyofferthegreatestpotentialasdisplayart.Forsuchpurposes,youwillprobablywanttoprintthemona
large sheet of paper. With an appropriate printer or plotter, any of the visualization techniques previously
describedcanbeusedtoproducesuchlargeprints.
An alternate technique that has proved very successful is an extension of the characterbased method
describedinSection4.5.Inthistechnique,thethirddimensioniscodedasanASCIIcharacterwithadensity
relatedtothe Z value,andthefourthdimensioniscodedincolor.Colorpenandpencilplottersandinkjet
plotters, as well as more expensive but highquality electrostatic and thermal plotters, normally used for
engineeringandarchitecturaldrawings,canprinttextonsheetsupto36incheswide.Inkjetplottersaregrowing
inpopularityoverthemoretraditionalpenplottersbecausetheyarefasterandquieteranddontrequirespecial
paper.Theycanalsoprintgrayscales.Withcare,youcanpiecetogethersmallersegmentsprintedbymore
conventionalmeans.
Whentheattractorsarereducedtosequencesoftext,resolutionsof640by480(VGA)or800by600(Super
VGA)producelargefigureswhoseindividualcharacterscanbereadwhenexaminedcloselybutthatblendinto
continuous contours when viewed from a distance. Artists often use this technique in which the viewer is
providedwithadifferentvisualexperienceondifferentscales.Youshouldusethelargestandboldestcharacters
availabletomaximizethecontrast,providedtheyremainreadable.Thereshouldbelittleornospacebetween
rowsandcolumnsofcharacters.Withapenplotter,thepensizecanbechosenforthebestcompromiseof
contrastandreadability.Apenthatmakesalinewidthof0.35mm(fine)isareasonablechoice.
Inksareavailableinonlyalimitednumberofcolors,andpenplottersareusuallycapableofaccommodating
onlyasmallnumberofpens.Thepenscanbesequencedtoplacecompatiblecolorsnexttooneanother.With
eightpensandcommonlyavailableinks,agoodsequenceismagenta,red,orange(oryellow),brown,black,
green,turquoise,andblue.TheclosestcolorsequenceforviewingonthecomputerscreenfromTable41is13,
12,4(or14),6,8,2,3,and9,withawhite(15)background.Withupwardsof20charactersproducingdifferent
colorintensities,thelimitationofeightcolorsofinkisnotaseriousone.WitheightcolorsandASCIIcodesfrom
32to255,youcanhave28differentintensitiesforeachcolor.Theinkscanbemixedtoproducedifferentshades
ofthecolors.Pencilsarelessexpensiveanddontclogordryoutaspensoftendo,butpencilplotshavea
tendencytosmudge.Ink,ofcourse,alsosmudgesuntilitisthoroughlydry.Plottersarerelativelyslow,and
attractorsproducedbythismethodtypicallyrequireafewhourstoafulldaytoproduce.
PapercommonlyusedforengineeringdrawingscomesinatleastfivestandardsizesA(81/2by11inches),
B(12by18inches),C(18by24inches),D(24by36inches),andE(36by48inches).Englishsizesand
architecturalsizesareslightlydifferent,andthusasheetmayvarysomewhatfromthesedimensions.Also,36
inchwidepaperisavailableonlongrolls.
Common paper types are tracing bond, which is the most economical, vellum, which is smooth and
translucent,andpolyesterfilm,whichishighlytranslucent,dimensionallystable,andrelativelyexpensive.The
translucentpapersoffertheinterestingpossibilityofbackingtheprintwithamonochromeorcolorcopyofitself
toenhancethecontrastortoproduceashadoweffectifthetwoaredisplacedslightly.Otherinterestingeffects
canbeachievedbybackingonetranslucentattractorwithaprintofanotherorbybacklightingtheprint.Some
papersstretchslightlyandthushaveatendencytowrinkle.Paperwithsignificantacidcontentshouldbeavoided
becauseitturnsyellowandbecomesbrittlewithage.
Someofthemostartisticexamplesofstrangeattractorshavebeenproducedbythesetechniques,butthey
cannotbeadequatelyillustratedinthisbook.Nocomputerprogramisoffered,sinceitissodependentonyour
hardware.Youwillwanttoexperimenttofindthetechniquethatworksbestforyouandthatmakesthemost
effectiveuseofyourprinterorplotter.
5.5 Murals and Movies
Thetechniqueofmakinglargescaleattractorsfordisplaycanbecarriedtoitslogicalextremebymakinga
mural.Specialtechniquesusingsometypeofstencilarerequiredtotransformthecomputeroutputtopaintonthe
wall.Silkscreenisusefulfortransferringtheimagetofabrics.Fractalteeshirtsemployingthistechniquehave
recentlybecomepopular.
Toproduceamural,youneedtostartwithalargenumberofplots,eachshowingasmallsectionofthe
attractor. A property of fractals is that they have detail on all scales, and thus a large mural should look
interestingwhenviewedeitherfromadistanceorcloseup.
You might also photograph the computer screen or a highquality print and produce slides that can be
projectedontoalargesurfaceorscreenwithaslideprojector.Equipmentisavailablecommerciallyforproducing
slidesdirectlyfromdigitalcomputeroutput.Asequenceofsuchslidesmakesaverycompellingpresentationor
visualaccompanimenttoalectureormusicalproduction.
ThecolorslicesshowninPlate22suggestthepossibilityofmakingcolormoviesbyextendingthetechnique
toaverylargenumberofslicesandusingeachoneasaframeofamovie.Theeffectistocausetheattractorto
emergeatapointinanemptyfieldandtogrowslowly,bendingandwigglinguntilfullydeveloped,andthento
disappearslowlyintoadifferentpoint.Ifthetechnologyfordoingthisisnotavailabletoyou,tryprintingalarge
numberofattractorslicesonsmallcardsandfanningthroughthemtoproduceasemblanceofanimation.This
technique,usingtheattractorsdescribedinSection7.6,wasusedtoproducetheanimationintheupperright
corneroftheoddpagesofthisbook.
If the idea of making strangeattractor movies appeals to you, another technique is totake one of your
favoriteattractorsandslowlychangeoneormoreofthecoefficientsinsuccessiveframesofthemovie.Agood
waytostartistomultiplyallthecoefficientsbyafactorthatvariesfromslightlylessthan1.0toslightlygreater
than 1.0. You must determine the range over which the coefficients can be changed without the solutions
becomingunboundedornonchaotic.Theendsofthisrangethenbecomethebeginningandendofthemovie.
Sometimestheattractorslowlyandcontinuouslyaltersitsshape.Thechangescaninvolvebifurcations,such
astheperioddoublingsequenceinthelogisticequationdescribedinChapter1.Suchbifurcationsarecalled
subtle.Atothertimes,theattractoranditsbasinabruptlydisappearatacriticalvalueofthecontrolparameter.
Suchdiscontinuousbifurcationsarecalledcatastrophes.
Ifthecontrolparameterischangedintheoppositedirection,theresultmaybedifferentfromsimplyrunning
themoviebackward.Thisisanexampleof hysteresis,whichisaformofmemoryinadynamicalsystem.It
servestolimittheoccurrenceofcatastrophes.Thethermostatthatcontrolsyourheatprobablyuseshysteresisto
keepthefurnacefromcyclingonandofftoofrequently.Catastrophicbifurcationsusuallyexhibithysteresis,
whereassubtlebifurcationsdonot.
Thesefourdimensionalmapsarealsowellsuitedforcolorholographicdisplayorforexperimentationwith
virtualreality,inwhichtheviewiscontrolledbythemotionofyourheadandhandstogivethesensationof
movingthroughtheobject.Thetechnologyiscomplicated,buttheresultsarevisuallyandmentallystimulating.
5.6 Search and Destroy
Ifyouhaveworkedcarefullythroughthetext,yourprogramhascreatedadiskfileSA.DICcontainingthe
codesofalltheattractorsgeneratedsinceyouranthe PROG11 program.Wenowdevelopthecapabilityto
examinetheseattractorsandsavetheinterestingonesinafile FAVORITE.DIC,whilediscardingtheothers.
Thisfeatureallowsyoutoruntheprogramovernightandcollectattractorsforrapidviewingthenextday.This
capability is especially useful if you have a slow computer. The required program changes are shown in
PROG20.
PROG20. Changes required in PROG19 to evaluate the attractors in SA.DIC and save the best of
them in FAVORITE.DIC
1000 REM FOUR-D MAP SEARCH (With Search and Destroy)
1380 IF QM% <> 2 THEN GOTO 1420
1390
NE = 0: CLOSE
1400
OPEN "SA.DIC" FOR APPEND AS #1: CLOSE
1410
OPEN "SA.DIC" FOR INPUT AS #1
2420 IF QM% = 2 THEN GOTO 2490 'Speed up evaluation mode
2610 IF QM% <> 2 THEN GOTO 2640 'Not in evaluate mode
2620
2630
IF EOF(1) THEN QM% = 0: GOSUB 6000: GOTO 2640
IF EOF(1) = 0 THEN LINE INPUT #1, CODE$: GOSUB 4700: GOSUB 5600
3340 IF QM% <> 2 THEN GOTO 3400
'Not in evaluate mode
3350
LOCATE 1, 1: PRINT "<Space Bar>: Discard
3370
LOCATE 1, 49: PRINT "<Esc>: Exit";
3380
LOCATE 1, 69: PRINT CINT((LOF(1) - 128 * LOC(1)) / 1024); "K left";
3390
GOTO 3430
3620 IF QM% = 2 THEN GOSUB 5800
<Enter>: Save";
'Process evaluation command
3630 IF INSTR("ADEHIPRSX", Q$) = 0 THEN GOSUB 4200
3710 IF Q$ = "E" THEN T% = 1: QM% = 2
4220 WHILE Q$ = "" OR INSTR("AEIX", Q$) = 0
4320
PRINT TAB(27); "E: Evaluate attractors"
5800 REM Process evaluation command
5810 IF Q$ = " " THEN T% = 2: NE = NE + 1: CLS
5820 IF Q$ = CHR$(13) THEN T% = 2: NE = NE + 1: CLS : GOSUB 5900
5830 IF Q$ = CHR$(27) THEN CLS : GOSUB 6000: Q$ = " ": QM% = 0: GOTO 5850
5840 IF Q$ <> CHR$(27) AND INSTR("HPRS", Q$) = 0 THEN Q$ = ""
5850 RETURN
5900 REM Save favorite attractors to disk file FAVORITE.DIC
5910 OPEN "FAVORITE.DIC" FOR APPEND AS #2
5920 PRINT #2, CODE$
5930 CLOSE #2
5940 RETURN
6000 REM Update SA.DIC file
6010 LOCATE 11, 9: PRINT "Evaluation complete"
6020 LOCATE 12, 8: PRINT NE; "cases evaluated"
6030 OPEN "SATEMP.DIC" FOR OUTPUT AS #2
6040 IF QM% = 2 THEN PRINT #2, CODE$
6050 WHILE NOT EOF(1): LINE INPUT #1, CODE$: PRINT #2, CODE$: WEND
6060 CLOSE
6070 KILL "SA.DIC"
6080 NAME "SATEMP.DIC" AS "SA.DIC"
6090 RETURN
TheprogramusestheEkeytoentertheevaluationmode.Wheninthismode,theattractorsinSA.DICare
displayedonebyone.Eachcaseremainsonthescreenandcontinuestoiterateuntilyoupressthespacebar,
which deletes it, the Enter key, which saves it in the file FAVORITE.DIC, the Esc key, which exits the
evaluationmode,or,inrarecases,untilthesolutionbecomesunbounded,whereuponitisdeleted.Whilean
attractorisbeingdisplayed,youcanpressthe H, R, P,and S keystochangethewayitisdisplayedwithout
returningtothemenuscreen.Theupperrightcornerofthescreenshowsthenumberofkilobyteslefttobe
evaluatedintheSA.DICfile.Whenintheevaluationmode,theprogrambypassesthecalculationofthefractal
dimensionandLyapunovexponentsothateachcaseisdisplayedmorequickly.
Asyoubegintoaccumulateacollectionoffavoriteattractors,youwillprobablywanttogobackandfind
yourfavoritesofthefavorites.Youmerelyneedtorenamethe FAVORITE.DIC fileto SA.DICandevaluate
themasecondtime.Theattractorsexhibitedinthisbookwereselectedbythismethodafterlookingatabout
100,000cases.Sincethe FAVORITE.DIC fileisinordinaryASCIItext,youcanshareyourfavoriteswitha
friendwhomayhaveadifferentcomputeroroperatingsystem.Youcaneasilyemailthefiletosomeoneor
uploadittoacomputerbulletinboardormainframecomputer.Remember,however,thattheprogramsinthis
bookarecopyrightedandareforyourpersonaluse.Itisaviolationofthecopyrighttosharetheprogramswith
anyoneelse.Youcannowbeginyourownprivatecollectionofstrangeattractorsartwork!