Function for rounded polygons? Is there any general function for rounded REGULAR polygons.
To be specific, $x^2 + y^2 = 1$ gives a
circle ofcourse.
Even-numbered higher powers like $x^{10} + y^{10} = 1$ give a square with rounded corners with the corners becoming sharper as I increase the power.
Are there similar expressions for other regular polygons like triangle with rounded corners or a hexagon.
What I Have thought - I think the rounded square has a simple equation because of the x-y cartesian coordinates so maybe switching to an equilateral triangle-based system could give answers to the rounded triangle or hexagon. Im not sure how to do that though.
And of course the question remains for other regular polygons
 A: We can generate a family of equations with the symmetry of any even-sided regular polygon -- but there are some subtleties.
Consider a regular hexagon centered at the origin with two of its sides along $x=\pm1$. Then the separate equations for all six sides may be rendered thusly for all natural numbers $n$:
$x^{2n}=1$
$[(x+\sqrt3y)/2]^{2n}=1$
$[(x-\sqrt3y)/2]^{2n}=1$
Now to get a rounded, symmetric curve we simply add up the left sides and set this sum to a normalizing constant that forces the curve through $(\pm1,0)$. By the symmetry built into the inputs and the addition operations, the curve will then pass through the midpoints of all six sides of the hexagon.
$x^{2n}+[(x+\sqrt3y)/2]^{2n}+[(x-\sqrt3y)/2]^{2n}+[(x-\sqrt3y)/2]^{2n}+)=1+(1/2^{2n-1})$
So we try this formula with small values of $n$. For $n=1$:
$x^2+[(x+\sqrt3y)/2]^2+[(x+\sqrt3y)/2]^2+[(x-\sqrt3y)/2]^2=3/2$
$(3/2)x^2+(3/2)y^2=(3/2)$
We get back just the unit circle, which makes a suitable point of departure. Surely when we bump up $n$ to $2$, the circle will deform towards the circumscribed hexagon:
$x^4+[(x+\sqrt3y)/2]^4+[(x+\sqrt3y)/2]^2)4+[(x-\sqrt3y)/2]^4=9/8$
$(9/8)x^4+(9/4)x^2y^2+(9/8)=9/8$
$(x^2+y^2)^2=1\text{(!!!)}$
What happened? We incremented $n$ and yet we are stuck on the unit circle! Are we sure we can get to the hexagon as $n$ increases?
Baffled, we try $n=3$:
$x^6+[(x+\sqrt3y)/2]^6+[(x+\sqrt3y)/2]^6+[(x-\sqrt3y)/2]^6=33/32$
$(33/32)x^6+(45/32)x^4y^2+(135/32)x^2y^4+(27/32)=33/32$
$11x^6+15x^4y^2+45x^2y^4+9y^6=11$
$11(x^2+y^2)^3\color{blue}{-2y^2(3x^2-y^2)^2}=11$
This time, along with the $(x^2+y^2)^3$ term, we get a decrement in the function which forces the curve outside the unit circle except at the midpoints $(\pm1,0)$ and $(\pm1/2,\pm\sqrt3/2)$ (all signs independently chosen). We can check that the $y$-intercepts lie at $\pm\sqrt[6]{11/9}=\pm\sqrt[6]{33/27}$ versus $\pm1=\pm\sqrt[6]{27/27}$ for the circle and $\pm2/\sqrt3=\pm\sqrt[6]{64/27}$ for the bounding hexagon. Order is restored.
Figuring out the trick
So why did we need to give our curve a kick in the pants to get it going from the unit circle towards the limiting hexagon?
Here is a little stumper: design a quadratic curve (conic section) in the $xy$ plane with fourfold rotational symmetry.
You can't, unless you choose either a circle or a pair of intersecting lines. Of course we intend our curves to be irreducible with no straight portions and no self-intersections, so we are stuck with a circle. Were we to try a fourth-degree curve, however, we would have more latitude, for example being able to choose $x^4+y^4=1$.
When we ask for sixfold rotational symmetry, the same thing happens, except more so. Degree $4$ is not enough to get a rounded, irreducible curve with this symmetry without collapsing to a circle, which we were thus forced to do when we incremented $n$ only to $2$. We needed the higher degree implied by $n=3$ to get off square one, or off circle one so to speak.
We should expect similar results with this method for octagonal, decagonal, etc symmetry. We will get to the circumscribed polygon as $n\to\infty$, but we won't get started until $n$ is first made large enough. Assuming we choose a rounded $2m$-sided polygon, a properly placed circle would intersect it at $4m$ points; so the system of equations determining these ibtersectiogs must have degree $\ge4m$. The circle has degree only $2$, so the rounded polygon must have degree $2n\ge2m$ and thus $n\ge m$. This goes along with the hexagonal case discussed above, corresponding to $m=3$.
A: For octagon, try
$$(x^2+y^2)^m (|x^2-y^2|^n+|2xy|^n)=1$$
