Re: Crashing problem with 3d IFS program
- To: mathgroup at smc.vnet.net
- Subject: [mg123568] Re: Crashing problem with 3d IFS program
- From: Roger Bagula <roger.bagula at gmail.com>
- Date: Sun, 11 Dec 2011 03:48:50 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <jbq3b6$ihl$1@smc.vnet.net> <jbvjie$j07$1@smc.vnet.net>
Remi Barrere came up with a new program that works
well and doesn't crash for want of memory.
It works at level two as well to give the "gyro" :gyrofastium
shaped Menger fractal IFS.
Needs["Morphology`Master`"] (* last version *)
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]]
gr1 = Draw[
Nest[Mapping[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, Mesh -> None, Axes -> None,
PlotRange -> All, Boxed -> False];
gr2 = Draw[
Nest[Mapping[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, Mesh -> None, Axes -> None,
PlotRange -> All, Boxed -> False];
gr3 = Draw[
Nest[Mapping[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, Mesh -> None, Axes -> None,
PlotRange -> All, Boxed -> False];
gr4 = Draw[
Nest[Mapping[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, Mesh -> None, Axes -> None,
PlotRange -> All, Boxed -> False];
gw = Show[{gr1, gr2, gr3, gr4}, PlotRange -> All]
- Follow-Ups:
- Re: Crashing problem with 3d IFS program
- From: Murray Eisenberg <murray@math.umass.edu>
- Re: Crashing problem with 3d IFS program