|
From: Andrew S. <str...@as...> - 2009-04-15 15:48:36
|
Jeff Whitaker wrote: > Zane Selvans wrote: >> Is there a method built into Numpy/SciPy or friends that will generate >> a set of N points evenly (regularly - not randomly) sampling the >> entire surface of a sphere? I imagine people doing GCMs and other >> geoscience in spherical coordinates have to do this pretty frequently, >> so I'm sure someone's written it in Python somewhere. My searches >> aren't turning anything up immediately though. >> >> Thanks, >> Zane >> >> > Zane: This one has puzzled mathematicians for centuries - there is no > evenly spaced set of points on a sphere. The golden section spiral (or > fibonacci) points are easy to code (see code below), but don't form the > vertices of polygons. For modelling, where you need the points to be > vertices of polygons, hexagonal icosahedral grid are typically used (see > http://kiwi.atmos.colostate.edu/BUGS/geodesic/), but they are tricky to > compute (I don't have any python code handy). I'm attaching some code I wrote to subdivide and icosahedron for tiling a sphere with hexagons (and the occasional pentagon). -Andrew |