#Curved Shape has a linear side

4 messages · Page 1 of 1 (latest)

vivid vine
#

Hey there, I am wondering why my shape has one side not curved.

This is the part of the code:
beginShape(); curveVertex(50,50); curveVertex(50,100); curveVertex(100,100); curveVertex(100,50); //curveVertex(50,50); endShape(CLOSE);

Even when the last point would be the same coordinates as the first one, it would still be connected linear.

Anyone has a solution to this?
Cheers

glass portal
#

the issue is that the first and last points using this method aren't related by a curve. You need to have all 4 points be linked by curves to other vertices.

#
  beginShape();
  curveVertex(100,50);
  curveVertex(50,50);
  curveVertex(50,100);
  curveVertex(100,100);
  curveVertex(100,50);
  curveVertex(50,50);
  curveVertex(50,100);
  endShape();
#

this will give you what you want, an extra point is added to the start and end