Could someone help me with my graph?

Hi, I am trying to create a rotating 3D object with a customisable number of sides and I’ve succeeded for the most part. But I dislike that I have to manually add new points every time I want to increase the number of side panels. I wish that I could connect the number of side panels to ‘b’ and I’ve tried multiple times but I never got it to work. I was hoping that someone here could help me either simplify my current solution or solve it for me. I also dislike that the sides overlap.

I’m kind of new to graphs but I hope that I learn more since it seems very fun.
The link to my graph is: Idk how this works

I see the number of side panels change as the number of sides, b, with the slider. Do you mean something else. b changes the number of sides of the bases of the prism, and the number of faces increases or decreases accordingly.