Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #7224
| From | Roger Bagula <roger.bagula@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | high iteration trouble: new 3d IFS using Cuboids instead of Points |
| Date | 2011-12-15 09:57 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jccga1$mgc$1@smc.vnet.net> (permalink) |
I'm having some trouble getting this IFS to run a higher than
50000 iterations:
(*Fudge Flake pivot/overlap IFS 3d Fractal*)
(* by R. L. Bagula 14 Dec 2011 *)
Clear[f, dlst, pt, cr, ptlst]
dlst = Table[ Random[Integer, {1, 9}], {n, 50000}];
r = 1; q = Sqrt[2];
f[1, {x_, y_, z_}] =
N[{-y/Sqrt[3] - 1/2, x/Sqrt[3] - Sqrt[3]/2, z/r}]/q;
f[2, {x_, y_, z_}] =
N[{-y/Sqrt[3] - 1/2, x/Sqrt[3] + Sqrt[3]/2, z/r}]/q;
f[3, {x_, y_, z_}] = N[{-y/Sqrt[3] + 1, x/Sqrt[3], z/r}]/q;
(*x,z plane*)
f[4, {x_, y_, z_}] =
N[{-z/Sqrt[3] - 1/2, y/r, x/Sqrt[3] - Sqrt[3]/2}]/q;
f[5, {x_, y_, z_}] =
N[{-z/Sqrt[3] - 1/2, y/r, x/Sqrt[3] + Sqrt[3]/2}]/q;
f[6, {x_, y_, z_}] = N[{-z/Sqrt[3] + 1, y/r, x/Sqrt[3]}]/q;
(*y,z plane*)
f[7, {x_, y_, z_}] =
N[{x/r, -y/Sqrt[3] - 1/2, z/Sqrt[3] - Sqrt[3]/2}]/q;
f[8, {x_, y_, z_}] =
N[{x/r, -y/Sqrt[3] - 1/2, z/Sqrt[3] + Sqrt[3]/2}]/q;
f[9, {x_, y_, z_}] = N[{x/r, -y/Sqrt[3] + 1, z/Sqrt[3]}]/q;
pt = {0.5, 0.5, 0.5};
cr[n_] :=
Flatten[Table[
If[i == j == k == 1, {}, RGBColor[i, j, k]], {i, 0, 1, 0.5}, {j,
0, 1, 0.5}, {k, 0, 1, 0.5}]][[1 + Mod[n, 26]]];
ptlst = Table[{cr[dlst[[j]]], EdgeForm[],
Cuboid[pt = f[dlst[[j]], Sequence[pt]],
pt + {.005, .005, .005}]},
{j, Length[dlst]}];
g = Show[Graphics3D[ptlst], AspectRatio -> Automatic,
PlotRange -> All, Boxed -> False]
Sqrt[2]
Show[g, ViewPoint -> {-0.178, -0.172, 3.375}]
Show[g, ViewPoint -> {2.649, -2.104, 0.059}]
I'd also like some idea why this comes out a torus
instead of a space filling curve?
Roger Bagula
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
high iteration trouble: new 3d IFS using Cuboids instead of Points Roger Bagula <roger.bagula@gmail.com> - 2011-12-15 09:57 +0000
csiph-web