private void drawAufgabeFromDot(object sender, MouseEventArgs e) { float iX, iY; string strIFS = ""; iX = (e.X * (_coord.MaxX - _coord.MinX)) / (float)ImageWidth + _coord.MinX; iY = (e.Y * (_coord.MaxY - _coord.MinY)) / (float)ImageHeight + _coord.MinY; // IFS laden switch (iKlicks) { case 0: strIFS = "Farn_1.IFS"; break; case 1: strIFS = "Bigbang.IFS"; break; case 2: strIFS = "Filmstreifen.IFS"; break; case 3: strIFS = "Strauch.IFS"; break; case 4: strIFS = "Swirl.IFS"; break; case 5: strIFS = "Wirbel_blatt.IFS"; break; default: strIFS = "Farn_1.IFS"; iKlicks = 0; break; } iKlicks++; _ifs = GLabReader.ReadIfsFromFile("..\\..\\IFS2\\" + strIFS); Logger.Instance.LogInfo("IFS:\t" + strIFS); readIfsProbabilities(); // Create a new raster image for drawing _image = new Image <Rgb, byte>(MAX_COORDINATE, MAX_COORDINATE, new Rgb(Color.Black)); // Painter initialisieren mit neuem Koordinatensystem _coord = new CoordinateSystem(_ifs.CoordinateSystem.MinX, _ifs.CoordinateSystem.MaxX, _ifs.CoordinateSystem.MinY, _ifs.CoordinateSystem.MaxY); _painter = new Painter(ref _image, _coord); _frame.SetImage(_image); _painter.PaintCoordinateSystem(16, Color.Red); // Punkt zeichnen Aufgabe(new Vector3(iX, iY, 1)); }
private void drawAufgabeFromDot(object sender, MouseEventArgs e) { float iX, iY; string strIFS = ""; iX = (e.X * (_coord.MaxX - _coord.MinX)) / (float)ImageWidth + _coord.MinX; iY = (e.Y * (_coord.MaxY - _coord.MinY)) / (float)ImageHeight + _coord.MinY; // IFS laden switch (iKlicks) { default: strIFS = "IFS_TEST_Invers.IFS"; iKlicks = 0; break; } iKlicks++; _ifs = GLabReader.ReadIfsFromFile("..\\..\\IFS5\\" + strIFS); //test = Microsoft.Xna.Framework.Matrix.Invert(_ifs[0]); //test = Microsoft.Xna.Framework.Matrix.Invert(_ifs[1]); //test = Microsoft.Xna.Framework.Matrix.Invert(_ifs[2]); Logger.Instance.LogInfo("IFS:\t" + strIFS); //readIfsProbabilities(); // Create a new raster image for drawing _image = new Image <Rgb, byte>(ImageWidth, ImageHeight, new Rgb(Color.White)); // Painter initialisieren mit neuem Koordinatensystem _coord = new CoordinateSystem(_ifs.CoordinateSystem.MinX, _ifs.CoordinateSystem.MaxX, _ifs.CoordinateSystem.MinY, _ifs.CoordinateSystem.MaxY); _painter = new Painter(ref _image, _coord); _frame.SetImage(_image); _painter.PaintCoordinateSystem(16, Color.Red); // Punkt zeichnen Aufgabe(); }
private void drawAufgabeFromDot(object sender, MouseEventArgs e) { float iX, iY; string strIFS = ""; iX = (e.X * (_coord.MaxX - _coord.MinX)) / (float)ImageWidth + _coord.MinX; iY = (e.Y * (_coord.MaxY - _coord.MinY)) / (float)ImageHeight + _coord.MinY; // IFS laden switch (iKlicks) { case 0: strIFS = "Sierpinski.IFS"; break; case 1: strIFS = "Drachenflaeche_4.IFS"; break; case 2: strIFS = "Duerer_5_eck.IFS"; break; case 3: strIFS = "Farn_1.IFS"; break; case 4: strIFS = "Kristall_1.IFS"; break; case 5: strIFS = "Menger_teppich.IFS"; break; case 6: strIFS = "Sierp_verwandter_1.IFS"; break; default: strIFS = "Sierpinski.IFS"; iKlicks = 0; break; } iKlicks++; _ifs = GLabReader.ReadIfsFromFile("..\\..\\IFS\\" + strIFS); Logger.Instance.LogInfo("IFS:\t" + strIFS); // Create a new raster image for drawing _image = new Image <Rgb, byte>(MAX_COORDINATE, MAX_COORDINATE, new Rgb(Color.Black)); // Painter initialisieren mit neuem Koordinatensystem _coord = new CoordinateSystem(_ifs.CoordinateSystem.MinX, _ifs.CoordinateSystem.MaxX, _ifs.CoordinateSystem.MinY, _ifs.CoordinateSystem.MaxY); _painter = new Painter(ref _image, _coord); _frame.SetImage(_image); _painter.PaintCoordinateSystem(16, Color.Red); // Punkt zeichnen Aufgabe(new Vector3(iX, iY, 1)); }