Python 2.x, 220C 213C 207C 204C 201C 198C 196C 188C
Special thanks to gnibbler for some hints in #stackoverflow
on Freenode. Output includes a leading and trailing newline.
import math
v=input()*2
w=v-1
a=['\n']*w*v
p=w*v/2
for c in range(1,w*w):a[p]=' *'[(c>1)*all(c%d for d in range(2,c))];x=int(math.sqrt(c-1));p+=(-1)**x*((x*x
(Python 3 compatibility would require extra chars; this uses input, the print statement and /
for integer division.)