im running this for-loops with the following methods:
for (h=0; h < HEIGHT; h++){ for (w=0; w < WIDTH; w++){ y = yUpperLeft - (h * xStep); x = xUpperLeft + (w * yStep); im = yUpperLeft - (y*yStep); re = xUpperLeft + (x* xStep); Complex c = new Complex(re, im); pD = pixelDiverges(c,ITERATIONS); Color myColor; myColor = new Color(pD,pD,pD); pic.setColor((int)x,(int)y,myColor);
11/27/2005 5:17:11 PM
manually set x and y
11/27/2005 5:48:59 PM
YAY 4 DEBUGGING
11/27/2005 6:05:18 PM
actually setting any pixel (x and y) colors it the right color. The loops won't run through the size of the picture coloring each one.
11/27/2005 6:08:46 PM
Tip:Java sucks.
11/28/2005 1:30:10 AM
^
11/28/2005 9:27:31 AM
^^
11/28/2005 10:28:37 AM
^^^
11/28/2005 11:56:12 AM
^, ^^, ^^^, ^^^^: did not make A+s in CSC116
11/28/2005 9:33:14 PM
^ did too
11/28/2005 10:31:59 PM
Yeah, I did.And then I got an internship in the real world, where java is fucking pointless.
11/29/2005 1:59:19 PM
heh, sophomore in csc still thinks he's the shit
11/30/2005 2:47:04 AM
Novicane, did you ever solve your problem? Don't want this thread to turn into another Java/C++/Pick a Language sucks because XXXX thread.
11/30/2005 5:44:29 AM
yespretty much I switched my HEIGHT and WIDTH loops around, and my y and x conversion was tremendously off. I then realized that x and y ARE the real and imaginary numbers needed to determine if its part of the mandlebrot set.something like this is what I needed:
for (w= 0; w < WIDTH; w++) { for (h= 0; h < HEIGHT; h++) { x = xUpperLeft + w * xStep; y = yUpperLeft + height - (h * yStep); Complex c = new Complex(x, y); pD = pixelDiverges(c,ITERATIONS); Color myColor; myColor = new Color(pD,pD,pD); pic.setColor((int)x,(int)y,myColor); } } pic.show();
11/30/2005 9:12:33 AM
11/30/2005 10:24:53 AM
time line:cave man creates fire -> FORTRAN -> wheel is invented -> present day
11/30/2005 11:59:06 AM
hahayou have to really try to not make an A in FORTRAN
11/30/2005 12:04:43 PM
11/30/2005 12:43:10 PM