There is a command vertex, therefore it’s confusing to name your ArrayList vertex
better would be vertexList.
You could say
before setup():
ArrayList<PVector> vertexList = new ArrayList();
in setup():
vertexList.add(new PVector(x+w/2*sin(thetac),
y+w/2*cos(theta*c)));
Chrisir