- #1
cuallito
- 95
- 1
Hello, I saw an applet awhile ago during a late-night mathematical web-surfing marathon that used the addition of plane waves at different angles to generate aperiodic tilings (like the penrose tiling.) I haven't been able to find it again. I'm trying to make my own version of it, using the same idea.
It works like a charm for even numbers of symmetry (change the 'sym' variable to play around with different fold symmetries), but for odd numbers of 'sym' it generates patterns with 2*sym-fold symmetry. I've tried everything, like using Exp[i*v] instead of Cos[v], varying the phase between each of the component waves, and even using Sinu=Cos[v]*UnitStep[v] to stop from getting 'extra' interference, but none of them gives me the correct result for odd numbers :( Help!?
Code:
xmin = -10; (*Min X coord to graph*)
xmax = 10; (*Max X coord to graph*)
ymin = -10; (*Min Y coord to graph*)
ymax = 10; (*Max Y coord to graph*)
rez = 300; (*Graph resolution*)
sym = 8; (*Directions of symmetry*)
v = 2*Pi*(Sin[i*2*Pi]*x + Cos[i*2*Pi]*y);
Sinu = Cos[v];
P = N[Sum[Sinu, {i, 0, (sym - 1)/sym, 1/sym}]]
MatrixPlot[ Table[P, {x, xmin, xmax, (xmax - xmin)/rez}, {y, ymin, ymax, (ymax - ymin)/rez}]]
It works like a charm for even numbers of symmetry (change the 'sym' variable to play around with different fold symmetries), but for odd numbers of 'sym' it generates patterns with 2*sym-fold symmetry. I've tried everything, like using Exp[i*v] instead of Cos[v], varying the phase between each of the component waves, and even using Sinu=Cos[v]*UnitStep[v] to stop from getting 'extra' interference, but none of them gives me the correct result for odd numbers :( Help!?