The polar equation of a regular polygon is already known. Here we calculate the equation for any polygon.
Parameterize Line[{{x1,y1},{x2,y2}}] as { x1+t(x2-x1),y1+t(y2-y1)}
In[]:=
eq=θ==TrigToExp[ArcTan[x1+t(x2-x1),y1+t(y2-y1)]]
Out[]=
θ-Log
x1+t(-x1+x2)+(y1+t(-y1+y2))
2
(x1+t(-x1+x2))
+
2
(y1+t(-y1+y2))

Solve for t as a function of θ
In[]:=
sln=Solve[eq,t]//FullSimplify
Out[]=
t
y1Cos[θ]-x1Sin[θ]
(y1-y2)Cos[θ]+(-x1+x2)Sin[θ]

Calculate {x,y} as a function of θ
In[]:=
xy[θ_]={x1+t(x2-x1),y1+t(y2-y1)}/.t
y1Cos[θ]-x1Sin[θ]
(y1-y2)Cos[θ]+(-x1+x2)Sin[θ]
//FullSimplify
Out[]=

(x2y1-x1y2)Cos[θ]
(y1-y2)Cos[θ]+(-x1+x2)Sin[θ]
,
(x2y1-x1y2)Sin[θ]
(y1-y2)Cos[θ]+(-x1+x2)Sin[θ]

Calculate r as a function of θ
In[]:=
r[{{x1_,y1_},{x2_,y2_}}][θ_]=Sqrt[xy[θ].xy[θ]]//FullSimplify
Out[]=
2
(x2y1-x1y2)
2
((y1-y2)Cos[θ]+(-x1+x2)Sin[θ])
ArcTan with changed range
In[]:=
ArcTan1[x_,y_]=If[ArcTan[x,y]<0,ArcTan[x,y]+2π,ArcTan[x,y]];
angle bounds for a polygon side
In[]:=
bnds[{{x1_,y1_},{x2_,y2_}}]=If[​​ArcTan1[x1,y1]<ArcTan1[x2,y2],​​ArcTan1[x1,y1]<=θ<=ArcTan1[x2,y2],​​ArcTan1[x1,y1]-2π<=θ<=ArcTan1[x2,y2]​​];
r as a function of θ for a polygon described by vertices. vertices must be in counterclockwise order around origin.
In[]:=
rθ[vertices_List][θ_]:=​​Block[{nverts,pairs},​​nverts=Length[vertices];​​pairs=Partition[vertices,2,1,{1,1}];​​Piecewise[Table[{r[pairs[[i]]][θ]//N,bnds[pairs[[i]]]//N},{i,nverts}]]​​]
In[]:=
Show[PolarPlot[rθ[CirclePoints[3]][θ],{θ,-π,2π},ImageSize->Small],Graphics@{PointSize[Large],Point[CirclePoints[3]]}]
Out[]=
In[]:=
Show[PolarPlot[rθ[{{1,-1},{1,1},{0,0.5},{-1,1},{-1,-1}}][θ],{θ,-π,2π},ImageSize->Small],Graphics@{PointSize[Large],Point[{{1,-1},{1,1},{0,0.5},{-1,1},{-1,-1}}]}]
Out[]=
In[]:=
Show[PolarPlot[rθ[{{1,-1},{1,1},{0.5,0.6},{-0.5,0.6},{-1,1},{-1,-1}}][θ],{θ,-2π,2π},ImageSize->Small],Graphics@{PointSize[Large],Point[{{1,-1},{1,1},{0.5,0.6},{-0.5,0.6},{-1,1},{-1,-1}}]}]
Out[]=
In[]:=
pts=RandomPoint[RegularPolygon[3],5]
Out[]=
{{-0.174261,-0.132874},{-0.0249217,0.766304},{0.0441928,0.791154},{-0.72239,-0.43116},{0.524696,-0.281197}}
In[]:=
spts=SortBy[pts,ArcTan[#[[1]],#[[2]]]&]
Out[]=
{{-0.72239,-0.43116},{-0.174261,-0.132874},{0.524696,-0.281197},{0.0441928,0.791154},{-0.0249217,0.766304}}
In[]:=
Show[PolarPlot[rθ[spts][θ],{θ,-π,2π},ImageSize->Small],Graphics@{PointSize[Large],Point[spts]}]
Out[]=

CITE THIS NOTEBOOK

Polar coordinates of polygons which aren't regular​
by Frank Kampas​
Wolfram Community, STAFF PICKS, May 19 2023
​https://community.wolfram.com/groups/-/m/t/2921962