Is there a way to generate uniformly distributed points on a sphere from a fixed amount of random real numbers per point? [duplicate] Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)How to generate random points on a sphere?Is the Fibonacci lattice the very best way to evenly distribute N points on a sphere? So far it seems that it is the best?How to find a random axis or unit vector in 3D?Picking random points in the volume of sphere with uniform probabilityIs a sphere a closed set?Algorithm to generate random points in n-Sphere?Sampling on Axis-Aligned Spherical QuadRandom 3D points uniformly distributed on an ellipse shaped window of a sphereCompensating for distortion when projecting a 2D texture onto a sphereGenerate Uniformly Random Points on a Transformed SphereFind the relative radial position of a point within an ellipsoidGenerate uniformly distributed points in n-dimensional sphere

What would be the ideal power source for a cybernetic eye?

Can a non-EU citizen traveling with me come with me through the EU passport line?

Why is "Captain Marvel" translated as male in Portugal?

What makes black pepper strong or mild?

List *all* the tuples!

Does polymorph use a PC’s CR or its level?

What does the "x" in "x86" represent?

Is there a documented rationale why the House Ways and Means chairman can demand tax info?

What does '1 unit of lemon juice' mean in a grandma's drink recipe?

Letter Boxed validator

Check which numbers satisfy the condition [A*B*C = A! + B! + C!]

How do I mention the quality of my school without bragging

I am not a queen, who am I?

What is this single-engine low-wing propeller plane?

WAN encapsulation

ListPlot join points by nearest neighbor rather than order

Should I use Javascript Classes or Apex Classes in Lightning Web Components?

Is there a Spanish version of "dot your i's and cross your t's" that includes the letter 'ñ'?

Is it true to say that an hosting provider's DNS server is what links the entire hosting environment to ICANN?

Why is "Consequences inflicted." not a sentence?

How much radiation do nuclear physics experiments expose researchers to nowadays?

Is a manifold-with-boundary with given interior and non-empty boundary essentially unique?

"Seemed to had" is it correct?

How to deal with a team lead who never gives me credit?



Is there a way to generate uniformly distributed points on a sphere from a fixed amount of random real numbers per point? [duplicate]



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)How to generate random points on a sphere?Is the Fibonacci lattice the very best way to evenly distribute N points on a sphere? So far it seems that it is the best?How to find a random axis or unit vector in 3D?Picking random points in the volume of sphere with uniform probabilityIs a sphere a closed set?Algorithm to generate random points in n-Sphere?Sampling on Axis-Aligned Spherical QuadRandom 3D points uniformly distributed on an ellipse shaped window of a sphereCompensating for distortion when projecting a 2D texture onto a sphereGenerate Uniformly Random Points on a Transformed SphereFind the relative radial position of a point within an ellipsoidGenerate uniformly distributed points in n-dimensional sphere










16












$begingroup$



This question already has an answer here:



  • How to generate random points on a sphere?

    6 answers



The obvious solution of Lattitude & Longitude doesn't work because it generates points more densely near the poles, and the other thing I came up with (Pick a random point in the unit cube, if it's in the sphere map it to the surface, and restart if it's outside) doesn't always find a point within a fixed number of tries.










share|cite|improve this question











$endgroup$



marked as duplicate by Eric Towers, Lord Shark the Unknown, blub, José Carlos Santos, mrtaurho 2 days ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

















  • $begingroup$
    So what you want is a uniform distribution. It would be helpful to state this explicitly.
    $endgroup$
    – robjohn
    Apr 12 at 0:30






  • 6




    $begingroup$
    Distribute longitude uniformly and the sine of the latitude uniformly. Then the distribution of points on the sphere will be uniform.
    $endgroup$
    – robjohn
    Apr 12 at 0:32










  • $begingroup$
    @robjohn thank you, you're right that I forgot to specify that.
    $endgroup$
    – The Zach Man
    Apr 12 at 2:50










  • $begingroup$
    "A uniformly distributed point" is an oxymoron, is it not? If not, then I suggest (r,theta,phi) = (1,0,0), which was drawn from my secret uniform distribution :P
    $endgroup$
    – Marius Ladegård Meyer
    Apr 12 at 7:54










  • $begingroup$
    @MariusLadegårdMeyer: okay, I've adjusted the title further. I had tried to make as small a change that would make the uniform distribution clear. Of course, now the idea of a fixed number of random numbers per point is muddied.
    $endgroup$
    – robjohn
    Apr 12 at 14:43















16












$begingroup$



This question already has an answer here:



  • How to generate random points on a sphere?

    6 answers



The obvious solution of Lattitude & Longitude doesn't work because it generates points more densely near the poles, and the other thing I came up with (Pick a random point in the unit cube, if it's in the sphere map it to the surface, and restart if it's outside) doesn't always find a point within a fixed number of tries.










share|cite|improve this question











$endgroup$



marked as duplicate by Eric Towers, Lord Shark the Unknown, blub, José Carlos Santos, mrtaurho 2 days ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

















  • $begingroup$
    So what you want is a uniform distribution. It would be helpful to state this explicitly.
    $endgroup$
    – robjohn
    Apr 12 at 0:30






  • 6




    $begingroup$
    Distribute longitude uniformly and the sine of the latitude uniformly. Then the distribution of points on the sphere will be uniform.
    $endgroup$
    – robjohn
    Apr 12 at 0:32










  • $begingroup$
    @robjohn thank you, you're right that I forgot to specify that.
    $endgroup$
    – The Zach Man
    Apr 12 at 2:50










  • $begingroup$
    "A uniformly distributed point" is an oxymoron, is it not? If not, then I suggest (r,theta,phi) = (1,0,0), which was drawn from my secret uniform distribution :P
    $endgroup$
    – Marius Ladegård Meyer
    Apr 12 at 7:54










  • $begingroup$
    @MariusLadegårdMeyer: okay, I've adjusted the title further. I had tried to make as small a change that would make the uniform distribution clear. Of course, now the idea of a fixed number of random numbers per point is muddied.
    $endgroup$
    – robjohn
    Apr 12 at 14:43













16












16








16


5



$begingroup$



This question already has an answer here:



  • How to generate random points on a sphere?

    6 answers



The obvious solution of Lattitude & Longitude doesn't work because it generates points more densely near the poles, and the other thing I came up with (Pick a random point in the unit cube, if it's in the sphere map it to the surface, and restart if it's outside) doesn't always find a point within a fixed number of tries.










share|cite|improve this question











$endgroup$





This question already has an answer here:



  • How to generate random points on a sphere?

    6 answers



The obvious solution of Lattitude & Longitude doesn't work because it generates points more densely near the poles, and the other thing I came up with (Pick a random point in the unit cube, if it's in the sphere map it to the surface, and restart if it's outside) doesn't always find a point within a fixed number of tries.





This question already has an answer here:



  • How to generate random points on a sphere?

    6 answers







geometry






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Apr 12 at 14:44









robjohn

271k27316643




271k27316643










asked Apr 12 at 0:22









The Zach ManThe Zach Man

1709




1709




marked as duplicate by Eric Towers, Lord Shark the Unknown, blub, José Carlos Santos, mrtaurho 2 days ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by Eric Towers, Lord Shark the Unknown, blub, José Carlos Santos, mrtaurho 2 days ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.













  • $begingroup$
    So what you want is a uniform distribution. It would be helpful to state this explicitly.
    $endgroup$
    – robjohn
    Apr 12 at 0:30






  • 6




    $begingroup$
    Distribute longitude uniformly and the sine of the latitude uniformly. Then the distribution of points on the sphere will be uniform.
    $endgroup$
    – robjohn
    Apr 12 at 0:32










  • $begingroup$
    @robjohn thank you, you're right that I forgot to specify that.
    $endgroup$
    – The Zach Man
    Apr 12 at 2:50










  • $begingroup$
    "A uniformly distributed point" is an oxymoron, is it not? If not, then I suggest (r,theta,phi) = (1,0,0), which was drawn from my secret uniform distribution :P
    $endgroup$
    – Marius Ladegård Meyer
    Apr 12 at 7:54










  • $begingroup$
    @MariusLadegårdMeyer: okay, I've adjusted the title further. I had tried to make as small a change that would make the uniform distribution clear. Of course, now the idea of a fixed number of random numbers per point is muddied.
    $endgroup$
    – robjohn
    Apr 12 at 14:43
















  • $begingroup$
    So what you want is a uniform distribution. It would be helpful to state this explicitly.
    $endgroup$
    – robjohn
    Apr 12 at 0:30






  • 6




    $begingroup$
    Distribute longitude uniformly and the sine of the latitude uniformly. Then the distribution of points on the sphere will be uniform.
    $endgroup$
    – robjohn
    Apr 12 at 0:32










  • $begingroup$
    @robjohn thank you, you're right that I forgot to specify that.
    $endgroup$
    – The Zach Man
    Apr 12 at 2:50










  • $begingroup$
    "A uniformly distributed point" is an oxymoron, is it not? If not, then I suggest (r,theta,phi) = (1,0,0), which was drawn from my secret uniform distribution :P
    $endgroup$
    – Marius Ladegård Meyer
    Apr 12 at 7:54










  • $begingroup$
    @MariusLadegårdMeyer: okay, I've adjusted the title further. I had tried to make as small a change that would make the uniform distribution clear. Of course, now the idea of a fixed number of random numbers per point is muddied.
    $endgroup$
    – robjohn
    Apr 12 at 14:43















$begingroup$
So what you want is a uniform distribution. It would be helpful to state this explicitly.
$endgroup$
– robjohn
Apr 12 at 0:30




$begingroup$
So what you want is a uniform distribution. It would be helpful to state this explicitly.
$endgroup$
– robjohn
Apr 12 at 0:30




6




6




$begingroup$
Distribute longitude uniformly and the sine of the latitude uniformly. Then the distribution of points on the sphere will be uniform.
$endgroup$
– robjohn
Apr 12 at 0:32




$begingroup$
Distribute longitude uniformly and the sine of the latitude uniformly. Then the distribution of points on the sphere will be uniform.
$endgroup$
– robjohn
Apr 12 at 0:32












$begingroup$
@robjohn thank you, you're right that I forgot to specify that.
$endgroup$
– The Zach Man
Apr 12 at 2:50




$begingroup$
@robjohn thank you, you're right that I forgot to specify that.
$endgroup$
– The Zach Man
Apr 12 at 2:50












$begingroup$
"A uniformly distributed point" is an oxymoron, is it not? If not, then I suggest (r,theta,phi) = (1,0,0), which was drawn from my secret uniform distribution :P
$endgroup$
– Marius Ladegård Meyer
Apr 12 at 7:54




$begingroup$
"A uniformly distributed point" is an oxymoron, is it not? If not, then I suggest (r,theta,phi) = (1,0,0), which was drawn from my secret uniform distribution :P
$endgroup$
– Marius Ladegård Meyer
Apr 12 at 7:54












$begingroup$
@MariusLadegårdMeyer: okay, I've adjusted the title further. I had tried to make as small a change that would make the uniform distribution clear. Of course, now the idea of a fixed number of random numbers per point is muddied.
$endgroup$
– robjohn
Apr 12 at 14:43




$begingroup$
@MariusLadegårdMeyer: okay, I've adjusted the title further. I had tried to make as small a change that would make the uniform distribution clear. Of course, now the idea of a fixed number of random numbers per point is muddied.
$endgroup$
– robjohn
Apr 12 at 14:43










5 Answers
5






active

oldest

votes


















32












$begingroup$

The Lambert cylindrical equal area projection maps the sphere to a cylinder, area to equal area. It is easy to generate a uniform distribution on a cylinder. Simply map it back to the sphere.



For $(u_1,u_2)$ uniform on $[0,1]^2$, either



$mathrmlat=arcsin(2u_1-1),mathrmlon=2pi u_2$



or



$z=2u_1-1,x=sqrt1-z^2cos(2pi u_2),y=sqrt1-z^2sin(2pi u_2)$






share|cite|improve this answer









$endgroup$




















    19












    $begingroup$

    Your method, even though it doesn't finish in a fixed number of times, is a reasonable way to do it. Each trial succeeds with probability $fracpi6$, which is better than $frac12$: the average number of trials is less than $2$.



    Another standard method is to use the normal distribution. Generate $x, y, z$ independently from a standard normal distribution, then take the point $(x,y,z)$ and divide it by $sqrtx^2+y^2+z^2$ as you did for points inside the cube. The multivariate normal distribution is rotationally symmetric, so this will get you evenly distributed points on the sphere.



    (The Box–Muller transform is one way to generate normally distributed random numbers, and some versions of it do not use rejection sampling, so they can be done with a "fixed amount" of randomness.)






    share|cite|improve this answer









    $endgroup$




















      6












      $begingroup$


      Is there a way to generate uniformly distributed points on a sphere from a fixed amount of random real numbers per point?




      This Stack Overflow answer mentions the Fibonacci sphere algorithm, and the currently unanswered Math SE question Is the Fibonacci lattice the very best way to evenly distribute N points on a sphere? So far it seems that it is the best? contains several excellent links in the question and in comments.



      The method is deterministic, using either zero or one random number, no matter the number of points generated.



      Florida State University's John Burkardt's web page Fibonacci Spiral Grid on a Sphere provides some references and examples of code implementations.




      Edward Saff, Arno Kuijlaars,
      Distributing Many Points on a Sphere,
      The Mathematical Intelligencer,
      Volume 19, Number 1, 1997, pages 5-11.



      Richard Swinbank, James Purser,
      Fibonacci grids: A novel approach to global modelling,
      Quarterly Journal of the Royal Meteorological Society,
      Volume 132, Number 619, July 2006 Part B, pages 1769-1793.




      Extreme Learning's Evenly distributing points on a sphere addresses several criteria for judging the level of uniformity provided by different solutions, and describes the process of first generating a Fibonacci grid and then transforming it to a sphere.




      An example of these Fibonacci Grids is shown below. These points sets can be transformed to a well-known Fibonacci spirals via the transformation




      enter image description here



      I can't be sure it will be sufficiently uniform for you, but it certainly looks nice!



      enter image description here Source






      share|cite|improve this answer











      $endgroup$




















        4












        $begingroup$

        You can still use the longitude/latitude method. You just need to transform the latitude such that the probability of falling in any given latitude band is proportional to its surface area.



        The length of the circumference at a latitude, l, is proportional to cos(l). (0 at -90 degrees, max at the equator, 0 at +90 degrees). Therefore, by integrating we know that the total surface area between any two latitudes, l1 and l2, is proportional to sin(l2) - sin(l1).



        By inverting that, we arrive at a formula for transforming a [0, 1] uniform random variable (X) into a latitude such that any point on the sphere is equally likely to be selected:



        latitude = arcsin(2X - 1)





        share|cite|improve this answer








        New contributor




        user79126 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        $endgroup$




















          0












          $begingroup$

          Your second method can be improved in this way: Select the three coordinates (x, y, z) in a linear distribution from -1 to 1.



          If (y * y + z * z) > 1, select replacements for these two only. (You will only have to re-roll them 4-pi/4 (roughly 21.4%) of the time; average random numbers used is 1 + 8/pi = ~ 3.546.



          Keep x as it is, scale both y and z by sqrt((1 - x * x)/(y * y + z * z)).






          share|cite|improve this answer








          New contributor




          EvilSnack is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.






          $endgroup$



















            5 Answers
            5






            active

            oldest

            votes








            5 Answers
            5






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            32












            $begingroup$

            The Lambert cylindrical equal area projection maps the sphere to a cylinder, area to equal area. It is easy to generate a uniform distribution on a cylinder. Simply map it back to the sphere.



            For $(u_1,u_2)$ uniform on $[0,1]^2$, either



            $mathrmlat=arcsin(2u_1-1),mathrmlon=2pi u_2$



            or



            $z=2u_1-1,x=sqrt1-z^2cos(2pi u_2),y=sqrt1-z^2sin(2pi u_2)$






            share|cite|improve this answer









            $endgroup$

















              32












              $begingroup$

              The Lambert cylindrical equal area projection maps the sphere to a cylinder, area to equal area. It is easy to generate a uniform distribution on a cylinder. Simply map it back to the sphere.



              For $(u_1,u_2)$ uniform on $[0,1]^2$, either



              $mathrmlat=arcsin(2u_1-1),mathrmlon=2pi u_2$



              or



              $z=2u_1-1,x=sqrt1-z^2cos(2pi u_2),y=sqrt1-z^2sin(2pi u_2)$






              share|cite|improve this answer









              $endgroup$















                32












                32








                32





                $begingroup$

                The Lambert cylindrical equal area projection maps the sphere to a cylinder, area to equal area. It is easy to generate a uniform distribution on a cylinder. Simply map it back to the sphere.



                For $(u_1,u_2)$ uniform on $[0,1]^2$, either



                $mathrmlat=arcsin(2u_1-1),mathrmlon=2pi u_2$



                or



                $z=2u_1-1,x=sqrt1-z^2cos(2pi u_2),y=sqrt1-z^2sin(2pi u_2)$






                share|cite|improve this answer









                $endgroup$



                The Lambert cylindrical equal area projection maps the sphere to a cylinder, area to equal area. It is easy to generate a uniform distribution on a cylinder. Simply map it back to the sphere.



                For $(u_1,u_2)$ uniform on $[0,1]^2$, either



                $mathrmlat=arcsin(2u_1-1),mathrmlon=2pi u_2$



                or



                $z=2u_1-1,x=sqrt1-z^2cos(2pi u_2),y=sqrt1-z^2sin(2pi u_2)$







                share|cite|improve this answer












                share|cite|improve this answer



                share|cite|improve this answer










                answered Apr 12 at 2:34









                robjohnrobjohn

                271k27316643




                271k27316643





















                    19












                    $begingroup$

                    Your method, even though it doesn't finish in a fixed number of times, is a reasonable way to do it. Each trial succeeds with probability $fracpi6$, which is better than $frac12$: the average number of trials is less than $2$.



                    Another standard method is to use the normal distribution. Generate $x, y, z$ independently from a standard normal distribution, then take the point $(x,y,z)$ and divide it by $sqrtx^2+y^2+z^2$ as you did for points inside the cube. The multivariate normal distribution is rotationally symmetric, so this will get you evenly distributed points on the sphere.



                    (The Box–Muller transform is one way to generate normally distributed random numbers, and some versions of it do not use rejection sampling, so they can be done with a "fixed amount" of randomness.)






                    share|cite|improve this answer









                    $endgroup$

















                      19












                      $begingroup$

                      Your method, even though it doesn't finish in a fixed number of times, is a reasonable way to do it. Each trial succeeds with probability $fracpi6$, which is better than $frac12$: the average number of trials is less than $2$.



                      Another standard method is to use the normal distribution. Generate $x, y, z$ independently from a standard normal distribution, then take the point $(x,y,z)$ and divide it by $sqrtx^2+y^2+z^2$ as you did for points inside the cube. The multivariate normal distribution is rotationally symmetric, so this will get you evenly distributed points on the sphere.



                      (The Box–Muller transform is one way to generate normally distributed random numbers, and some versions of it do not use rejection sampling, so they can be done with a "fixed amount" of randomness.)






                      share|cite|improve this answer









                      $endgroup$















                        19












                        19








                        19





                        $begingroup$

                        Your method, even though it doesn't finish in a fixed number of times, is a reasonable way to do it. Each trial succeeds with probability $fracpi6$, which is better than $frac12$: the average number of trials is less than $2$.



                        Another standard method is to use the normal distribution. Generate $x, y, z$ independently from a standard normal distribution, then take the point $(x,y,z)$ and divide it by $sqrtx^2+y^2+z^2$ as you did for points inside the cube. The multivariate normal distribution is rotationally symmetric, so this will get you evenly distributed points on the sphere.



                        (The Box–Muller transform is one way to generate normally distributed random numbers, and some versions of it do not use rejection sampling, so they can be done with a "fixed amount" of randomness.)






                        share|cite|improve this answer









                        $endgroup$



                        Your method, even though it doesn't finish in a fixed number of times, is a reasonable way to do it. Each trial succeeds with probability $fracpi6$, which is better than $frac12$: the average number of trials is less than $2$.



                        Another standard method is to use the normal distribution. Generate $x, y, z$ independently from a standard normal distribution, then take the point $(x,y,z)$ and divide it by $sqrtx^2+y^2+z^2$ as you did for points inside the cube. The multivariate normal distribution is rotationally symmetric, so this will get you evenly distributed points on the sphere.



                        (The Box–Muller transform is one way to generate normally distributed random numbers, and some versions of it do not use rejection sampling, so they can be done with a "fixed amount" of randomness.)







                        share|cite|improve this answer












                        share|cite|improve this answer



                        share|cite|improve this answer










                        answered Apr 12 at 0:31









                        Misha LavrovMisha Lavrov

                        49.6k759109




                        49.6k759109





















                            6












                            $begingroup$


                            Is there a way to generate uniformly distributed points on a sphere from a fixed amount of random real numbers per point?




                            This Stack Overflow answer mentions the Fibonacci sphere algorithm, and the currently unanswered Math SE question Is the Fibonacci lattice the very best way to evenly distribute N points on a sphere? So far it seems that it is the best? contains several excellent links in the question and in comments.



                            The method is deterministic, using either zero or one random number, no matter the number of points generated.



                            Florida State University's John Burkardt's web page Fibonacci Spiral Grid on a Sphere provides some references and examples of code implementations.




                            Edward Saff, Arno Kuijlaars,
                            Distributing Many Points on a Sphere,
                            The Mathematical Intelligencer,
                            Volume 19, Number 1, 1997, pages 5-11.



                            Richard Swinbank, James Purser,
                            Fibonacci grids: A novel approach to global modelling,
                            Quarterly Journal of the Royal Meteorological Society,
                            Volume 132, Number 619, July 2006 Part B, pages 1769-1793.




                            Extreme Learning's Evenly distributing points on a sphere addresses several criteria for judging the level of uniformity provided by different solutions, and describes the process of first generating a Fibonacci grid and then transforming it to a sphere.




                            An example of these Fibonacci Grids is shown below. These points sets can be transformed to a well-known Fibonacci spirals via the transformation




                            enter image description here



                            I can't be sure it will be sufficiently uniform for you, but it certainly looks nice!



                            enter image description here Source






                            share|cite|improve this answer











                            $endgroup$

















                              6












                              $begingroup$


                              Is there a way to generate uniformly distributed points on a sphere from a fixed amount of random real numbers per point?




                              This Stack Overflow answer mentions the Fibonacci sphere algorithm, and the currently unanswered Math SE question Is the Fibonacci lattice the very best way to evenly distribute N points on a sphere? So far it seems that it is the best? contains several excellent links in the question and in comments.



                              The method is deterministic, using either zero or one random number, no matter the number of points generated.



                              Florida State University's John Burkardt's web page Fibonacci Spiral Grid on a Sphere provides some references and examples of code implementations.




                              Edward Saff, Arno Kuijlaars,
                              Distributing Many Points on a Sphere,
                              The Mathematical Intelligencer,
                              Volume 19, Number 1, 1997, pages 5-11.



                              Richard Swinbank, James Purser,
                              Fibonacci grids: A novel approach to global modelling,
                              Quarterly Journal of the Royal Meteorological Society,
                              Volume 132, Number 619, July 2006 Part B, pages 1769-1793.




                              Extreme Learning's Evenly distributing points on a sphere addresses several criteria for judging the level of uniformity provided by different solutions, and describes the process of first generating a Fibonacci grid and then transforming it to a sphere.




                              An example of these Fibonacci Grids is shown below. These points sets can be transformed to a well-known Fibonacci spirals via the transformation




                              enter image description here



                              I can't be sure it will be sufficiently uniform for you, but it certainly looks nice!



                              enter image description here Source






                              share|cite|improve this answer











                              $endgroup$















                                6












                                6








                                6





                                $begingroup$


                                Is there a way to generate uniformly distributed points on a sphere from a fixed amount of random real numbers per point?




                                This Stack Overflow answer mentions the Fibonacci sphere algorithm, and the currently unanswered Math SE question Is the Fibonacci lattice the very best way to evenly distribute N points on a sphere? So far it seems that it is the best? contains several excellent links in the question and in comments.



                                The method is deterministic, using either zero or one random number, no matter the number of points generated.



                                Florida State University's John Burkardt's web page Fibonacci Spiral Grid on a Sphere provides some references and examples of code implementations.




                                Edward Saff, Arno Kuijlaars,
                                Distributing Many Points on a Sphere,
                                The Mathematical Intelligencer,
                                Volume 19, Number 1, 1997, pages 5-11.



                                Richard Swinbank, James Purser,
                                Fibonacci grids: A novel approach to global modelling,
                                Quarterly Journal of the Royal Meteorological Society,
                                Volume 132, Number 619, July 2006 Part B, pages 1769-1793.




                                Extreme Learning's Evenly distributing points on a sphere addresses several criteria for judging the level of uniformity provided by different solutions, and describes the process of first generating a Fibonacci grid and then transforming it to a sphere.




                                An example of these Fibonacci Grids is shown below. These points sets can be transformed to a well-known Fibonacci spirals via the transformation




                                enter image description here



                                I can't be sure it will be sufficiently uniform for you, but it certainly looks nice!



                                enter image description here Source






                                share|cite|improve this answer











                                $endgroup$




                                Is there a way to generate uniformly distributed points on a sphere from a fixed amount of random real numbers per point?




                                This Stack Overflow answer mentions the Fibonacci sphere algorithm, and the currently unanswered Math SE question Is the Fibonacci lattice the very best way to evenly distribute N points on a sphere? So far it seems that it is the best? contains several excellent links in the question and in comments.



                                The method is deterministic, using either zero or one random number, no matter the number of points generated.



                                Florida State University's John Burkardt's web page Fibonacci Spiral Grid on a Sphere provides some references and examples of code implementations.




                                Edward Saff, Arno Kuijlaars,
                                Distributing Many Points on a Sphere,
                                The Mathematical Intelligencer,
                                Volume 19, Number 1, 1997, pages 5-11.



                                Richard Swinbank, James Purser,
                                Fibonacci grids: A novel approach to global modelling,
                                Quarterly Journal of the Royal Meteorological Society,
                                Volume 132, Number 619, July 2006 Part B, pages 1769-1793.




                                Extreme Learning's Evenly distributing points on a sphere addresses several criteria for judging the level of uniformity provided by different solutions, and describes the process of first generating a Fibonacci grid and then transforming it to a sphere.




                                An example of these Fibonacci Grids is shown below. These points sets can be transformed to a well-known Fibonacci spirals via the transformation




                                enter image description here



                                I can't be sure it will be sufficiently uniform for you, but it certainly looks nice!



                                enter image description here Source







                                share|cite|improve this answer














                                share|cite|improve this answer



                                share|cite|improve this answer








                                edited 2 days ago

























                                answered 2 days ago









                                uhohuhoh

                                6671718




                                6671718





















                                    4












                                    $begingroup$

                                    You can still use the longitude/latitude method. You just need to transform the latitude such that the probability of falling in any given latitude band is proportional to its surface area.



                                    The length of the circumference at a latitude, l, is proportional to cos(l). (0 at -90 degrees, max at the equator, 0 at +90 degrees). Therefore, by integrating we know that the total surface area between any two latitudes, l1 and l2, is proportional to sin(l2) - sin(l1).



                                    By inverting that, we arrive at a formula for transforming a [0, 1] uniform random variable (X) into a latitude such that any point on the sphere is equally likely to be selected:



                                    latitude = arcsin(2X - 1)





                                    share|cite|improve this answer








                                    New contributor




                                    user79126 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.






                                    $endgroup$

















                                      4












                                      $begingroup$

                                      You can still use the longitude/latitude method. You just need to transform the latitude such that the probability of falling in any given latitude band is proportional to its surface area.



                                      The length of the circumference at a latitude, l, is proportional to cos(l). (0 at -90 degrees, max at the equator, 0 at +90 degrees). Therefore, by integrating we know that the total surface area between any two latitudes, l1 and l2, is proportional to sin(l2) - sin(l1).



                                      By inverting that, we arrive at a formula for transforming a [0, 1] uniform random variable (X) into a latitude such that any point on the sphere is equally likely to be selected:



                                      latitude = arcsin(2X - 1)





                                      share|cite|improve this answer








                                      New contributor




                                      user79126 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                      Check out our Code of Conduct.






                                      $endgroup$















                                        4












                                        4








                                        4





                                        $begingroup$

                                        You can still use the longitude/latitude method. You just need to transform the latitude such that the probability of falling in any given latitude band is proportional to its surface area.



                                        The length of the circumference at a latitude, l, is proportional to cos(l). (0 at -90 degrees, max at the equator, 0 at +90 degrees). Therefore, by integrating we know that the total surface area between any two latitudes, l1 and l2, is proportional to sin(l2) - sin(l1).



                                        By inverting that, we arrive at a formula for transforming a [0, 1] uniform random variable (X) into a latitude such that any point on the sphere is equally likely to be selected:



                                        latitude = arcsin(2X - 1)





                                        share|cite|improve this answer








                                        New contributor




                                        user79126 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                        Check out our Code of Conduct.






                                        $endgroup$



                                        You can still use the longitude/latitude method. You just need to transform the latitude such that the probability of falling in any given latitude band is proportional to its surface area.



                                        The length of the circumference at a latitude, l, is proportional to cos(l). (0 at -90 degrees, max at the equator, 0 at +90 degrees). Therefore, by integrating we know that the total surface area between any two latitudes, l1 and l2, is proportional to sin(l2) - sin(l1).



                                        By inverting that, we arrive at a formula for transforming a [0, 1] uniform random variable (X) into a latitude such that any point on the sphere is equally likely to be selected:



                                        latitude = arcsin(2X - 1)






                                        share|cite|improve this answer








                                        New contributor




                                        user79126 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                        Check out our Code of Conduct.









                                        share|cite|improve this answer



                                        share|cite|improve this answer






                                        New contributor




                                        user79126 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                        Check out our Code of Conduct.









                                        answered Apr 12 at 9:59









                                        user79126user79126

                                        411




                                        411




                                        New contributor




                                        user79126 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                        Check out our Code of Conduct.





                                        New contributor





                                        user79126 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                        Check out our Code of Conduct.






                                        user79126 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                        Check out our Code of Conduct.





















                                            0












                                            $begingroup$

                                            Your second method can be improved in this way: Select the three coordinates (x, y, z) in a linear distribution from -1 to 1.



                                            If (y * y + z * z) > 1, select replacements for these two only. (You will only have to re-roll them 4-pi/4 (roughly 21.4%) of the time; average random numbers used is 1 + 8/pi = ~ 3.546.



                                            Keep x as it is, scale both y and z by sqrt((1 - x * x)/(y * y + z * z)).






                                            share|cite|improve this answer








                                            New contributor




                                            EvilSnack is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                            Check out our Code of Conduct.






                                            $endgroup$

















                                              0












                                              $begingroup$

                                              Your second method can be improved in this way: Select the three coordinates (x, y, z) in a linear distribution from -1 to 1.



                                              If (y * y + z * z) > 1, select replacements for these two only. (You will only have to re-roll them 4-pi/4 (roughly 21.4%) of the time; average random numbers used is 1 + 8/pi = ~ 3.546.



                                              Keep x as it is, scale both y and z by sqrt((1 - x * x)/(y * y + z * z)).






                                              share|cite|improve this answer








                                              New contributor




                                              EvilSnack is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                              Check out our Code of Conduct.






                                              $endgroup$















                                                0












                                                0








                                                0





                                                $begingroup$

                                                Your second method can be improved in this way: Select the three coordinates (x, y, z) in a linear distribution from -1 to 1.



                                                If (y * y + z * z) > 1, select replacements for these two only. (You will only have to re-roll them 4-pi/4 (roughly 21.4%) of the time; average random numbers used is 1 + 8/pi = ~ 3.546.



                                                Keep x as it is, scale both y and z by sqrt((1 - x * x)/(y * y + z * z)).






                                                share|cite|improve this answer








                                                New contributor




                                                EvilSnack is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                Check out our Code of Conduct.






                                                $endgroup$



                                                Your second method can be improved in this way: Select the three coordinates (x, y, z) in a linear distribution from -1 to 1.



                                                If (y * y + z * z) > 1, select replacements for these two only. (You will only have to re-roll them 4-pi/4 (roughly 21.4%) of the time; average random numbers used is 1 + 8/pi = ~ 3.546.



                                                Keep x as it is, scale both y and z by sqrt((1 - x * x)/(y * y + z * z)).







                                                share|cite|improve this answer








                                                New contributor




                                                EvilSnack is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                Check out our Code of Conduct.









                                                share|cite|improve this answer



                                                share|cite|improve this answer






                                                New contributor




                                                EvilSnack is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                Check out our Code of Conduct.









                                                answered 2 days ago









                                                EvilSnackEvilSnack

                                                1012




                                                1012




                                                New contributor




                                                EvilSnack is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                Check out our Code of Conduct.





                                                New contributor





                                                EvilSnack is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                Check out our Code of Conduct.






                                                EvilSnack is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                Check out our Code of Conduct.













                                                    Popular posts from this blog

                                                    Distance measures on a map of a game The 2019 Stack Overflow Developer Survey Results Are Inmin distance in a graphShortest distance path on contour plotHow to plot a tilted map?Finding points outside of a diskDelaunay link distanceAnnulus from GeoDisks: drawing a ring on a mapNegative Correlation DistanceFind distance along a path (GPS coordinates)Finding position at given distance in a GeoPathMathematics behind distance estimation using camera

                                                    How to get a smooth, uniform ParametricPlot of a 2D Region?How to plot a complicated Region?How to exclude a region from ParametricPlotHow discretize a region placing vertices on a specific non-uniform gridHow to transform a Plot or a ParametricPlot into a RegionHow can I get a smooth plot of a bounded region?Smooth ParametricPlot3D with RegionFunction?Smooth border of a region ParametricPlotSmooth region boundarySmooth region plot from list of pointsGet minimum y of a certain x in a region

                                                    Genealogie vun de Merowenger Vum Merowech bis zum Chilperich I. | Navigatiounsmenü