I have the following script which utilizes the OpenGL library. If I make the sketch 1000 by 1000 pixels, everything works fine. If I make the sketch 3000 by 3000 pixels or larger, I get a black background and nothing else. Is this an OpenGL problem? Without OpenGL, I can produce an image at 10000 by 10000 pixels (any bigger and the applet crashes), but that takes hours to render...
Much thanks for any help...I'm still very much a newbie
Code:
import processing.opengl.*;
size(1000, 1000); //Ultimately, I want this to be 12000 x 12000 so I can make a 40" square print at 300dpi
background(255);
colorMode(RGB, 255);
PImage d = loadImage("DSC_0013.JPG"); //pretty big image...3008 x 2000 pixels, 752kb
int cR, cG, cB;
for(int i=0; i<d.width*d.height; i+=75){
int n=2;
cR = (d.pixels[i] >> 16) & 0x000000ff;
cG = (d.pixels[i] >> 8) & 0x000000ff;
cB = d.pixels[i] & 0x000000ff;
int x1 = width/2;
int y1 = int(height/2-(cR*n));
int x2 = int(width/2-(cG*n)*cos(PI/6));
int y2 = int(height/2+(cG*n)*sin(PI/6));
int x3 = int(width/2+(cB*n)*cos(PI/6));
int y3 = int(height/2+(cB*n)*sin(PI/6));
stroke(cR,cG,cB,50);
noFill();
smooth();
triangle(x1,y1,x2,y2,x3,y3);
}
save("test2.tiff");