Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #144761

Re: Choosing a random point on a sphere surface

Subject Re: Choosing a random point on a sphere surface
Newsgroups comp.lang.c
References <random-sphere-20190610162901@ram.dialup.fu-berlin.de> <h4XLE.29681$6X.21034@fx43.iad> <ln4l4vr3ie.fsf@kst-u.example.com> <qdpo39$mto$1@dont-email.me>
From Clifford Heath <no.spam@please.net>
Message-ID <RPZLE.10870$t_3.5075@fx18.iad> (permalink)
Date 2019-06-12 12:54 +1000

Show all headers | View raw


On 12/6/19 12:30 pm, James Kuyper wrote:
> On 6/11/19 9:33 PM, Keith Thompson wrote:
>> Clifford Heath <no.spam@please.net> writes:
> ...
>>> I just came up with a very nice alternate way to uniformly choose a
>>> point on a unit sphere, with arbitrary granularity. Use a hierarchical
>>> triangular mesh with a random binary bit-string of 3+2n bits. Convert
>>> the HTM value into your chosen coordinate system, job done.
>>>
>>> HTM is a generalised coordinate system for points on the globe, based on
>>> an iterated triangular subdivision of the sides of an octahedron.
>>>
>>> <http://www.skyserver.org/htm/>
>>> <https://www.microsoft.com/en-us/research/publication/indexing-the-sphere-with-the-hierarchical-triangular-mesh/>
>>
>> I don't believe the selection is uniform.
>>
>> Quoting from your second link (emphasis added):
>>
>>      We describe a method to subdivide the surface of a sphere into
>>      spherical triangles of similar, *but not identical*, shapes
>>      and sizes.
>>
>> We start with the surface of the sphere partitioned into 8 identical
>> spherical triangles, with 90-degree vertices.  Considering one
>> of the 8 triangles, we draw great circle segments connecting the
>> midpoints of the edges, partitioning it into 4 smaller triangles.
>> I believe the outer 3 triangles are congruent to each other, but
>> the central one is not.
>>
>> It looks like a useful way to define a coordinate system on the
>> surface of a sphere, but it doesn't produce equal-area triangles
>> (and it's not intended to).
>>
>> I don't quite have the math to confirm or refute this.  Anyone else?
> 
> The document itself says that, at any given level of sub-division, the
> biggest triangles have roughly twice the area of the smallest triangles,
> so it's definitely not a way to produce a spherically uniform set of points.

Hmmm ok, that's a nuisance. Not true at the root octahedron of course, 
but after that it makes sense. I wonder if there's a way to skew the 
subdivision to triangles of equal area? That would probably require 
trig, I assume.

Still, it has some very useful properties, such as in a geospatial tree 
for clustering objects by locality, so perhaps some here would find it 
useful.

Clifford Heath.

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Choosing a random point on a sphere surface Clifford Heath <no.spam@please.net> - 2019-06-12 09:47 +1000
  Re: Choosing a random point on a sphere surface Keith Thompson <kst-u@mib.org> - 2019-06-11 18:33 -0700
    Re: Choosing a random point on a sphere surface James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-06-11 22:30 -0400
      Re: Choosing a random point on a sphere surface Clifford Heath <no.spam@please.net> - 2019-06-12 12:54 +1000
      Re: Choosing a random point on a sphere surface "Chris M. Thomasson" <invalid_chris_thomasson_invalid@invalid.com> - 2019-06-12 00:42 -0700
  Re: Choosing a random point on a sphere surface fir <profesor.fir@gmail.com> - 2019-06-18 11:21 -0700

csiph-web