Is there an equation f(x,y) for a triangle inscribed in a unit square with two rounded corners?

60 Views Asked by At

An on and off project of mine is to come up with a smooth saw tooth function without using a Fourier series, so this question is hopefully related in that a sin wave produced from the inscribed triangle described in the title should describe such a smooth saw tooth function. Below is an image showing what I think this triangle ABC inscribed in the unit square should look like, with increasing iterations of some n leading to ever sharper vertices B and C, while vertex A remains sharp and discontinuous at all iterations of n.

Inscribed Unit Triangle

Just looking at it looks to me to be hopelessly complicated tbh, so any hints or pointers would be greatly appreciated.

Thanks!

1

There are 1 best solutions below

0
On

HINT:

The segment $CB$ can be parametrized ($A$ is the origin) as $$(1, \tan t)$$ where $t\in [-\phi, \phi]$, where $\phi = \arctan \frac{1}{2}$. Now consider a function that it is very close to $1$ on $(-\phi, \phi)$ and $0$ at $\pm \phi$. For instance, such a function can be $f(t)=1-\left(\frac{x}{\phi}\right)^{2n}$, where $n$ is large. So your curve can be $$(f(t), f(t)\tan t)$$ with $t \in [-\phi,\phi]$.