# Discussion

• It would help if you explained how you generated those pictures.

• It's the Laue pattern of Rubisco!! http://www.amazon.com/Photo...

• Holy crap, I've been wondering about that picture for years! I knew it was a Laue pattern, but I never knew what molecule it was of, or who took it.

The resemblance between Gibney's picture and a Laue pattern is no coincidence. If you shine light of a fixed wavelength on a cubic lattice, the resulting diffraction pattern is (I think) basically a projection of the dual lattice (distorted by the shape of the screen you're projecting the diffraction pattern onto). And if you project a 3D lattice onto a 2D plane, you get a picture like the one described in the PDF linked from my big long comment---which is equivalent to Gibney's picture.

The story I just told isn't totally accurate, and I'd love to work out the details someday. If you know stuff about X-ray diffraction, and you want to help fill in the gaps, let me know! :)

• this is interesting. I'm getting a similar pattern, but it's not as detailed as the one you shared.

I have it running in 6 threads, and it takes about half an hour to render a 4000x4000 image.

Edit: I changed some constants around, and now it produces something even more similar, but still lacking the solid areas that appear at some intersections. http://imgur.com/nPvwt . With these settings it rendered 2000x2000 pixels in 7 seconds (i'm only rendering one quadrant).

• Can you put your algorithm ?

• This is my take : http://imgur.com/SXGPb
Edit: And a generalization to any gaussian integer (g = g1+ig2) : http://imgur.com/qD0aZ
This looks more and more like a fractal.

• Interesting, you also have the solid areas. How did you implement it? The generalitation is cool! Yes, it looks more fractal like. Lets explore this further. I will compute the generalization in my environment and see how it looks there.

• It is basically your algorithm. I used (caml's) 64 bit integers and double precision arithmic (64 bit floats).
For the first image: I add up how close g/c is from an integer.
For the second image: I add 1 every time I get epsilon close to a gaussian integer (epsilon = 0.1). However I could only test for small g1 and g2 (less than 16) for the nice example.

• Thats awesome! One theory about the solid areas is that they are floating point rounding errors. So it could be that your rendering is showing the real thing! I wrote my code in Javascript, so the numbers are 64bit floating points. In which language/environment did you wrote yours? Its interesting, that you dont have solid areas at all.

• Hey, very nice picture you got there :)

I guess you applied some gamma correction to get the final image ? I followed your description and produced this: http://pastebin.com/UdtHHtfj which results in this figure:

The imgur link is for a 2000x2000, since I didn't want to wait for the 4000x4000 to finish.

• Yes, thats it! Wow, its awesome to see that somebody was able to reproduce it from my somewhat fuzzy description! For the small version of the first image I indeed applied gamma correction. All other images just use linear scaling between the percentage and the color.

Since you implemented it in C, would it be easy to change from double to some more precise number type? Im curious if those squares are rounding errors that go away when using more digits.

My implementation is in Javascript and afaik there is no easy way to use a more precise number type.

• Is your definition of gaussian integers the subset of complex numbers {m+ni | m,n \in Z} because you seem to be restricting to the subset where m=n.
Anyway, the fraction of a gaussian integer g=m+ni with a complex c=x+yi is a gaussian integer iff there is a gaussian integer g'=k+li s.t. g'c = g , i.e. iff there are integers k,l s.t. k*x - l*y = m and k*y + x*l = n .
After solving, this is equivalento the requirement that the expressions k=(mx+ny)/|c|^2 and l=(nx-my)/|c|^2 are integers.
So rephrasing the question: For a given c, if I "marginalize" over the integers m,n what is the expectation value of k and l being integer?
I would expect this function to peak on rational values of x and y, but I'm curious to look for an exact derivation.
This really brings to mind rotated geodesics on the hyperbolic plane so I'm thinking conformal stuff (see the right angles). Try a few simple conformal transformations and see how it looks. I don't think it's about fractals though..

• Yes, I restrict the gaussian integers to the subset where m=n. Im not sure how to explain that in a non-mathematical way so I used the examples of 1+1i, 2+2i, 3+3i...

• flower of life? :D

• What scaling between percentage and color are you using? I have a parallelized Haskell implementation that can generate this in a mater of seconds, but can't get it to quite look the same.

• I used linear scaling for all images except for the small version of the first one. On that one I applied some gamma corrction to make the structures more visible.

• I recognize this fractal! The "un-inverted" version turns out to be essentially the same as a geometric figure I stumbled across a few years ago. You can find a picture and a short explanation at http://www.ma.utexas.edu/us... ; the explanation isn't very polished, but hopefully it's at least readable. The picture in the PDF corresponds to the large diamond that touches the corners of Gibney's picture, rotated 45 degrees.

It's not immediately obvious that my picture is equivalent to Gibney's, so I'll lay it out step by step.

========

If I understand correctly, this is how you make Gibney's original "inverted" picture:

For every complex number c, darken the pixel containing c by one shade for each integer n from 1 to 100 that makes n(1 + i)/c a Gaussian integer.

You make the "un-inverted" picture by darkening the pixel containing 1/c instead of the pixel containing c:

For every complex number c, darken the pixel containing 1/c by one shade for each integer n from 1 to 100 that makes n(1 + i)/c a Gaussian integer.

Here's a slightly different way to describe the same procedure:

For every complex number c, every integer n from 1 to 100, and every Gaussian integer a that satisfy the equation n(1 + i)/c = a, darken the pixel containing 1/c by one shade.

Once we choose n and a, the only way to satisfy the equation n(1 + i)/c = a is to have 1/c = 1/(1+i) * a/n, so we can describe the same procedure in yet another way:

For every integer n from 1 to 100 and every Gaussian integer a, darken the pixel containing 1/(1+i) * a/n by one shade.

If we didn't have to worry about the resolution of the computer screen, we could forget about pixels, and just say:

For every integer n from 1 to 100 and every Gaussian integer a, draw a dot at 1/(1+i) * a/n.

If you remove the factor of 1/(1 + i), this is exactly how I make my picture. The factor of 1/(1 + i) just scales and rotates Gibney's picture relative to mine.

========

The PDF I linked contains what I think is a pretty good explanation of why Gibney's picture looks the way it does, but I'm pretty sure there's more to say. I've always wanted to go back and work out the rest of the story, but I never found the time. Maybe now that a bunch of people are interested, we can learn more by working together! :)

see more
• please check out Ulam spiral.

• I'd love to see that plotted in 3D! Is it even possible ..?

• Yes, me too! I first did something similar in 1d with real numbers. That was interesting but not visually pleasing. Then transformed it to complex numbers and got this. I know there are hypercomplex numbers that might be suitable for this. One would have to code up a raymarcher or something for the visualization though. So it would be some work.

• its called metatrons cube!

• It's really nice that you were able to add some information and topics in mathematics while attaining this kind of result. It's actually one of the most interesting thing that many people really desired to learn on what kind of process did you do.

• Is there anyway I could get source that generates these and renders them to pictures?

• If you look carefully it's a set of circles. I would say it is a composition of IFS and circles.

• i've seen similar patterns by plotting complex roots of all polynomials that are permutations of a few certain coefficients (e.g. only using coefficients of -1 and 1 you get a pseudo-fractal toroid shape with tons of strange vortices, see video:

) . I'm not very well versed in math but I've heard people say that an explanation lies in galois theory.

• invert a sierpinski carpet (square analog of sierpinski gasket) with some trivial decoration in the projective plane. boom. done.

• Probably more related to NKS http://www.wolframscience.c... than to fractals but beautiful nonetheless.

The discussion is closed now