Crashing problem with 3d IFS program
- To: mathgroup at smc.vnet.net
- Subject: [mg123455] Crashing problem with 3d IFS program
- From: Roger Bagula <roger.bagula at gmail.com>
- Date: Thu, 8 Dec 2011 05:22:35 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
I don't know what the problem is: at level two this goes "bang" on me. I've had the same problem when I try to add color with an Insert[]. Needs["Manifolds`Morphology`"] OneStepIFS[ifs_][s_] := Flatten[Map[Through[ifs[#]] &, s], 1] IterateIFS[ifs_, init_, n_] := Nest[OneStepIFS[ifs], {init}, n] ManifoldIFS[ifs_, Manifold[p_, c___], n_] := Manifold[IterateIFS[ifs, p, n], c] Clear[Sierpinsky3D, Sierpinsky3DIFS, gr] pieces = N[ {{0, 0, 0}, {0, 0, 1}, {0, 0, 2}, {0, 1, 0}, {0, 1, 2}, {0, 2, 0}, {0, 2, 1}, {0, 2, 2}, {1, 1/2, 0}, {1, 1/2, 2}, {1, 1.5, 0}, {1, 1.5, 2}, {2, 1, 0}, {2, 1, 1}, {2, 1, 2}, {-1, 0, 1/2}, {-1, 2, 1/2}, {-1, 0, 1.5}, {-1, 2, 1.5}, {-2, 0, 1}, {-2, 1, 1}, {-2, 2, 1}}/4]; Sierpinsky3D[n_][v_] := (1/3)*v + pieces[[n]] Sierpinsky3DIFS := Array[Sierpinsky3D, Length[pieces]] gr = Draw[ ManifoldIFS[Sierpinsky3DIFS, Manifold[{u/1.01, (1 - u) v + 1, 2* w/1.01}/(4/3)/2, {u, 0, 1}, {v, 0, 1}, {w, 0, 1}], 1], PlotPoints -> 2, Axes -> None, PlotRange -> All, Boxed -> False] gr3 = Draw[ ManifoldIFS[Sierpinsky3DIFS, Manifold[{u/1.01, -(1 - u) v + 1, 2* w/1.01}/(4/3)/2, {u, 0, 1}, {v, 0, 1}, {w, 0, 1}], 1], PlotPoints -> 2, Axes -> None, PlotRange -> All, Boxed -> False] gr2 = Draw[ ManifoldIFS[Sierpinsky3DIFS, Manifold[{-u/1.01, 2* w/1.01, 1 + (1 - u) v}/(4/3)/2, {u, 0, 1}, {v, 0, 1}, {w, 0, 1}], 1], PlotPoints -> 2, Axes -> None, PlotRange -> All, Boxed -> False] gr4 = Draw[ ManifoldIFS[Sierpinsky3DIFS, Manifold[{-u/1.01, 2*w/1.01, 1 - (1 - u) v}/(4/3)/2, {u, 0, 1}, {v, 0, 1}, {w, 0, 1}], 1], PlotPoints -> 2, Axes -> None, PlotRange -> All, Boxed -> False] gw = Show[{gr, gr2, gr3, gr4}, PlotRange -> All] The package is at: At: http://www.ens2m.fr/maths/Barrere%20Remi/Mathematica/pages/files.html http://www.ens2m.fr/maths/Barrere%20Remi/Mathematica/packages/Manifolds.zip