Roger Bagula
2007-07-26 18:57:20 UTC
This is a combination of Dr. Frame's driven program,
my color added and Dr. Lichtenbau of Mathematica "tuning" the code.
It is a three part fractile tile.
The code can be used for almost any IFS wanted.
Clear[f, dlst, pt, cr, ptlst]
dlst = Table[ Random[Integer, {1, 3}], {n, 250000}];
in = N[{{1, 0}, {-1/2, Sqrt[3]/2}, {-1/2, -Sqrt[3]/2}}];
f[j_, {x_, y_}] := {-y, x}/N[Sqrt[3]] + in[[j]]
pt = {0.5, 0.5};
cr[n_] = If[n - 1 == 0, RGBColor[0, 0, 1],
If[n - 2 == 0, RGBColor[0, 1, 0], If[n -
3 == 0, RGBColor[1, 0, 0], RGBColor[0, 0, 0]]]];
ptlst = Table[{cr[dlst[[j]]], Point[pt = f[dlst[[j]], Sequence[pt]]]},
{j, Length[dlst]}];
Show[Graphics[Join[{PointSize[.001]}, ptlst]], AspectRatio ->
Automatic, PlotRange -> All]
my color added and Dr. Lichtenbau of Mathematica "tuning" the code.
It is a three part fractile tile.
The code can be used for almost any IFS wanted.
Clear[f, dlst, pt, cr, ptlst]
dlst = Table[ Random[Integer, {1, 3}], {n, 250000}];
in = N[{{1, 0}, {-1/2, Sqrt[3]/2}, {-1/2, -Sqrt[3]/2}}];
f[j_, {x_, y_}] := {-y, x}/N[Sqrt[3]] + in[[j]]
pt = {0.5, 0.5};
cr[n_] = If[n - 1 == 0, RGBColor[0, 0, 1],
If[n - 2 == 0, RGBColor[0, 1, 0], If[n -
3 == 0, RGBColor[1, 0, 0], RGBColor[0, 0, 0]]]];
ptlst = Table[{cr[dlst[[j]]], Point[pt = f[dlst[[j]], Sequence[pt]]]},
{j, Length[dlst]}];
Show[Graphics[Join[{PointSize[.001]}, ptlst]], AspectRatio ->
Automatic, PlotRange -> All]