Ejemplo n.º 1
0
inline Color32 coloring10B1(const double iter,long i,const long max_iter,double* xList,double* yList,const Colorf& errorColorIn,Colorf& errorColorOut){
    Colorf color=errorColorIn;
    if (iter==max_iter){
        const double x=xList[max_iter];
        const double y=yList[max_iter];
        double z=sqrt(x*x+y*y);
        color.addColor(Colorf(sinColorf(z*20*50-236),sinColorf(z*15*50+221),sinColorf(z*30*50-254)));
    }else{ 
        const double x=smoothXY10B(iter,i,xList);
        const double y=smoothXY10B(iter,i,yList);
        double z=sqrt(x*x+y*y);
        color.addColor(Colorf(sinColorf(x*20*2-236),sinColorf(y*15*2+221),sinColorf((x*y/sqrt(z))*30*2-254)));
    }
    Color32 resultColor=color.toColor32();
    errorColorOut=color;
    errorColorOut.subColor(resultColor);
    return resultColor;
}
Ejemplo n.º 2
0
inline Color32 coloring9_s(const double iter,long i,const long max_iter,double* xList,double* yList,const Colorf& errorColorIn,Colorf& errorColorOut){
    Colorf color=errorColorIn;
    if (iter==max_iter){
        const double x=xList[max_iter];
        const double y=yList[max_iter];
        double z=sqrt(x*x+y*y);
        double zd=z-sqrt(xList[max_iter-1]*xList[max_iter-1]+yList[max_iter-1]*yList[max_iter-1]);
        color.addColor(Colorf(sinColorf(z*2000),sinColorf(y*x*1000),sinColorf(zd*1000)));
    }else{ 
        const double x=xList[i];
        const double y=yList[i];
        double z=sqrt(x*x+y*y);
        color.addColor(Colorf(sinColorf(z*20/20-236),sinColorf(z*15/20+221),sinColorf(z*30/20-254)));
    }
    Color32 resultColor=color.toColor32();
    errorColorOut=color;
    errorColorOut.subColor(resultColor);
    return resultColor;
}