plot = point2d((0,0)) for k in primes_first_n(500): r = sqrt(k) theta = sqrt(k) * 2*pi plot += point2d((r * cos(theta), r * sin(theta))) plot