Image:
Author: FRA32 Group: Technical Filesize: 335.2 kB Date added: 2016-01-10 Rating: 6.3 Downloads: 1742 Views: 509 Comments: 10 Ratings: 4 Times favored: 0 Made with: Algodoo v2.1.0 Tags:
|
An alternate version of my first Prime spotter, this scene spots primes and aligns them in the shape of an archimedic spiral(spiral which has it's radius increased by a linear value every rotation). The special property of this spiral is that it may be archimedic(or linear), but the numbers on it are squared, so every turn it reaches another square number(i.e. 1 turn = 1, 2 turns = 4, 3 turns = 9 and so on, BUT 1 turn = radius 1, 2 turns = radius 2, 3 turns = radius 3). Spotting primes on this spiral also yields a pattern that is less random than primes may appear on first glance, but still are not regular enough to be formulated in an uniform algorythm. There are algorythms that can spot a series of primes, but these only apply to a limited number range or are not garuanteed to yield primes, for example x^2 + 3x + 1 alias (x+1.5)^2-1.25
Legend:
The tracer marks the current location of the spotter as it progresses through the numbers. It will move at a constant speed, and calculate the next prime number while it moves. Should a prime number still be calculated while the spotter has already reached it, it pauses for a short while until it is done with calculating.
Green circles resemble non-prime square numbers. They are the ones the Spiral is mapped after, and are in the center of a wide prime-less area.
Red circles are the primes spotted by the algorythm.
Clicking on any circle results in it's number value to be displayed on a small box that's near the bottom right of your screen(depends on monitor size)
To increase the speed, 24 spotters are used simultaneously, each scanning a certain number range before vanishing.
UPDATE: Fixed a major calculation error that caused the code to output more primes than there actually exist. |