OpenGL Velocity and Grouping of Lines (C++, Xcode)

I'm trying to add smooth movement with velocity to this program, but I'm not sure how to go about doing the deceleration. Could someone please point me in the right direction or if I'm doing it completely wrong correct me.

into a single object with a single x and y would creating a class with x, y member variables and a display function with the above code in it be the best way?

It's certainly a valid way, though there's a good debate about whether the display function would be part of the class or not. The quick story is that if your object's class/struct only has information about *how* to draw it, then you can have separate renderer code which is shared.

And the above code won't do anything except make a single point.

The single {x, y} point will be the origin of your object. Where that origin is depends on what makes sense in your case. It could be the dimensional center of the object, the center of mass, or some fixed point of rotation... It's just somewhere.

The coordinates for the vertices in the rest of your object will be relative to that origin. If your object is a cube and the origin is the very center of the cube, then your process would be like: