def superset(j,x,y,itr,sSym=False): '''Superset Fractal Calculator. /Expensive./ j = size of julia sets to be calculated. x,y = final size of image itr = number of iterations to run for. sSym = if fractal is symmetrical beneath 0i, setting this to true cuts the ----rendering time in half. Note, if fractal is assymetrical, will cause ----innacurate results. If fractal has rotal symetry in a power of 2, set to ----2. Due to fundamental limitations in the current implementation, ----odd-n rotal symmetry cannot be rendered properly. ''' field.updateMulti(resX=x,resY=y,magnitude=1) #Julia Coords for inverse supersets. cX,cY = 0,0#-.783091,-.149219#.296906,.502234 final = [] formSet = 1 mSet = True for rows in range(y): for points in range(x): output = calculate(formSet,2,itr,mSet,complex(plane.posX,plane.posY) ,complex(cX,cY),0,j,j) rgb = [0,0,0] field.posX += field.fundamentalStep #Accumulate the pixels in output into a single-pixel list for vals in range(len(output)): rgb[vals%3] += output[vals] #Add to final a pixel which is the average of all pixels in output final += [int(rgb[i]/(len(output)/3)) for i in range(len(rgb))] #Satisfy idle curiosity if rows%15 == 1: print('Render is',str(round((rows/y)*(2 if sSym else 1) *100, 3))+'% done.') field.posY += field.fundamentalStep field.posX = field.reset[0] if sSym and field.posY > 0: final += symmetry(final,0,rows,y,x) break print("Render complete.") toPPX(3,True,final,x,y,fname='Renders/c('+str(cX)+','+str(cY)+') at '+str(j) +' ['+tBaseN(randint(0,1230942345))+']')
def run(x,y, fSet): output = calculate(fSet,2,80,0,(0j),(0+0j),False,x,y,"Q",lambda c:c) print("Render Complete. Writing to file...") toPPX(3,True,output,x,y,fname = 'Renders/render') print("Done.")