using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ApfelmannNoGraphics { class Program { static int count = 0; static void Main(string[] args) { Console.WriteLine("1000x NKC Apfelmann"); for (int i = 0; i < 1000; i++) { doApfelmannFloat(); Console.WriteLine(i); //um den code optimizer zu ueberlisten } Console.WriteLine(count); } static void doApfelmannFloat() { const int radius = 16 * 1000 * 10; const double pmin = -2.25; const double pmax = 0.75; const double qmin = -1.5; const double qmax = 1.5; const int anzahl = 100; double pdiff = pmax - pmin; double qdiff = qmax - qmin; double xneu, yneu; double p, q, x, y; double xsq, ysq; int k; //GDP_CLS(); for (int xkoor=0; xkoor < 511; xkoor++ ) { for (int ykoor=0; ykoor < 255; ykoor++) { p = pdiff*xkoor/511+pmin; q = qdiff*ykoor/255+qmin; x = 0; y = 0; k = 0; do { xneu = x*x-y*y + p; yneu = 2*x*y + q; k++; x = xneu; y = yneu; } while (((x*x+y*y) < radius) && (k < anzahl)); if ((k % 2) == 1) { count++; //um den code optimizer zu ueberlisten //GDP_MOVETO(xkoor, ykoor); //GDP_CMD(0xFFFFFF70, 0b10100000); } } } } } }