sgsrules wrote on Mar 26th, 2008, 9:44pm:that'll fix the translations but the coordinate space is still inverted. screw it, i'll just get used to it.
I probably misunderstood what you're after, but once you invert the y scale coordinates will appear inverted, subsequent transforms are inverted, etc. Try the following example with/without the call to scale(), isn't that what you want
Quote:
import processing.opengl.*;
void setup() {
size(400,400,OPENGL);
}
void draw() {
background(0);
translate(width/2f, height/2f, 0f); // put 0,0 at screen center
scale(1,-1,1); // flip y axis
// draw positive axes saturated
stroke(255,0,0);
line(0,0,0, 100,0,0); // +x red
stroke(0,255,0);
line(0,0,0, 0,100,0); // +y green (points UP when inverted)
// draw negative axes desaturated
stroke(192,128,128);
line(0,0,0, -100,0,0); // -x pink
stroke(128,192,128);
line(0,0,0, 0,-100,0); // -y ltgreen (points DOWN when inverted)
}