//=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* // Program mandel //=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* #include "complex.h" #include "nxgraph.h" //---- graphics setting const int WIN_WIDTH = 256; const int WIN_HEIGHT = 256; //---- experimental setting const int N_MAX = 256; const Complex Ao( -0.5, 0.0 ); const double Mag = 1.0/128.0; //---- Calculate the recurrence formula int CalcMandel( const Complex& A ) { int n; Complex Z( 0.0, 0.0 ); for( n=0; norm(Z)<4.0 && n= 32 ){ NXSetColor( pixels[63-n%64] ); }else{ NXSetColor( pixels[n%64] ); } NXDrawPoint( ax, ay ); } } NXPause(); NXCloseWindow(); return 0; }