The central red curve defined by 4 points in the diagram above is called a "quadriellipse" (not sure). How do I plot it in Mathematica?

• what have you tried? Do you know anything about the mathematics of the figure you've shown? Mar 6, 2018 at 2:45
• I tried to find there are blue,pink,green, yellow 4 Cardioid. Mar 6, 2018 at 2:55
• Where did you get this picture from? Mar 6, 2018 at 3:23
• @J.M.from this link Mar 6, 2018 at 3:45
• Next time, please include the sources of any image you are using that you did not generate yourself. Mar 6, 2018 at 4:34

Converting the multipolar equation in the link into Cartesian form, here is a $4$-ellipse where the four foci are arranged in a square:

With[{pts = CirclePoints[{1, 0}, 4], d = 24/5 (* sum of distances *)},
ContourPlot[Sum[EuclideanDistance[{x, y}, pt], {pt, pts}] == d,
{x, -3/2, 3/2}, {y, -3/2, 3/2},
Epilog -> {Directive[Red, AbsolutePointSize[4]], Point[pts]}]]


This is only a portion of the full Cartesian curve; to see the full curve, we can use GroebnerBasis[] to obtain the rationalized Cartesian equation:

With[{d = 24/5},
ContourPlot[First[GroebnerBasis[Sum[Sqrt[#.#] &[{x, y} - pt],
{pt, CirclePoints[{1, 0}, 4]}] - d,
{x, y}]] == 0 // Evaluate,
{x, -3, 3}, {y, -3, 3}, PlotPoints -> 105]]


It was simple enough to make a Manipulate[] for playing with general $n$-ellipses, so I made one:

Manipulate[ContourPlot[Sum[EuclideanDistance[{x, y}, pt], {pt, pts}] == d,
{x, -5, 5}, {y, -5, 5}],
{{d, 5}, 0, 20}, {{pts, N[CirclePoints[4]]}, Locator, LocatorAutoCreate -> All}]