Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2008-08-28 16:35:08

myka-x
Member
Registered: 2008-08-27
Posts: 3

Intersting patterns emerge

OK, so this is the place to post our discoveries. Well I have discovered some interesting patterns in numbers that I do not truly understand. I was hoping that the more experienced here can shed some light on what I am doing.

First of all I am working with plotting coordinates on a grid to form a pixel image. I use two methods to iterate through the pixel grid:

1. For a 500x500px image iterate 1-500y for each x
2. Using an ulam spiral algorithm starting from the middle of the image and spiraling outward

I wrote an algorithm that iterates through the grid and tests each point with an equation. So for example I use this equation:

(round((cos($i*$y))*(sin($i*$x))*$i)%2==0)

Where $x,$y are the point coordinates of the image, $i is a multiplier (for example, looping from 22.000 to 23.000 incrementing by .005). Using 22.04 I get this image:
cosSin3-22.04000.png

Using 23.005 I get this:
cosSin3-23.00500.png

There are more. In fact it seems that the higher the multiplier in the sequence the more detail is reveled. I have one pattern of squares that seems quite like a fractal in that the same pattern is found to make up a larger pattern of the same. It is wonderful!

Please visit my blog for more: http://myka-x.blogspot.com/

Does any of this look familiar? I would love to understand this phenomena better and hopefully generate even more beautiful images. Any help is appreciated.

Thanks,
~David

Offline

Board footer

Powered by FluxBB