Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Subdividiving an icosahedron; determing spherical coordinates for a divided point

  1. Feb 9, 2007 #1
    What no geometry subforum? :smile:

    Well, anyway, here is my problem. I am writing some software that uses geodesic grids. Here is a reference to what I am talking about:


    The problem I see is that every algorithm says 'Subdivide the icosahedron and project the points outward toward the sphere.' This is straightforward to implement, but the problem is I am planning on generating grids of millions of cells, and am trying to cut down on the storage. Storing 3 32-bit coordinates for each cell would be a big waste of space. So therefore what I need is a closed-form solution to this problem. The cells are ordered such that they are divided into 5 domains like the following:


    So what I need is a function that does this map(n, i, j) -> (theta, psi), where n is the domain and i and j are indices of the square array, and theta and psi are the spherical coordinates (to simplify things, I assume the radius rho is 1)

    If the icosahedron is oriented so that two of its 'opposite' vertices(two vertices that are the furthest they can be from each other) lie on the the north and south poles, then generating the vertices along a "principal edge" emanating from the poles seems to be easy, since either theta or psi will remain unchanged and the other "stepped' by a fundamental angle (72 degrees for theta and ~63 degrees for psi) to get all the vertices that lie on that edge.

    Where I encoutner a tough math problem though, is when you have two semi-arbitrary points, say with coordinates (theta_1, psi_1) and (theta_2, psi_2) (omitting rho b/c it is always 1). The point 'in-between' these two points, that lies on the sphere with radius 1, can in theory be obtained by calculate the angle between the two points and dividing it by 2 and projecting it out to a line that contains the point. So the way to do that is to find the magnitude of the vector cross product of the two points, and divide by product of the magnitudes of the two vectors (again 1) which gives you the sin of the angle.

    The problem is that when I convert to cartesian coordinates and back to sphereical, I end up with a huge algebraic mess that I can't seem to simplify.

    So I guess my problem is two fold

    1) Is there a closed-form solution for calculating the points on a repeatedly subdivided geodesic grid?

    2) Is there a relatively simple formula for determing the spherical coordinates of the point that lies between (1, theta_1, psi_1) and (1, theta_2, psi_2) on the unit sphere?
    Last edited by a moderator: Apr 22, 2017
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted