Suffolk County Math Tournament in 3 days
Fri January 9, 2009
Fri January 9, 2009
PUMaC in 25 days
Sat January 31, 2009
Sat January 31, 2009
AMC 12A in 35 days
Tue February 10, 2009
Tue February 10, 2009
HMMT in 46 days
Sat February 21, 2009
Sat February 21, 2009
World Math Day in 57 days
Wed March 4, 2009
Wed March 4, 2009
AIME I in 83 days
Mon March 30, 2009
Mon March 30, 2009
PLUS! magazine deadline in 84 days
Tue March 31, 2009
Tue March 31, 2009
USAMO in 112 days
Tue April 28, 2009
Tue April 28, 2009
ARML in 143 days
Fri May 29, 2009
Fri May 29, 2009
21st Birthday in 614 days
Sun September 12, 2010
Sun September 12, 2010
Turning 40 in 7554 days
Wed September 12, 2029
Wed September 12, 2029


Look at it and tell me what do you think:
















Interesting
Cool stuff, I like it :) I find it is weird that it takes 8.5 seconds though. To generate a 200x200 number spiral, using the original python code for the number spiral, takes roughly 200ms on my computer, and generating all the primes from 0 to 200^2 takes roughly 12ms, so one would think that the entire spiral generation could occur in under 1/4th of a second. Obviously there is overhead in the image generation, but 8.25 seconds seems a bit much. I haven't tried this in php, but I can't imagine the language choice being that large of a factor in the speed difference. It's just weird that the time is so high, any thoughts on why?
In my script, the pointer is
In my script, the pointer is in the beginning of the map and run to each point, calculate the number for that point, and compare with the prime list, then go to next point.
But since you are using the same algorithm, I can only conclude PHP is very slow since it is a script language.
I'm working on a algorithm so the pointer starts from the center and spiral out, also jump over numbers when it can, I might finish it tomorrow. :)
Post new comment