Skip to content

domrally/squoval

Repository files navigation

Squoval

$$ \Huge \begin{align*} x &= \text{erf atanh cos } t \\ y &= \text{erf atanh sin } t \end{align*} $$

flatter and smoother rounded corners · web components

npm i squoval
<script src="https://cdn.skypack.dev/squoval?min" type="module"></script>
<squoval-element></squoval-element>

proof notes

smoothness

Derivatives exist at every point. Maybe want to show upper bound on derivatives.

flatness

$$ \Huge \begin{align*} \text{A function is flat at a point if} & \text{ every derivative goes to zero at that point:} \\ \forall\ {\rm n} \in \mathbb{N}\text{, } \lim_{t\to 0} f^ {\rm (n)}_ {t} &= 0 \\ \\ x(t) &= \text{erf atanh cos } t \\ x'_ {t} &= e^ {-{\rm atanh}^ {2} \cos t}\ g(t) \\ x''_ {t} &= e^ {-{\rm atanh}^ {2} \cos t}\ (g'_ {t} + g^ {2}(t)) \\ &\dots \\ x^ {\rm (n)}_ {t} &\propto e^ {-{\rm atanh}^ {2} \cos t} \\ \\ \text{The function is flat wherever} & \text{ the exponential term is equal to zero.} \\ \forall\ m \in \mathbb{N}\text{, } \lim_{t\ \to\ m \pi} e^ {-{\rm atanh}^ {2} \cos t} &= 0 \\ \text{So the function} & \text{ is periodically flat.} \\ \therefore\ x^ {\rm (n)}_ {t} (m \pi) &= 0 \\ \end{align*} $$

Releases

No releases published

Packages

No packages published