Draw a closed curve in cartesian coordinates based on its area

differential-geometrygeometry

I've posted a question before asking how I would derive the length of a closed curve that I found in a paper. I am returning to now ask how I could draw my shape in Cartesian coordinates. From my first post about this paper we have that the authors use a particular case o the Gielis formula where, in polar coordinates, $\rho$ is defined as such:

$$
\begin{align}
\rho = r_m(\varphi)
&= \frac{1}{2}\lim_{n\to+\infty}\left(|\cos{\frac{m\varphi}{4}|^n}+|\sin{\frac{m\varphi}{4}}|^n\right)^{-\frac{1}{n}}\\
&=\frac{1}{2}\min{\left(\left|\sec{\frac{m\varphi}{4}}\right|,\left|\csc{\frac{m\varphi}{4}}\right|\right)}\label{1}
\tag{1}\end{align}$$

where m is a positive integer that defines the number of pseudovertices of a closed curve $C_m$. They then show that from the closed curve equations we have that

$$A_m = \frac{1}{2}\int_{0}^{2\pi} r_m^2(\varphi) \,d\varphi = 1 \tag{2}$$

$$
\begin{align}
l_m &= \int_{0}^{2\pi} \sqrt{r_m^2(\varphi)+\left[\frac{dr_m(\varphi)}{d\varphi}\right]^2} \,d\varphi \\
&= \sqrt{8+\frac{m^2}{2}}+4\left[F\left(\frac{\pi}{4}\bigg|1-\frac{m^2}{16}\right)-E\left(\frac{\pi}{4}\bigg|1-\frac{m^2}{16}\right)\right] \tag{3}
\end{align}$$

What I did then was stard from a square and define the area I want to have on my practical implementation (which is why I need to know how to draw the curves with respect to m). My square 2mm x 2mm, so my $A_m = 4~mm^2$. So now how would I proceed to create my geometry on a Cartesian framework?

I am sorry if this sounds a bit stupid, I've never attempted anything remotely close to this. Thank you in advance

Best Answer

Since $x = \rho \cos (\varphi)$ and $y = \rho \sin (\varphi)$ we can just plug your expression

$$\rho(\varphi) = \frac{1}{2} \min\left(\left|\sec \frac{m \varphi}{4}\right|, \left|\csc \frac{m \varphi}{4}\right|\right)$$

in, giving the Cartesian parametrization

$$x(t) = \frac{1}{2} \min\left(\left|\sec \frac{m t}{4}\right|, \left|\csc \frac{m t}{4}\right|\right) \cos(t)$$ $$y(t) = \frac{1}{2} \min\left(\left|\sec \frac{m t}{4}\right|, \left|\csc \frac{m t}{4}\right|\right) \sin(t)$$


Update: in MATLAB (actually, GNU Octave),

m = 5;
t = 0:0.01:2*pi;
x = min(abs(sec(m * t / 4)), abs(csc(m * t / 4))) .* cos(t) / 2;
y = min(abs(sec(m * t / 4)), abs(csc(m * t / 4))) .* sin(t) / 2;
plot(x, y)

plot of these equations for m = 5

Related Question