| | |
Mandelbrot conversion, Java to c#
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2009
Posts: 13
Reputation:
Solved Threads: 0
Hi guys,
I am working on a conversion of the Mandelbrot Fractal from Java to C# and my programming skills are lacking quite a bit. I am desperately trying to improve but I have come across some errors that are stumping me. I have attached a txt file with the code I have so far and below is the segment of code I am getting errors with.
If anyone can offer me some advice on how to resolve some of these issues that would be great. I know there are quite a few, but if anyone can give me some tips on the best way of tackling a conversion like this or point me in the direction to resolving this, then I would really appreciate it. Thnks a lot for your time and help.
regards
I am working on a conversion of the Mandelbrot Fractal from Java to C# and my programming skills are lacking quite a bit. I am desperately trying to improve but I have come across some errors that are stumping me. I have attached a txt file with the code I have so far and below is the segment of code I am getting errors with.
C# Syntax (Toggle Plain Text)
private void mandelbrot() // calculate all points { int x, y; float h, b, alt = 0.0f; action = false; setCursor(c1);} public function setCursor; float System.WriteLine("Mandelbrot-Set will be produced - please wait..."); //float showStatus("Mandelbrot-Set will be produced - please wait..."); for (int x = 0; x < x1; x += 2) for (int y = 0; y < y1; y++) { h = pointcolour(xstart + xzoom * (double)x, ystart + yzoom * (double)y); // color value if (h != alt) { b = 1.0f - h * h; // brightnes ///djm added ///HSBcol.fromHSB(h,0.8f,b); //convert hsb to rgb then make a Java Color ///Color col = new Color(0,HSBcol.rChan,HSBcol.gChan,HSBcol.bChan); ///g1.setColor(col); //djm end //djm added to convert to RGB from HSB g1.setColor(Color.getHSBColor(h, 0.8f, b)); //djm test Color col = Color.getHSBColor(h, 0.8f, b); int red = col.getRed(); int green = col.getGreen(); int blue = col.getBlue(); //djm alt = h; } g1.drawLine(x, y, x + 1, y); } showStatus("Mandelbrot-Set ready - please select zoom area with pressed mouse."); setCursor(c2); action = true; }
If anyone can offer me some advice on how to resolve some of these issues that would be great. I know there are quite a few, but if anyone can give me some tips on the best way of tackling a conversion like this or point me in the direction to resolving this, then I would really appreciate it. Thnks a lot for your time and help.
regards
0
#2 19 Days Ago
Click on this thread (a collegue of you?) http://www.daniweb.com/forums/thread236306.html
to find out more. Good luck!
to find out more. Good luck!
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Make love, no war. Cave ab homine unius libri.
Danny
![]() |
Similar Threads
- Game Engine (Game Development)
- Can anyone help me with adding 2 polynomials together? (C++)
- New to Java Programming (Java)
- How do I convert a vector to a String array ? (Java)
- code conversion from c\c++ to java (C++)
- Java to C# Conversion (C#)
Other Threads in the C# Forum
- Previous Thread: need help
- Next Thread: Compile C# .Net code behind file to a dll
| Thread Tools | Search this Thread |
algorithm angle array bitmap c# c++ conversion cuil decimal degrees development drawing enum equation form function gdi+ google javascript mandelbrot math mathematics method news numbers operator picturebox plotting polynomial prime primenumbersinrange radians recursive round search statistics technology time usb vb vbnet web wolframalpha







