You are definitely on the right track with using `arc`

. You can create a circle using `arc`

, and yes, you can then modify the vertices after you create the circle. The vertices are what define those line segments. Every two consecutive vertices are connected to form a line segment. If you have points A, B, C and D as your vertices in a polyline, then you will have line segments A->B, B->C and C->D.

But a couple amendments to your code:

First, when printing out the vertices in your polyline, try this:

```
for (int i=0; i<polyline1.size(); i++) {
cout << polyline1[i] << endl;
}
```

You can access the vertices of your polyline using the `[]`

. This gives you an easy way to both read and change vertices. The way you are doing it is only going to print out the memory location of the vertices in your polyline - something not very comprehensible.

Second, the way you are using `arc`

won’t give you a connected circle. If you look at your vertices, you will see the first and last vertex are duplicates. Your last vertex doesn’t connect to your first vertex, so if you were to shift the vertices on your circle around, you might see something like this:

But I image you want to be able to deform your circle, so that the shape stays together:

Here’s a way to generate a closed circle with `arc`

:

```
int resolution = 20;
float endAngle = 360.0 - 360.0/resolution; // Each segment is equal to 360.0/resolution degrees
polyline1.arc(150, 150, 100, 100, 0, endAngle, resolution);
polyline1.setClosed(true);
```

You want to draw an arc that stops one line segment away from completing the circle. `setClosed(true)`

will tell your polyline to connect that last vertex to the first vertex.

Here’s some sample code to create a circle and deform over time:

```
ofPolyline modifiedPolyline;
ofPolyline originalPolyline;
void testApp::setup(){
int resolution = 20;
float endAngle = 360.0 - 360.0/resolution;
originalPolyline.arc(150, 150, 100, 100, 0, endAngle, resolution);
originalPolyline.setClosed(true);
modifiedPolyline = originalPolyline; // Creates a copy
}
void testApp::draw(){
modifiedPolyline.draw();
}
void testApp::update(){
float startAngle = ofGetElapsedTimef() * TWO_PI/2.0; // angle = time (in seconds) * speed (in radians/second)
for (int i=0; i<originalPolyline.size(); i++) {
float angleOffset = float(i)/originalPolyline.size() * (4.0*TWO_PI);
float angle = startAngle + angleOffset;
float scale = sin(angle*2.0) * 10.0;
modifiedPolyline[i].x = originalPolyline[i].x + scale * cos(angle);
modifiedPolyline[i].y = originalPolyline[i].y + scale * sin(angle);
}
}
```