As a workaround you could try something like this which creates two separate shapes. Using the beginContour()…endContour model with Vertex seems not to work. I changed the winding to be reversed for the inner circle but I doubt that it makes any difference. What seems to be important is the overlap of points 1,2,3, ie they are drawn twice for each circle. You can experiment and see what happens if you don’t do this. I think the reason that it doesn’t work with curveVertex the way it does with Vertex is because of the way the runtime code has been written; I haven’t looked at the runtime to study the source code and will leave that to you if you want to pursue it.
void setup() {
size(800, 800);
}
void draw() {
background(209);
stroke(255, 0, 0);
strokeWeight(5);
beginShape();
fill(0);
curveVertex(470, 250);
curveVertex(350, 250);
curveVertex(300, 350);
curveVertex(320, 480);
curveVertex(400, 550);
curveVertex(520, 540);
curveVertex(600, 460);
curveVertex(580, 330);
curveVertex(470, 250); // same as pt. 1
curveVertex(350, 250); // same as pt. 2
curveVertex(300, 350); // same as pt. 3
endShape(CLOSE);
beginShape();
fill(209);
curveVertex(415, 380);
curveVertex(470, 380);
curveVertex(510, 420);
curveVertex(480, 480);
curveVertex(420, 480);
curveVertex(390, 430);
curveVertex(415, 380); // same as pt. 1
curveVertex(470, 380); // same as pt. 2
curveVertex(510, 420); // same as pt. 3
endShape(CLOSE);
/*
fill(255);
stroke(0, 255, 0);
strokeWeight(2.0);
// ============================= //
// outer counterclockwise
fill(255);
circle(470, 250, 15);
fill(0);
text("1", 467, 255);
fill(255);
circle(350, 250, 15);
fill(0);
text("2", 347, 255);
fill(255);
circle(300, 350, 15);
fill(0);
text("3", 297, 355);
fill(255);
circle(320, 480, 15);
fill(0);
text("4", 317, 485);
fill(255);
circle(400, 550, 15);
fill(0);
text("5", 397, 555);
fill(255);
circle(520, 540, 15);
fill(0);
text("6", 517, 545);
fill(255);
circle(600, 460, 15);
fill(0);
text("7", 597, 465);
fill(255);
circle(580, 330, 15);
fill(0);
text("8", 577, 335);
// ============================= //
// inner clockwise
fill(255);
circle(415, 380, 20);
fill(0);
text("1", 412, 385);
fill(255);
circle(470, 380, 20);
fill(0);
text("2", 467, 385);
fill(255);
circle(510, 420, 20);
fill(0);
text("3", 507, 425);
fill(255);
circle(480, 480, 20);
fill(0);
text("4", 477, 485);
fill(255);
circle(420, 480, 20);
fill(0);
text("5", 417, 485);
fill(255);
circle(390, 430, 20);
fill(0);
text("6", 387, 435);
fill(255);
*/
}
I left code remmed out which shows the draw order of the points.
Output: