Greetings.
Recently I have been working on a project for a class. Within the project I am attempting to display multiple circles constantly increasing in size as a For loop progresses. I have no problem increasing the size of the circles, nor displaying the circles, but the circles are constantly being over written by the next circle. I have been attempting to find a way to combine all of the circles into one graph, and also combine each circle into it's own graph (for individual use). This is the code I have written so far (there will also be an attatched copy).
xSt[] = 0; (* x starting position *)
ySt[] = 0; (*y starting position *)
years = 0; (* The years that pass *)
endTime = 100; (* Amount of years until the end of time *)
probLife = 0; (* The probability that life will sprout up *)
nLife = 0; (* Amount of Circles of Life; and designation number *)
circleLife[] = 0; (* Circle of Life *)
rMulti = 0 ; (* Growth multiplier *)
rBase = 0; (* Base growth rate *)
rGrowth[] = 0; (* Rate of Growth for each CoL *)
orgGrowth[] =
Â 0; (* Used to keep track of original growth rate assigned to \
specific life form *)
ContourPlot[x y, {x, -1, 1}, {y, -1, 1},
PlotRange -> {{-100, 100}, {-100, 100}},
PlotLabel -> Dynamic["Year = " <> ToString[years]],
Epilog -> Dynamic[plot[[1]]]]
For[years = 1, years < endTime,
Â probLife = RandomInteger[{1, 10}];
Â
Â (* The following If function checks if there are any circles of \
life and if there is, begins updating them,
Â as if the life form is expanding radially *)
Â If[nLife > 0,
Â Â For[n = 1, n <= nLife,
Â Â Â n++,
Â Â Â rGrowth[n] = rGrowth[n] + orgGrowth[n];
Â Â Â plot =
Â Â Â Â ContourPlot[((a - xSt[n])^2 + (b - ySt[n])^2 ==
Â Â Â Â Â Â Â rGrowth[n]^2), {a, -100 \[Pi], 100 \[Pi]}, {b, -100 \[Pi],
Â Â Â Â Â Â 100 \[Pi]},
Â Â Â Â Â PlotRange -> {{-100, 100}, {-100, 100}}];
Â Â Â (* Pause[0.1] *)](* End For n *)
Â Â ]; (* End If nLife *)
Â
Â (* The following If function checks if the probability of life \
forming is true and if so creates a new form of life at a random \
point on the plot and the size and growth rate of that life form *)
Â If[probLife == 1,
Â Â {nLife = nLife + 1;
Â Â Â Â xSt[nLife] = RandomReal[{-100, 100}];
Â Â Â Â ySt[nLife] = RandomReal[{-100, 100}];
Â Â Â Â rMulti = RandomReal[{.01, .1}];
Â Â Â Â rBase = RandomReal[{1, 10}];
Â Â Â Â
Â Â Â Â rGrowth[nLife] = (rMulti rBase);
Â Â Â Â orgGrowth[nLife] = (rMulti rBase);
Â Â Â Â plot =
Â Â Â Â Â ContourPlot[((a - xSt[nLife])^2 + (b - ySt[nLife])^2 ==
Â Â Â Â Â Â Â Â rGrowth[nLife]^2), {a, -100 \[Pi],
Â Â Â Â Â Â Â 100 \[Pi]}, {b, -100 \[Pi], 100 \[Pi]},
Â Â Â Â Â Â PlotRange -> {{-100, 100}, {-100, 100}}]};
Â Â ]; probLife = 0;(* End If probLife *)
Â
Â (* Pause[0.1]; *)
Â years++;
Â ] ;(* End For years*)
Also, while attempting a variety of different methods and approaches, I receive this error message
"An improperly formatted option head (Graphics) was encountered while reading a Graphics. The head of the option must be Rule or RuleDelayed."
But I do not know exactly what it means, and my searches for an answer to this online has been fruitless.
Please help me Mathematica Community, you're my ony hope.
Attachments: