Skip to main content
2 of 2
replaced http://stackoverflow.com/ with https://stackoverflow.com/

Python - 203 Characters

Similar to my answer here:

x=input();y=x-1;w=x+y
A=[];R=range;k,j,s,t=R(4)
for i in R(2,w*w): 
 A+=[(x,y)]*all(i%d for d in R(2,i))
 if i==s:j,k=k,-j;s,t=s+t/2,t+1
 x+=j;y+=k
for y in R(w):print"".join(" ."[(x,y)in A]for x in R(w))
gnibbler
  • 15.2k
  • 4
  • 49
  • 75