Bug 97 : concave polygons sometimes have trouble in P3D and OPENGL
Last modified: 2006-11-10 06:11




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

 

Reporter:
fry
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2005-07-27 19:44
there are just problems when points are duplicated. like when the last
point in the shape meets the first, which happens with curves and i need to
re-add detection code to avoid it.

you may have some luck (no guarantees) with making the second
bezierVertex() call not meet the vertex() coordinate exactly, like just
have it off by .0001 or something till it can be fixed.

problem code from mflux:

void setup()
{
size(500,500,P3D);
}
void draw()
{
background(0);
beginShape(POLYGON);
vertex(230, 220);
bezierVertex(280, 200, mouseX, mouseY, 230, 275);
bezierVertex(250, 280, 260, 225, 230, 220);
endShape();
}
Additional Comment #1 From fry 2006-05-14 05:07
another example, though this one may be part of bug #111, not this one.

import processing.opengl.*;

void setup(){
size(800,800, OPENGL);
}
void draw(){
background(0);
stroke(255);
fill(100);

float d = int(mouseX);
float xl = 20;
float xr = 40;
float xh = 50;
float y2 = 400;
float yh = int(mouseY);

beginShape(POLYGON);
vertex(xl,height);
bezierVertex(xl, y2, d,yh, d,yh);
bezierVertex(d, yh, xr, y2, xr, height);
bezierVertex(xr, height, xl, height, xl, height);
endShape();
}
Additional Comment #2 From fry 2006-11-05 05:45
fixed for 0120.