This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

wjm
wjm presents ...

2008/8/10

Ulam

Please download Ulam_1_02_full source
code so that you can use Actors to do
a lot of extra stuff.

2564 views / 519 in the last 7 days

Tags: demo with-source

open in greenfoot
Your browser is ignoring the <APPLET> tag.
HTML5 version not available | Scenario not running?
davmacdavmac

2008/8/12

That looks interesting. Can you explain a little about the pattern it generates? (I know the source is available, it would be nice to have a little explanation here though).
wjmwjm

2008/8/12

Thanks for taking a look. The pattern is made up of natural (1+ integers) numbers that are 'wrapped' in a square-like spiral like this: 5 4 3 6 1 2 7 8 9 10 In the image, each non-prime is a white pixel and each prime is a dark (gray) pixel. There is a concentration of primes along certain diagonals (and a few horizontal and vertical) lines. This surprises most people upon first viewing (there is actually a very simple reason for it). Try downloading the full scenario and you will be able to have more control over your patterns (called Ulam spirals after their discover. See http://en.wikipedia.org/wiki/Stanislaw_Marcin_Ulam).
davmacdavmac

2008/8/13

Ah yes, I understand. Thanks!

Want to leave a comment? You must first log in.

Who likes this?

No votes yet.