Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #7006 > unrolled thread
| Started by | Roger Bagula <roger.bagula@gmail.com> |
|---|---|
| First post | 2011-12-08 10:25 +0000 |
| Last post | 2011-12-11 08:57 +0000 |
| Articles | 5 — 3 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Crashing problem with 3d IFS program Roger Bagula <roger.bagula@gmail.com> - 2011-12-08 10:25 +0000
Re: Crashing problem with 3d IFS program Roger Bagula <roger.bagula@gmail.com> - 2011-12-10 12:33 +0000
Re: Crashing problem with 3d IFS program Roger Bagula <roger.bagula@gmail.com> - 2011-12-11 08:56 +0000
Re: Crashing problem with 3d IFS program Murray Eisenberg <murray@math.umass.edu> - 2011-12-12 11:43 +0000
Re: Crashing problem with 3d IFS program Heike Gramberg <heike.gramberg@gmail.com> - 2011-12-11 08:57 +0000
| From | Roger Bagula <roger.bagula@gmail.com> |
|---|---|
| Date | 2011-12-08 10:25 +0000 |
| Subject | Crashing problem with 3d IFS program |
| Message-ID | <jbq3b6$ihl$1@smc.vnet.net> |
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
[toc] | [next] | [standalone]
| From | Roger Bagula <roger.bagula@gmail.com> |
|---|---|
| Date | 2011-12-10 12:33 +0000 |
| Message-ID | <jbvjie$j07$1@smc.vnet.net> |
| In reply to | #7006 |
Well with a little effort I got the second level and solved the problem. These IFS take too much memory. I can get one or two at a time, but all four just takes too much memory for Mathematica to handle . I looked in the preferences, but I don't see any way to increase the Kernal memory to several GB gegabytes? Anyway the models are no good for 3d printing at that level of memory: 879 megabytes for an obj 3d model 429 megabytes for an stl 3d model 188.4 for a 3ds 3d model.
[toc] | [prev] | [next] | [standalone]
| From | Roger Bagula <roger.bagula@gmail.com> |
|---|---|
| Date | 2011-12-11 08:56 +0000 |
| Message-ID | <jc1r8m$t3g$1@smc.vnet.net> |
| In reply to | #7075 |
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]
[toc] | [prev] | [next] | [standalone]
| From | Murray Eisenberg <murray@math.umass.edu> |
|---|---|
| Date | 2011-12-12 11:43 +0000 |
| Message-ID | <jc4pcm$cgn$1@smc.vnet.net> |
| In reply to | #7075 |
What is the URL for Barrere's Morphology package? The only thing I could find was a link from his Mathematica Journal article to an alpha3 version. On 12/11/11 3:48 AM, Roger Bagula wrote: > 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 *) -- Murray Eisenberg murray@math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 413 549-1020 (H) University of Massachusetts 413 545-2859 (W) 710 North Pleasant Street fax 413 545-1801 Amherst, MA 01003-9305
[toc] | [prev] | [next] | [standalone]
| From | Heike Gramberg <heike.gramberg@gmail.com> |
|---|---|
| Date | 2011-12-11 08:57 +0000 |
| Message-ID | <jc1r9l$t3o$1@smc.vnet.net> |
| In reply to | #7006 |
It seems that Draw in your package uses ParametricPlot3D to plot the
shapes. Since the shapes are basically just polyhedra, you only need to
know the coordinates of the vertices of the shapes. You can then use
Polygon to draw the faces, e.g. you could do something like
plot[Manifold[p_, c___]] := Graphics3D@Module[{pp, combis, img},
If[ArrayDepth[p] == 1, pp = {p}, pp = p];
combis = Tuples[{c}[[All, {2, 3}]]];
With[{
faces = {{1, 5, 6, 2}, {1, 2, 4, 3}, {1, 3, 7, 5},
{8, 7, 3, 4}, {8, 4, 2, 6}, {8, 6, 5, 7}}},
Table[img = k /. (Thread[{c}[[All, 1]] -> #] & /@ combis);
GraphicsComplex[img, Polygon /@ faces], {k, pp}]]]
Then to plot g, g2, etc. you could do
(* copy-pasted from previous post *)
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 = plot[
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}], 2]];
gr3 = plot[
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}], 2]];
gr2 = plot[
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}], 2]];
gr4 = plot[
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}], 2]];
gw = Show[{gr, gr2, gr3, gr4}, PlotRange -> All]
Heike
On 10 Dec 2011, at 13:28, Roger Bagula wrote:
> Well with a little effort I got the second level and solved the
> problem.
> These IFS take too much memory. I can get one or two at a time,
> but all four just takes too much memory for Mathematica to handle .
> I looked in the preferences, but I don't see any way to
> increase the Kernal memory to several GB gegabytes?
> Anyway the models are no good for 3d printing at that level of memory:
> 879 megabytes for an obj 3d model
> 429 megabytes for an stl 3d model
> 188.4 for a 3ds 3d model.
>
>
>
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web