I thought I was using bezierVertex() correctly, but what the hey.
void setup()
{
size(512,512);
PShape bez = createShape();
bez.beginShape();
bez.noFill();
bez.stroke(255,0,0);
bez.strokeWeight(2);
bez.vertex(0,0);
bez.bezierVertex(0.17*width,0.67*width,0.83*width,0.67*width,width,width);
bez.endShape();
// Trying both methods
bezier(0,0, 0.17*width,0.67*width,0.83*width,0.67*width,width,width);
shape(bez,0,0);
}
And here’s what appears for me:
Obviously, the bezier() function is curved, but bezierVertex(), using the exact same parameters, does not get drawn as it should.
More annoying is that the example from the bezierVertex() reference is pretty vague, but does work:
noFill();
beginShape();
vertex(30, 20);
bezierVertex(80, 0, 80, 75, 30, 75);
endShape();
I haven’t used PShapes that much, so my best guess is that it’s due to some shape-setting I’m unaware of.
I’m still digging through the PShape javadoc, so give me enough time and I’ll probably stumble upon the answer.