@@ -0,0 +1,1439 @@
+import cmath;%0Aimport numpy;%0Aimport time;%0A%0Aclass JuliaSet(object):%0A  %0A    def __init__(self, c, n=100, _d=0.001):%0A        self.c=c;%0A        self.set=numpy.array(%5B%5D);%0A        self._d=_d;%0A        if(n%3E0):%0A            self.n=n;%0A        else:%0A            print %22Reset n to 100%22;%0A        self._complexplane = numpy.array(%5B%5D);%0A        %0A        %0A    def juliamap(self, z):%0A        return self.c+(z**2);%0A    %0A    %0A    def iterate(self, z):%0A        m=0;%0A        while(1%3E0):%0A            z=self.juliamap(z);%0A            m+=1;%0A            if(abs(z)%3E2):%0A                return m;%0A            elif(m%3E=self.n):%0A                return 0;%0A            %0A            %0A        %0A    def setcomplexplane(self, d=0):%0A        i =-2;%0A        if(d==self._d and len(self._complexplane)%3E1):%0A            return;%0A%0A        if(d%3E0):%0A            self._d=d;%0A            increment = d;%0A        else:%0A            increment = self._d;%0A        start = time.time();%0A        time.clock();%0A        elapsed = 0%0A        arr = numpy.arange(-2,2,increment);%0A        elapsed = time.time() - start;%0A        q = numpy.ones(len(arr));%0A        w = numpy.array(%5B%5D);%0A        for s in arr:%0A            g=q*s;%0A            w= numpy.append(w,g+(g*1j));   %0A        self._complexplane =w;%0A%0A            %0A    def set_spacing(self, d):%0A        self.setcomplexplane(d);%0A%0A    def generate(self):%0A        f =numpy.vectorize(self.iterate);%0A        self.set =f(self._complexplane);%0A        return self.set;%0A

add new juliaset.py