Given a point P0 $(x0, y0)$ lying on a super ellipse, $(x/a)^n + (y/b)^n = 1$, where $2 <= n <= 5$, I'm trying to derive an equation to describe the point P1 (x1, y1) lying on the normal through $(x0, y0)$ at a distance d from the curve. Note there are actually two points that satisfy this condition: one inside the super ellipse and one external to it. I want to be able to specify either one or both points.
So far I've been able to:
(1) derive the equations for x0 and y0 parametrically as shown below. I'm showing these in a C-like pseudo-language, since I'm working on a computer algorithm to generate and plot my results:
x = a * sign(t) * pow(abs(cos(t)), 2/n) and y = b * sign(t) * pow(abs(sin(t)), 2/n),
(2) I can also derive the equation for the slope of the normal through (x0, y0) and (x1, y1), which looks something like this:
m = (b/a)^n * x^(n-1)/y^(n-1)
It's been many years though since my last calculus class (40 anyway!), and that's where I'm stuck. I can also see that the point (or more precisely points) (x1, y1) lying along the normal at distance d from the curve need to satisfy (x1 - x0)^2 + (y1 - y0)^2 = d^2, but so far haven't been able to figure out how to use that information.