Hello,
There is no problem on this end…
You have complete control over what your code does and the order that you place the shapes.
You have to choose the correct closing co-ordinates.
void draw()
{
background(255);
translate(500/2, 500/2);
strokeWeight(2);
for (int i = 0; i < positions.size()-1; i++)
{
a = positions.get(i);
b = positions.get(i+1);
line(a.x, a.y, b.x, b.y);
ellipse(a.x, a.y, 10, 10);
}
a = positions.get(?);
b = positions.get(?);
line(?);
ellipse(?);
ellipse(?); // This was an extra finishing touch so circle was on top of line.
}
:)
I leave this with you.
