help me convert Processing code to C# -


I am trying to convert this code from Java to C # (located)

my Has some WinForm experience but there is not much to do with pixel drawing on a Winform applications.

I think I can convert most of the sub methods, I feel quite confident. I will just dump the ambiguous pixels on the screen

Any help or device to be changed from Java to C # will be very recognizable

  // Buddhabrot // J.tarbell January, 2004 // Albuquerque, New Mexico // Complexes. // Based on the code given by Paul Bourke // Astronomy / Processing 0085 Beta Syntax Update // JTirble April, 2005 Intel Dim = 800; // Screen Dimensions (Square Window) Int Belout = 200; Number of iterations before collateral // IT plot = 10000; // Exposure Values ​​[] Exposure = New Int (slow * dim) Plate number to take per frame (x30 = Plot per second) / 2D array to execute; Intex Exposures; // Maximum Exposure Value Time = 0; Int exposure = 0; Boolean drawing; PFont metaBold; //  Main ----------------------------------------------- ----------------- zero setup () {// set up area size (800,800, P3); Background (0); // Take it nice and easy framerate (15); // Load Typeface Metabold = Load Font ("Aerial-48.vlw"); } Zero draw () {plotplots (); Time ++; If (time% 30 == 0) {// show progress every 2 seconds or so ... findMaxExposure (); Renderbrot (); // show Exposure value full (255); NoStroke (); TextFont (Metabold, 14); Text ("bailout:" + bailout + "exposure:" + exposure, 5, dim-6); }} Zero plotplate () {float x, y; // Repeat through some plots (for int n = 0; n & a; plot; n ++). // Choose a random point in the same range X = Random (-2.0.1.0); Y = Random (-1.5,1.5); If (repeat (x, y, false)) {repetition (x, y, true); Risk ++; }}}} Renderbrot for zero () {// draw for screen (int i = 0; i  1) {ramp = 1; } Color C = Color (int (ramp * 255), int (ramp * 255), int (ramp * 255)); Set (j, i, c); }}} // Return the Mandelbrot again and if TRUE then the point goes out // Also handle the exit point of the bullion iteration (float x 0, float y0, boolean drawty) {float x = 0 ; Float y = 0; Float XN, UNU; Int ix, iy; For (int i = 0; i & lt; bailout; i ++) {xnew = x * x - y * y + x0; Ynew = 2 * x * y + y0; If (draw it & amp; (i & gt; 3)) {ix = int (dim * (xnew + 2.0) / 3.0); Iy = int (dim * (ynew + 1.5) / 3.0); If (ix> = 0 & amp; amp; iy & gt; = 0 & amp; amp; amp; amp; ix & lt; dim & amp; amp; amp; amp;;; & lt; dim ) {// Rotate and highlight point exposure [ix * dim + iy] ++; }} If ((xnew * xnew + ynew * ynew)> 4) {// escape return true; } X = xnew; Y = ynew; } // does not escape refund; } Zero millimeter exposure () {// no risk maximum exposure = 0; // Maximum density value (int i = 0; i  

here is one Similar questions :.

This is one.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -