Could you give me an advice on how i can get started on my assignment?

Hello, I have a difficulty setting up my plan for this particular assignments. Using opengl, I am assigned to create a 3-d object that increases sides by keyboard input. (so it will go from triangular prism, cuboid, pentagonal prism, and eventually approximate up to becoming a cylinder.

To draw the capsule you will have to use some trigonometry and determine mathematically
where the vertices of the capsule will be situated in the 3D environment given the described
parameterization. The vertices will then have to be put in arrays in the correct order, so that
all the needed lines that will represent the capsule can be properly defined.

above is one of the instruction suggested but i am still having difficulty understanding this concept.

Please help, I am not necessarily asking for any source code but how i can approach this assignment.
Guide me to the right direction so i can start grinding…

Start with the easiest case, use a for-loop to output the points around a circle with variable resolution. From there, figure out how to extrude it into a cylinder. Generating the spherical ends of a capsule is a little harder, but you’ll have a better idea after you do the first parts.