Face area fluctuations
While creating a subdivided sphere, I noticed that the generated faces systematically have slightly different areas. Any idea where this comes from? For zero subdivisions, i.e. the icosahedron, the areas are the same within machine precision.
Faces areas (one subdivision):
Area of face 0: 0.13930012
Area of face 1: 0.13930015
Area of face 2: 0.13930014
Area of face 3: 0.16539611
Area of face 4: 0.13930015
Area of face 5: 0.13930015
Area of face 6: 0.13930015
Area of face 7: 0.16539612
Area of face 8: 0.13930014
Area of face 9: 0.13930015
Area of face 10: 0.13930015
Area of face 11: 0.16539612
Area of face 12: 0.13930015
Area of face 13: 0.13930015
Area of face 14: 0.13930015
Area of face 15: 0.16539612
Area of face 16: 0.13930012
Area of face 17: 0.13930014
Area of face 18: 0.13930015
Area of face 19: 0.16539611
Area of face 20: 0.13930014
Area of face 21: 0.13930014
Area of face 22: 0.13930014
Area of face 23: 0.16539612
Area of face 24: 0.13930014
Area of face 25: 0.13930014
Area of face 26: 0.13930014
Area of face 27: 0.16539612
Area of face 28: 0.13930014
Area of face 29: 0.13930015
Area of face 30: 0.13930014
Area of face 31: 0.16539612
Area of face 32: 0.13930014
Area of face 33: 0.13930014
Area of face 34: 0.13930014
Area of face 35: 0.16539612
Area of face 36: 0.13930015
Area of face 37: 0.13930014
Area of face 38: 0.13930014
Area of face 39: 0.16539612
Area of face 40: 0.13930014
Area of face 41: 0.13930015
Area of face 42: 0.13930014
Area of face 43: 0.16539612
Area of face 44: 0.13930014
Area of face 45: 0.13930014
Area of face 46: 0.13930014
Area of face 47: 0.16539612
Area of face 48: 0.13930014
Area of face 49: 0.13930014
Area of face 50: 0.13930015
Area of face 51: 0.16539612
Area of face 52: 0.13930014
Area of face 53: 0.13930014
Area of face 54: 0.13930014
Area of face 55: 0.16539611
Area of face 56: 0.13930014
Area of face 57: 0.13930014
Area of face 58: 0.13930014
Area of face 59: 0.16539611
Area of face 60: 0.13930015
Area of face 61: 0.13930015
Area of face 62: 0.13930015
Area of face 63: 0.16539612
Area of face 64: 0.13930015
Area of face 65: 0.13930015
Area of face 66: 0.13930014
Area of face 67: 0.16539612
Area of face 68: 0.13930015
Area of face 69: 0.13930015
Area of face 70: 0.13930015
Area of face 71: 0.16539612
Area of face 72: 0.13930015
Area of face 73: 0.13930014
Area of face 74: 0.13930012
Area of face 75: 0.16539611
Area of face 76: 0.13930014
Area of face 77: 0.13930015
Area of face 78: 0.13930012
Area of face 79: 0.16539611
Generated with:
let indices = one_subdivision.get_all_indices();
let vertices = one_subdivision.raw_points();
for (n, triangle) in indices.chunks(3).enumerate() {
let a = vertices[triangle[0] as usize];
let b = vertices[triangle[1] as usize];
let c = vertices[triangle[2] as usize];
let ab = b - a;
let ac = c - a;
println!("Area of face {}: {}", n, 0.5 * ab.cross(ac).length());
}
Yeah, unfortunately making an even-area (uniform) tessellation of the sphere is quite difficult. If you direct me to an article on how to do this, I'd be happy to investigate, however my search for one didn't turn up anything useful.
I've cooked up this little desmos graph showing an example of how this is simply impossible with some tilings (this library's subdivison = 1 case): https://www.desmos.com/3d/vtkogtaotz.
Thanks! I see the difficulty and found a few works trying to minimize the difference. Bell and Potapos provide an efficient algorithm:
And there are others:
- https://perswww.kuleuven.be/~u0017946/publications/Papers97/art97a-Saff-Kuijlaars-MI/Saff-Kuijlaars-MathIntel97.pdf
- https://doi.org/10.1016/j.cageo.2017.03.012
- https://central.bac-lac.gc.ca/.item?id=MR83568&op=pdf&app=Library&oclc_number=1019473972
I'm asking since we're using hexasphere in a research project where we tabulate angular dependent properties between two interacting rigid bodies (e.g. molecules). The area irregularity requires a correction, but it should be solvable.
This article actually describes exactly the same results that hexasphere would generate when you pick a subdivision number that's 2^n - 1.
- https://perswww.kuleuven.be/~u0017946/publications/Papers97/art97a-Saff-Kuijlaars-MI/Saff-Kuijlaars-MathIntel97.pdf
This provides two ideas:
- Spiral points (which I'd then proceed with delaunay triangulation). Delaunay triangulation gets rid of the nice guarantees I like about hexasphere, namely that I can be guaranteed that I have hexagons and pentagons. Additionally, it's not particularly cheap to compute.
- Generating geodesic polyhedra which don't use subdivisions of type
(m, 0). See this section of this wikipedia article, there, examples are given of(m, 0). I don't currently implement arbitrary(m, n), however it's something I've always wanted to try. I'll do some investigation on how generation of those would work, however I'm quite skeptical they'd help with the fluctuations in face areas.
- https://central.bac-lac.gc.ca/.item?id=MR83568&op=pdf&app=Library&oclc_number=1019473972
This is a 160 page master's thesis... as much as I enjoy writing open source software, I don't think I'm able to commit that much time to such small variations in face areas.
- https://doi.org/10.1016/j.cageo.2017.03.012
I haven't looked at this one, but if the (m, n) implementation doesn't pan out, I'll give it a look (I have access through my university), but I'm unsure what the legal requirements would be for me to implement this for hexasphere, i.e. could I keep my MIT & Apache2 licensing?
The area irregularity requires a correction, but it should be solvable.
If by chance you're using the grid to compute approximations to gradients or divergences of a scalar/vector field respectively, then I have actually written quite a few notes on my findings on how to efficiently approximate them locally (taking into account weird face shapes, areas, etc.). If this is indeed what you're looking for, I'd be happy to clean them up and send them over 🙂.