slight revision of commands in DLA animation program
- To: mathgroup at yoda.physics.unc.edu
- Subject: slight revision of commands in DLA animation program
- From: gaylord at ux1.cso.uiuc.edu
- Date: Tue, 30 Jun 1992 11:41:01 -0500
from the DLA animation program:
Dynamic[occupiedSites_List] :=
-garbage-
xMax = Max[Transpose[occupiedSites][[1]]];
xMin = Min[Transpose[occupiedSites][[1]]];
xRange = {xMin -1, xMax +1};
yMax = Max[Transpose[occupiedSites][[2]]];
yMin = Min[Transpose[occupiedSites][[2]]];
yRange = {yMin -1, yMax +1};
-garbage-
PlotRange->{xRange, yRange},
-garbage-
]
all of these commands can be replaced by
PlotRange->Map[({Min[#] - 1, Max[#] + 1})&, Transpose[occupiedSites]]
btw - the spreading program will be posted by independence day [the editor
of Mathematica in Education which is publishing the full article on
spreading is generously allowing me to post the program before the article
appears. to get the full article with discussion and a detailed explanation
of the code, see Mathematica in Education, vol. 1 no. 4 Fall 1992
(forthcoming)]
"if you're not programming functionally, then you must be programming
dysfunctionally"
richard j. gaylord, university of illinois, gaylord at ux1.cso.uiuc.edu