Intuitively, you will redo the same process for each shape to get their code which means you need to do the same effort 4 times. It’s logical since the 4 shapes are different but we can avoid the extra work by using the code of one shape to get all the others. Another good trick that helps you get many shapes with less effort.
First, I am going to define 3 transformations that we can later apply to any shape we want.
Switching The Axes
The first transformation is to switch the X and Y values of each point. If you have the following polygon:
clip-path: polygon(x1 y1,x2 y2, ..., xn yn)
Change it to
clip-path: polygon(y1 x1,y2 x2, ..., yn xn)
Nothing complex and no need to find out why. Take it as a kind of automatic process. You will understand later what it does.
Inverting The X Values
For this transformation, we are going to update only the X values. Going from:
clip-path: polygon(x1 y1,x2 y2, ..., xn yn)
to
clip-path: polygon(calc(100% - x1) y1,calc(100% - x2) y2, ..., calc(100% - xn) yn)
Each X value is updated in a way to have both the old and new values symmetric around the vertical axis. Remember that the sum of symmetric points needs to be equal to 100%, that’s why the formula is 100% - Xi.
Inverting The Y Values
Same logic but this time with the Y values. Going from:
clip-path: polygon(x1 y1,x2 y2, ..., xn yn)
to
clip-path: polygon(x1 calc(100% - y1),x2 calc(100% - y2), ..., xn calc(100% - yn))
Now if you apply one of these transformations to an existing shape you get another variation with 0 effort. You may ask which one to use, right? The answer is: “Try and see!” You can better understand this technique by applying it to real examples.
Take the code of the first tooltip shape from my online generator and try to get the other variations. Here is a figure to illustrate the transformations that convert one shape to another.