Algorithm for a geodesic sphere

后端 未结 4 1141
执念已碎
执念已碎 2021-02-04 20:29

I have to make a sphere out of smaller uniformely distributed balls. I think the optimal way is to build a triangle-based geodesic sphere and use the vertices as the middle poin

4条回答
  •  余生分开走
    2021-02-04 21:19

    It depends on the number of triangles you want the sphere to have. You can potentially have infinite resolution.

    First focus on creating a dome, you can double it later by taking the negative coordinates of your upper dome. You will generate the sphere by interlocking rows of triangles. Your triangles are equilateral, so decide on a length. Divide 2(pi)r by the number of triangles you want to be on the bottom row of the dome. This will be the length of each side of each triangle.

    Next you need to create a concentric circle that intersects the surface of the sphere. Between this circle and the base of the dome will be your first row. You will need to find the angle that each triangle is tilted. (I will post later when I figure that out)

    Repeat process for each concentric circle (generating row) until the height of the row * the number of rows approximately equals the 2(pi)r that u started with.

    I will try to program it later if I get a chance. You could also try posting in the Math forum.

提交回复
热议问题