sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Geosphere?

    Scheduled Pinned Locked Moved Developers' Forum
    15 Posts 6 Posters 803 Views 6 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • thomthomT Offline
      thomthom
      last edited by

      How do you calculate a set of points on a sphere which is evenly distributed from each other?

      Thomas Thomassen β€” SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        Best I can find is: http://en.nicoptere.net/?p=12 - actionscript based on this: http://www.math.niu.edu/~rusin/known-math/96/repulsion
        But I'm not making a whole lot sense out of it. The code doesn't have much commenting...

        Thomas Thomassen β€” SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

        1 Reply Last reply Reply Quote 0
        • pilouP Offline
          pilou
          last edited by

          A sphere with a center (x0,y0,z0) with diameter r
          has all points x,y,z like

          http://upload.wikimedia.org/math/3/3/0/33031c82e871501422b05455c81d2680.png

          with

          http://upload.wikimedia.org/math/e/b/9/eb91f8174391d023015dedf9beb94e5d.png

          http://upload.wikimedia.org/math/9/0/1/9011474548ae3216019a280ff95d25a3.png
          = Latitude

          http://upload.wikimedia.org/math/1/9/6/1964adc54d7dc608fd9f63a46cae422b.png
          = longitude

          Frenchy Pilou
          Is beautiful that please without concept!
          My Little site :)

          1 Reply Last reply Reply Quote 0
          • thomthomT Offline
            thomthom
            last edited by

            Isn't that a sphere with poles? The points would not be evenly spaced.

            sphere.png
            I'm looking to generate the points for the sphere on the right.

            Thomas Thomassen β€” SketchUp Monkey & Coding addict
            List of my plugins and link to the CookieWare fund

            1 Reply Last reply Reply Quote 0
            • T Offline
              tml
              last edited by

              @thomthom said:

              I'm looking to generate the points for the sphere on the right.

              Start with a octahedron, divide each edge into half and thus each face into four equal smaller triangles, move the new vertices to the desired radius, repeat.

              1 Reply Last reply Reply Quote 0
              • T Offline
                tml
                last edited by

                Note that the above results in just a fairly nice approximation, though. (And I don't know if it matches the subdivision used in your example image.) Only for the (not really sphere-like, as they have so few faces) Platonic solids are the vertices in a strict sense evenly distributed, though. See http://www.cgafaq.info/wiki/Evenly_distributed_points_on_sphere and especially http://www.math.niu.edu/~rusin/known-math/95/sphere.faq .

                1 Reply Last reply Reply Quote 0
                • thomthomT Offline
                  thomthom
                  last edited by

                  Approximation is ok. Just just want to take a fixed number of points and distribute them approximately evenly. Doesn't matter if they need to be rounded to a number that fit some geometric restriction.

                  Thanks for the links - I'll look into them.

                  Thomas Thomassen β€” SketchUp Monkey & Coding addict
                  List of my plugins and link to the CookieWare fund

                  1 Reply Last reply Reply Quote 0
                  • thomthomT Offline
                    thomthom
                    last edited by

                    Excellent - the spiral methods works great for my use! πŸ‘

                    Thomas Thomassen β€” SketchUp Monkey & Coding addict
                    List of my plugins and link to the CookieWare fund

                    1 Reply Last reply Reply Quote 0
                    • AdamBA Offline
                      AdamB
                      last edited by

                      Its pretty common to subdivide a cube and then project onto a sphere.

                      If you want evenly distributed but not a regular mesh, you could use a Hammersley point set.

                      Developer of LightUp Click for website

                      1 Reply Last reply Reply Quote 0
                      • thomthomT Offline
                        thomthom
                        last edited by

                        @adamb said:

                        Its pretty common to subdivide a cube and then project onto a sphere.

                        Would that give a even-ish distribution?

                        @adamb said:

                        If you want evenly distributed but not a regular mesh, you could use a Hammersley point set.

                        Thanks for the pointer - will look it up. πŸ‘

                        Thomas Thomassen β€” SketchUp Monkey & Coding addict
                        List of my plugins and link to the CookieWare fund

                        1 Reply Last reply Reply Quote 0
                        • david_hD Offline
                          david_h
                          last edited by

                          @unknownuser said:

                          A sphere with a center (x0,y0,z0) with diameter r
                          has all points x,y,z like

                          http://upload.wikimedia.org/math/3/3/0/33031c82e871501422b05455c81d2680.png

                          with

                          http://upload.wikimedia.org/math/e/b/9/eb91f8174391d023015dedf9beb94e5d.png

                          http://upload.wikimedia.org/math/9/0/1/9011474548ae3216019a280ff95d25a3.png
                          = Latitude

                          http://upload.wikimedia.org/math/1/9/6/1964adc54d7dc608fd9f63a46cae422b.png
                          = longitude

                          That is just how I would do it! πŸ˜’ πŸ’š

                          If I make it look easy...It is probably easy

                          1 Reply Last reply Reply Quote 0
                          • pilouP Offline
                            pilou
                            last edited by

                            Me too πŸ˜„

                            Frenchy Pilou
                            Is beautiful that please without concept!
                            My Little site :)

                            1 Reply Last reply Reply Quote 0
                            • thomthomT Offline
                              thomthom
                              last edited by

                              Google are really quick to index this site!
                              I did a search for "Hammersley point set sphere" and this thread came up as #3 already. πŸ˜’

                              Thomas Thomassen β€” SketchUp Monkey & Coding addict
                              List of my plugins and link to the CookieWare fund

                              1 Reply Last reply Reply Quote 0
                              • mitcorbM Offline
                                mitcorb
                                last edited by

                                Not busy enough elsewhere, eh tml?
                                Thank you for your talents, also.

                                I take the slow, deliberate approach in my aimless wandering.

                                1 Reply Last reply Reply Quote 0
                                • AdamBA Offline
                                  AdamB
                                  last edited by

                                  There you go.

                                  http://forums.sketchucation.com/viewtopic.php?f=180&t=30694&p=269864#p269864

                                  Developer of LightUp Click for website

                                  1 Reply Last reply Reply Quote 0
                                  • 1 / 1
                                  • First post
                                    Last post
                                  Buy SketchPlus
                                  Buy SUbD
                                  Buy WrapR
                                  Buy eBook
                                  Buy Modelur
                                  Buy Vertex Tools
                                  Buy SketchCuisine
                                  Buy FormFonts

                                  Advertisement