Announcement

Collapse
No announcement yet.

Modelling a sphere

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    sent you an email

    Comment


    • #32
      There is no single regular geometric shape that will perfectly tile a sphere. This is because Pi is an irrational number.

      If you want to approximately tile a sphere then you need to decide on a level of resolution that is acceptable.

      If you want to use squares, and you can accept a cube as being a close representation of a sphere then all you need is six squares. Ofcourse a sphere that is tangent to the corners of that cube (so that it inscribes it) will have a surface area that is 4.7% larger than the cube.

      An icosahedron is a 20 sided figure made up of equilateral triangles, it is the largest regular platonic solid. It is possible to begin tiling an 'approximation' of a sphere based on the icosahedron. Imagine a sphere that inscribes an icosahedron. Imagine a line from the center of the sphere through the center of the face of one of the triangles, the point defined by the intersection of this line and the surface of the sphere can be used to generate three new triangles that use the base of the original triangle as their base and the new point as their opposite vertices. By doing this, a new polyhedron is created with 60 faces.

      repeated iterations yield polyhedra with 180, 540, 1620 faces etc. By the 10th iteration a figure is created with 1,180,980 triangles.

      Now, a little sidetrip: A chessboard looks flat, a basketball court looks flat, a factory floor looks flat. At a certain scale the curvature of the earth is negligible. What is this scale? The engineering scale says that the curvature of the earth over a distance of 50 meters is negligible.

      So, how many triangles are needed to tile the earth?

      About 630,000,000,000 triangles with 40 meter sides will tile the earth. Ofcourse the careful reader will notice that local variations in topography such as canyons, mountains, and rivers will start interfering with a tiling pattern on this scale. Secondarily, expecting a computer game to track several variables for each of those triangles every turn is asking too much.

      What is the best answer? I don't know. But for the sake of simplicity, the torroidoil earth presented in CIV is going to be the best thing available until serious advances in hardware permit the 6.3tera triangle spherical earth model.

      Eithe

      Comment


      • #33
        Sample code

        is subversion's offer for source code still valid? If it is, please do send it to me (I can't use private messages yet, nor can I post mail addresses), but lets figure something out.

        I would love to see C# code for it.

        I am planning to create weather simulation (not forecaster) and would like to get some sphere handling help.

        Comment

        Working...
        X