Path: csiph.com!news.mixmin.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.programming
Subject: Re: Another little puzzle
Date: Sun, 08 Jan 2023 07:45:23 -0800
Organization: A noiseless patient Spider
Lines: 54
Message-ID: <868ridni7g.fsf@linuxsc.com>
References: <87tu1diu2s.fsf@bsb.me.uk> <864jtdtkt5.fsf@linuxsc.com> <87o7rlhtsv.fsf@bsb.me.uk> <878rioifnh.fsf@bsb.me.uk> <868rinskhk.fsf@linuxsc.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: reader01.eternal-september.org; posting-host="74dc1f9657693bf61783dca6338fedc2"; logging-data="4074897"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/5GKp4bsR1RLo+ABMGm6HPy0cuLwetyA4="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:+xi4zWOIoKcHPJHihsxAgUj3SxA= sha1:hqjIQUaZ31W5fuVQAh0zaBifls8=
Xref: csiph.com comp.programming:16266
"Dmitry A. Kazakov" writes:
> On 2022-12-31 15:42, Tim Rentsch wrote:
>
>> Ben Bacarisse writes:
>>
>>> For the "vector average", we convert the t(i) to unit vectors u(i) and
>>> we calculate the mean if the u(i) to get a vector m. The "average", A,
>>> is just the direction of this vector -- another point on the unit
>>> circle. In this case we are minimising the sum of squares of the
>>> /chord/ lengths between A and the t(i).
>>
>> I think of this approach differently. I take the time values
>> t(i) as being unit masses on the unit circle, and calculate the
>> center of mass. As long as the center of mass is not the origin
>> we can project it from the origin to find a corresponding time
>> value on the unit circle (which in my case is done implicitly by
>> using atan2()).
>
> Center of mass of a set of ideal points (particles) and vector
> average are same:
Yes, I thought the equivalence is obvious and not in need of
explanation.
>>> This distinction between arc lengths and chord lengths helps to
>>> visualise where these averages differ, and why the conventional
>>> average may seem more intuitive.
>>
>> Interesting perspective. I wouldn't call them chord lengths
>> because I think of a chord as being between two points both on
>> the same circle, and the center of mass is never on the unit
>> circle (not counting the case when all the time values are the
>> same). Even so it's an interesting way to view the distinction.
>
> Arc length is proportional to angle:
A trivial and useless observation.
> Averaging arcs is equivalent to averaging angles.
Angles are a one-dimensional measure. Finding an arc length
"average" of points on a sphere needs a two-dimensional result.
>> Now that I think about it, finding the point that minimizes the
>> great circle distances squared would be at least computationally
>> unpleasant.
>
> See above, it is just angles to average.
Apparently you have not yet understood the problem. Why don't
you try writing a program that inputs a set of points normalized
to be on the unit sphere, and then calculates the arc length
average point (on the unit sphere) of those input points?