GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


New Paste :: Recent Pastes:: Add Line Numbers


A Paste by Anonymous
int PixelIteration(float x, float y,CComplex& Zn, int depth)
{
    if (depth>50)
    {
        if (Zn.Magnitude()>=2)
            return depth;
        else
            return 0;
    }
    CComplex Zn1(x,y);
    Zn.Sqr();

    Zn1=Zn1-Zn;

    if (Zn1.Magnitude()>=2)
        return depth;
    else
        return PixelIteration(x,y,Zn1,depth+1);
}