Bug 387 : Perspective skewed in P3D with perspective
Last modified: 2007-02-03 09:39




Status:
RESOLVED
Resolution:
INVALID -
Priority:
P2
Severity:
normal

 

Reporter:
wxs
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2006-08-31 20:52
An ellipse shown in 3d with the P3D renderer gets strangely skewed. Run the
following code, and you'll see that, instead of an ellipse, you get a
heart-like shape. If you switch to opengl the problem dissapears. Also it
is not apparent if you put it into ortho() mode.

PGraphics g;

void setup() {
size(200,200,P3D);
g = createGraphics(100,100,JAVA2D,null);
}

void draw() {
background(100);
g.background(color(100,0,0));
g.noStroke();
g.fill(color(0,100,0));
g.ellipseMode(CORNER);
g.ellipse(0,0,100,100);
g.endFrame();
g.loadPixels();
translate(width/2,height/2,0);
rotateY(-0.8);
rotateX(1.3);
image(g,0,0);
}
Additional Comment #1 From fry 2006-09-04 20:28
i think that's because the shape is flying into the camera, which will have
undefined results. try translating backwards first.