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


Groups > comp.lang.c > #144758

Re: Choosing a random point on a sphere surface

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: Choosing a random point on a sphere surface
Date 2019-06-11 18:33 -0700
Organization None to speak of
Message-ID <ln4l4vr3ie.fsf@kst-u.example.com> (permalink)
References <random-sphere-20190610162901@ram.dialup.fu-berlin.de> <h4XLE.29681$6X.21034@fx43.iad>

Show all headers | View raw


Clifford Heath <no.spam@please.net> writes:
> On 11/6/19 1:54 am, Stefan Ram wrote:
>>    The following picture shows a unit ball (sphere) with a width
>>    and a height of «1».
>
> 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?

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Will write code for food.
void Void(void) { Void(); } /* The recursive call of the void */

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