Today I found a nice geometric pattern.
In both of the images, the total value of outside angles (marked in red or the value) are respectively $180°$ and $540°$. But I can't figure out the exact rules or process to figure out the value mathematically. I don't even understand that do this type of image follows any pattern or not.
So, Please help me to figure out this total value marked in red in the 2nd image and the 1st image(star) mathematically or in any pattern.
A small help will be enough for me to proceed.
Thanks for stopping by.


Consider the exterior angles of the marked interior angles.
If one walks along the edges of these star polygons and back to their starting point, then they would have turned by a multiple (known as the "turning number") of $360^\circ$, in these cases $2\times 360^\circ$. This multiple of $360^\circ$ is also the sum of all ($5$ or $7$ here) exterior angles.
$$\text{Turning number} \times 360^\circ = \text{Sum of exterior angles}$$
To find the sum of the marked interior angles, note that at each vertex, the interior and exterior angles add to $180^\circ$. So
$$\begin{align*} \text{Sum of}(\text{interior angle} + \text{exterior angle}) &= \text{Number of vertices} \times 180^\circ\\ \text{Sum of interior angles} &= \text{Number of vertices} \times 180^\circ - \text{Turning number} \times 360^\circ\\ &= (\text{Number of vertices} -2\times\text{Turning number}) \times 180^\circ\\ \end{align*}$$
For your pentagram and heptagram, the turning number is both $2$. So for your pentagram, the sum of interior angles is $(5-2\times2)180^\circ = 180^\circ$. And for your heptagram, the sum of interior angles is $3\times 180^\circ$.
(For a simple non-intersecting polygon, its turning number is $1$. The above formula becomes $\text{Sum of interior angles} = (\text{Number of vertices} - 2)\times 180^\circ$)