I'm not sure about the behavior of 'curveVertex()' of Processing. So I'll try to figure it out with simple example codes.

``````

noStroke();
fill(0, 0, 0, 100);
textSize(30);
text("1", hW * 0.5, 0);
text("2", 0, hH * 0.5);
text("3", -hW * 0.5, 0);
text("4", 0, -hH * 0.5);

noFill();
stroke(0, 0, 0, 100);
strokeWeight(5.0);
beginShape();
curveVertex(hW * 0.5, 0);  // 1
curveVertex(0, hH * 0.5);  // 2
curveVertex(-hW * 0.5, 0); // 3
curveVertex(0, -hH * 0.5); // 4
endShape();

```
```

``````

curveVertex(hW * 0.5, 0);  // 1
curveVertex(0, hH * 0.5);  // 2
curveVertex(-hW * 0.5, 0); // 3
curveVertex(0, -hH * 0.5); // 4
curveVertex(hW * 0.5, 0);  // 1

```
```

``````

curveVertex(hW * 0.5, 0);  // 1
curveVertex(0, hH * 0.5);  // 2
curveVertex(-hW * 0.5, 0); // 3
curveVertex(0, -hH * 0.5); // 4
curveVertex(hW * 0.5, 0);  // 1
curveVertex(0, hH * 0.5);  // 2

```
```

``````

curveVertex(hW * 0.5, 0);  // 1
curveVertex(0, hH * 0.5);  // 2
curveVertex(-hW * 0.5, 0); // 3
curveVertex(0, -hH * 0.5); // 4
curveVertex(hW * 0.5, 0);  // 1
curveVertex(0, hH * 0.5);  // 2
curveVertex(-hW * 0.5, 0); // 3

```
```

These results tell us 'The line begins from the next vertex of the start point and ends the before vertex of the last point'.