MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Point on sphere greatest distance from given points

  • To: mathgroup at smc.vnet.net
  • Subject: [mg104088] Re: [mg104076] Re: Point on sphere greatest distance from given points
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Sun, 18 Oct 2009 07:26:32 -0400 (EDT)
  • References: <hbc81b$ckn$1@smc.vnet.net> <200910180923.FAA17044@smc.vnet.net>

On 18 Oct 2009, at 18:23, Ray Koopman wrote:

> On Oct 17, 3:58 am, Kelly Jones <kelly.terry.jo... at gmail.com> wrote:
>> How can I use Mathematica to solve this problem:
>>
>> Given n points on a sphere, I want to find a point x such that:
>>
>> Sum[distance[x,i],{i,1,n}]
>>
>> is maximal, where "distance" is spherical ("great circle") distance.
>>
>> In other words, I want to find the point x "furthest" from the  
>> given n points.
>>
>> Is there any chance x will coincide with one of the given points?
>> If so, is there a better notion of distance to use?
>
> To avoid having the solution coincide with one of the
> given points, maximize the sum of the logs of the distances.
>
> s = Normalize/@RandomReal[NormalDistribution[0,1],{5,3}]
>
> {{-0.528071, -0.848197, 0.0412642},
> {-0.0563032, -0.978864, -0.196608},
> {0.750442, 0.305033, 0.586337},
> {0.384831, 0.263578, 0.884552},
> {0.922298, 0.0757753, 0.378977}}
>
> NMaximize[{Tr at Log[1-s.Normalize@{x,y,z}],x^2+y^2+z^2==1},{x,y,z}]
>
> {2.00971, {x -> -0.497972, y -> 0.585326, z -> -0.639858}}
>
> Although the final {x,y,z} is always normalized, the
> trial values are not, so we must normalize them manually.
>


Maybe I am missing something, but this seems wrong to me. The "great  
circle" distance between two points on the unit sphere is simply the  
solid angle between their respective postition vectors. Now, s.{x,y,z}  
gives the cosines of the angles between the position vectors of the  
points of the set s and the point {x,y,z}  so I think what you should  
be maximizing the sum of Abs[ArcCos[s.{x,y,z}]]. So with the same data  
as above I would compute:

  NMaximize[{Tr at Abs[ArcCos[s.{x, y, z}]],
   x^2 + y^2 + z^2 == 1}, {x, y, z}]

{10.8542,{x->-0.750877,y->0.0409026,z->-0.659196}}

(which is not one of the points of the set s)

while your approach gives:

NMaximize[{Tr@Log[Abs[1 - s.{x, y, z}]],
   x^2 + y^2 + z^2 == 1}, {x, y, z}]

  {2.00971,{x->-0.497972,y->0.585326,z->-0.639858}}

?

Andrzej Kozlowski


  • Prev by Date: Re: Suggestions on how to use standard engineering symbols in Mathematica which conflict with Mathematica own symbols?
  • Next by Date: Re: Text cell formating blues. LineBreakWithin, PageWidth, WordWrapping
  • Previous by thread: Re: Point on sphere greatest distance from given points
  • Next by thread: Re: Point on sphere greatest distance from given points