1
$\begingroup$

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?

$\endgroup$
12
  • 1
    $\begingroup$ For a circle of radius 1, I got that the average radius at the center is $\frac{2}{3}$, and that the radius from a point on the boundary is $\frac{32}{9\pi}\approx 1.13$. So I'm not sure how you got the conclusion about "highest average radius" for the circle. $\endgroup$
    – Joey Zou
    Dec 25, 2015 at 18:13
  • $\begingroup$ Oh if you followed my procedure I cant understand but if not the average radius should be 1 in the center . At the boundary I got the average radius approximately .6366197. I'll clarify my procedure. $\endgroup$
    – Arbuja
    Dec 25, 2015 at 18:48
  • 2
    $\begingroup$ I was looking at the average radius to points in an enclosed region, and not to the points on the boundary. My mistake. $\endgroup$
    – Joey Zou
    Dec 25, 2015 at 18:53
  • 1
    $\begingroup$ Would you mind explaining your calculations for the point on the boundary of a circle, i.e. the integral you were evaluating? Your definition of average radius is not at all syncing with my intuition of what it should be. $\endgroup$
    – Joey Zou
    Dec 25, 2015 at 19:11
  • 1
    $\begingroup$ "Please login to cloud.sagemath.com with cookies enabled, then refresh this page." $\endgroup$
    – Joey Zou
    Dec 25, 2015 at 23:25

5 Answers 5

1
$\begingroup$

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).

$\endgroup$
5
  • $\begingroup$ Do you know of other kinds of centers I can look into? I think there could be other centers related to that of the average radius. $\endgroup$
    – Arbuja
    Dec 24, 2015 at 22:15
  • $\begingroup$ See e.g. en.wikipedia.org/wiki/List_of_centroids and you might also want to look into the center of mass of curve segments. $\endgroup$
    – flawr
    Dec 24, 2015 at 22:24
  • $\begingroup$ I realized by center of mass I meant centroid. Sorry for the confusion. $\endgroup$
    – Arbuja
    Dec 24, 2015 at 22:55
  • $\begingroup$ Is it okay if you modify your answer. $\endgroup$
    – Arbuja
    Dec 28, 2015 at 15:24
  • $\begingroup$ Here is the link files.acrobat.com/a/preview/… to clarify your result. $\endgroup$
    – Arbuja
    Dec 30, 2015 at 12:39
1
$\begingroup$

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.

$\endgroup$
9
  • $\begingroup$ Are you talking about the radius of gyration? $\endgroup$
    – Arbuja
    Dec 24, 2015 at 23:00
  • $\begingroup$ For point $P$, the average of $|PX|^2$, for $X$ in the figure. $\endgroup$
    – zyx
    Dec 24, 2015 at 23:02
  • $\begingroup$ So this is how to find the average radius from a centroid? $\endgroup$
    – Arbuja
    Dec 24, 2015 at 23:13
  • 1
    $\begingroup$ It is a quantity that is minimized when P is the centroid. If you are asking how to compute the average for a given P that is a different question (answered in any multivariable calculus textbook). I don't think there is any other function of distance (to P) that is minimized at the centroid except squared distance. $\endgroup$
    – zyx
    Dec 24, 2015 at 23:19
  • 1
    $\begingroup$ That is (postable as) a separate question about the circle and not general shapes. Surely the statement is correct, the difficulty is in proving it for general points P inside the circle. A reasonable guess is that average(P) increases as P moves closer to the circle. $\endgroup$
    – zyx
    Dec 30, 2015 at 21:12
1
$\begingroup$

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$.

$\endgroup$
26
  • $\begingroup$ The integration measure $d\theta$ used to define "average distance from $p$" is a function of $p$, unlike $d\ell$ which depends only on the curve. This is visible in the formula comparing $d\theta$ to $d\ell$. The dependence on the center point of the rays makes it hard to interpret which $p$ is extremal since average($p_1$) and average($p_2$) are summing the ray lengths from the center in different ways. It also is not possible to say if the centroid is extremal because centroid is undefined without a fixed measure on the curve. To define "extremizer of average $r$" we need a measure. $\endgroup$
    – zyx
    Jan 3, 2016 at 16:00
  • $\begingroup$ I don't understand your comment. Are you saying there is a flaw in my derivation? Note that in the formula $r\,\mathrm d\theta = \cos\phi\,\mathrm d\ell$ it is $\phi$ on the right-hand side that depends on $\mathbf p$. $\endgroup$
    – user856
    Jan 3, 2016 at 19:45
  • $\begingroup$ I assumed that the derivation is flawless. I am saying that your formulas make explicit why the formalization of "average ray length from P" as an integral with respect to uniform angle measure around P is not correct. The angle $d\theta$ subtended at P by an infinitesimal segment of length $d\ell$ on the curve varies with P and that is what the $\cos \phi$ term is picking up. $\endgroup$
    – zyx
    Jan 3, 2016 at 20:14
  • $\begingroup$ Oh, I see, you are taking issue with the definition itself. But how can a definition be incorrect? To me it is perfectly fine: it is the average taken from $\mathbf p$'s point of view. One can imagine speaking of how "the average brightness of the night sky" varies from place to place, without imposing a measure on all the stars in the galaxy. $\endgroup$
    – user856
    Jan 3, 2016 at 20:20
  • $\begingroup$ That's a nice way to look at it (though I will have to think a bit to resolve whether it negates what I wrote previously). But how are we supposed to compare the brightness to that from "the centroid" without imposing a measure so as to be able to calculate the centroid of the stars / curve? $\endgroup$
    – zyx
    Jan 3, 2016 at 20:35
0
$\begingroup$

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.

$\endgroup$
-1
$\begingroup$

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.

$\endgroup$
6
  • $\begingroup$ Is this for the centroid? $\endgroup$
    – Arbuja
    Dec 25, 2015 at 1:01
  • $\begingroup$ When you said "center of mass" earlier I assumed you meant centroid, so yes. Note that the centroid of a line segment is its midpoint, and the centroid of a rectangle is in the center of the rectangle, i.e. the intersection of the perpendicular bisectors, which corresponds to the midpoint of a line segment as the width goes to zero. $\endgroup$
    – Joey Zou
    Dec 25, 2015 at 3:45
  • $\begingroup$ According to my calculations on sage software the centroid of the rectangle $|x/10+y|+|x/10-y|=10$ is (0,0) but so is the point with the highest average radius. Perhaps you can show me some calculation to prove me wrong. $\endgroup$
    – Arbuja
    Dec 25, 2015 at 14:45
  • 1
    $\begingroup$ So the rectangle in question has vertices at $(\pm 50,\pm 5)$. I got that the average radius at $(0,0)$ is about $25.32$. On the other hand, if I look at the point $(-50,0)$, then I see that at the points in the rectangle with positive $x$ coordinate (which is half of the rectangle) have distance at least $50$ from $(-50,0)$, while the points with $x$ coordinate between $-25$ and $0$ (which is $1/4$ of the triangle) have distance at least $25$ from $(-50,0)$, so without any serious calculations I see that the average radius has to be at least $1/2*50+1/4*25 = 31.25>25.32$. $\endgroup$
    – Joey Zou
    Dec 25, 2015 at 18:36
  • $\begingroup$ See this files.acrobat.com/a/preview/… to clarify your conception about the center of the rectangle. $\endgroup$
    – Arbuja
    Dec 27, 2015 at 20:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .