Is the point of a shape with the greatest average ray length also the "centroid"? By a shape I mean one with a enclosed area. One example can be with $x^2+y^2+\sin{4x}+\sin{4y}=4$. I am dealing with implicit relations on a 2-d plane.
By the "ray length" I mean the length of the line segment from any chosen point inside the enclosed area to a point on the boundary of the shape.
Just in case you do not know how to find the average ray length you can start by converting an implicit relation into polar form. Just substitute $x=r\cos{\theta}$ and $y=r\sin{\theta}$ in $f(x,y)=0$.
Then to choose a point inside an implicit relation just convert $f(x+u,y+v)=0$ (because we want our chosen point at the pole) and with substitution get $f(r\cos\theta+u,r\sin\theta+v)$. From here you solve for $r$ In terms of $\theta$ $u$ and $v$ as $r=g(\theta)$ then take the area as $\frac{1}{2\pi}\int_{0}^{2{\pi}}g(\theta){d\theta}$ and find the $u$ and $v$ (u,v) with the greatest area. If this is not possible you could implicitly find the area under $f(r\cos\theta+u,r\sin\theta+v){d\theta}$ ,where $r>0$ and the area between $0<\theta<2\pi$. Then divide the area by $2\pi$ and once again find the $u$ and $v$ in point (u,v) with the greatest area.
(If you are not clear with how the area should be calculated treat the polar equation as cartesian implicit function. Replace $r=y$ and $\theta=x$ to get $f(y\cos{x}+u,y\sin{x}+v)$ and then proceed.
Here is an example with the circle https://files.acrobat.com/a/preview/38a501f2-5b63-4b76-b720-6cadb9c3e142
The centroid can be found online in https://en.wikipedia.org/wiki/Centroid.
When it came to a circle and ellipse I found the point of "highest average ray length" and "center of mass" to be the same. However I am not sure how to figure this out with more complicated implicit relations like $x^2+y^2+\sin{4x}+\sin{4y}=4$. Are there any approaches to finding the difference using calculus or numerical integration?
 A: No, consider a C-shaped area, where the center of mass is obviously outside of the shape, and cannot be within the shape. Perhaps you might want to consider convex shapes but even with those I do not believe center of mass is the point of the highest average radius. I think your idea could only (perhaps) work if you only consider the boundary of the shape and its mass (but the area within has no mass).
A: The centroid is the point from which the average squared radius is minimized, but there is no such extremum characterization involving the average radius itself.
The only nonconstant functions $f(r)$ of the "radius" for which the centroid is always a point at which the average value of $f(r)$ is extremal, are $f(r)= Ar^2 + B$ for constant $A$ and $B$.

Updated after the edit to the question.
The preceding statements are correct for a given integration measure on the figure.  The centroid and the average squared radius are computed with respect to that measure, whichever it may be.
If "figure" is meant as the interior of the curve then area measure is the standard choice and is what is always meant when speaking of centroids.   If the curve is imagined as a bent physical wire of uniform density, the center of gravity of the wire is not the centroid of the 2-dimensional region bounded by the curve.
Using $d\theta$ relative to the center point of the rays as integration measure on the curve is not an averaging procedure, because the measure of intervals on the curve depends on the center point.
A: So here's something interesting I found about your definition.
To recapitulate: You have a closed curve $\mathcal C$, and you choose an arbitrary point $\mathbf p$ in its interior. For any angle $\theta$ you shoot a ray from $\mathbf p$ at an angle $\theta$ to the $x$-axis, and define $r$ to be the distance from $\mathbf p$ to the point $\mathbf q$ where the ray hits $\mathcal C$. (Ignore for the moment that $r$ is only a function of $\theta$ if the region is star-shaped with respect to $\mathbf p$.) Your average ray length is
$$\bar r = \frac1{2\pi}\int_0^{2\pi}r\,\mathrm d\theta.$$
Now if you consider a differential element of length $\mathrm d\ell$ along the curve, a little geometry shows that
$$r\,\mathrm d\theta = \cos\phi\,\mathrm d\ell,$$
where $\phi$ is the angle between the vector $\mathbf r = \mathbf q - \mathbf p$ and the normal to the curve at $\mathbf q$. Furthermore,
$$\cos\phi = \hat{\mathbf r}\cdot\hat{\mathbf n},$$
where $\hat{\mathbf r} = \mathbf r/\|\mathbf r\|$ and $\hat{\mathbf n}$ is the unit normal at $\mathbf q$. So the integral is really
$$\bar r = \frac1{2\pi}\oint_{\mathcal C} \hat{\mathbf r}\cdot\hat{\mathbf n}\,\mathrm d\ell.$$
Conveniently, this integral is well-defined even if the region is not star-shaped, and turns out to be equivalent to taking $r$ to be the total length of the ray that lies inside the curve.
Now that last integral is nothing but the total flux of the vector field $\hat{\mathbf r}$ through the closed curve $\mathcal C$, so we can apply the divergence theorem to find that
$$\begin{align}
\bar r &= \iint_{\mathcal A}(\nabla\cdot\hat{\mathbf r})\,\mathrm dA \\
&= \iint_{\mathcal R}\frac1r\,\mathrm dA,
\end{align}$$
where $\mathcal R$ is the region enclosed by $\mathcal C$. In other words, if we define the convolution kernel
$$h(\mathbf x) = \frac1{\|\mathbf x\|},$$
then the average ray length $\bar r$ as a function of $\mathbf p$ is a convolution
$$\bar r(\mathbf p) = \iint_{\mathbf x\in\mathbb R^2} h(\mathbf x-\mathbf p) 1_{\mathcal R}(\mathbf x)\,\mathrm dA,$$
or simply
$$\bar r = h*1_{\mathcal R},$$
where $1_{\mathcal R}$ is the indicator function of the region $\mathcal R$.
A: I have confused you with the definition of mean radius with the average ray length. When people think of average radius they think of "average squared minimized" or mean radius.
What I am focusing on was more of average ray length, where a ray is from a point inside an enclosed shape point on the boundary of the shape. Then as the angle of the ray (in radians) shifts from $0$ to $2\pi$ the ray length for each $\theta$ created a "ray function" or $r(\theta)$. I want find the average of that ray function from $0$ to $2\pi$.
$$\frac{1}{2\pi}\int_{0}^{2\pi}r(\theta)$$
I asked a similar question here where the user @Rahul understood what I meant and gave a better explanation.
"Suppose the curve is star-shaped with respect to your center point $\mathbf p=(u,v)$, so that any ray emanating from $\mathbf p$ meets the curve exactly once, at say point $\mathbf q$. Then $r = \|\mathbf q - \mathbf p\|$, $\theta$ is the angle between $\mathbf q-\mathbf p$ and the $x$-axis, and the average radius is"
$$\frac1{2\pi}\oint_{\mathbf q\in\mathcal C}\|\mathbf q-\mathbf p\|\,\mathrm d\theta.$$
Using a software technique he was able to find the point with the highest average ray length for $x^2+y^2+\sin(4x)+\sin(4y)=4$. While the centroid was $(-.163523,-.070653)$ the point of highest average ray length is $(-.052594,-.052505)$.
Despite this counter-example I found for circles, ellipses, rectangles and many simpler enclosed shapes; the centroid is the point with the highest average ray length.
A: Consider a line segment, say with a length of one. The average radius with respect to the midpoint is $1/4$, but the average radius with respect to either endpoint is $1/2$.
If you want a $2$-dimensional example, just consider a very thin rectangle where the same argument holds.
