(Updated February 2022 with several improvements and simplifications thanks to .benjamin.)
While using Jamie_K's geodesic icosahedral sphere in OpenSCAD, I ran into some issues:
Because what I really needed was a hemisphere anyway, I decided to solve these problems, using Jamie_K's subdivision functions.
This is a hemisphere with evenly-distributed faces, and unlike an icosahedral sphere, this hemisphere is rendered so that the equator is a regular polygon that can match up with other regular polygon shapes (cylinders etc.).
The default sphere in OpenSCAD is rendered as a circle rotated around a diameter. This results in a globe-shape with longitude and latitude edges, with many wasted facets concentrated at the poles.
This model fixes all problems mentioned above. It subdivides a pyramid (3, 4, 5, 6, or 7 sided), which results in the base of the hemisphere being a regular polygon of the specified diameter of the hemisphere. The polygon can also have a larger variety of sides: 3×2^levels, 4×2^levels, 5×2^levels, or 6×2^levels. This means the number of polygon sides possible is 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, etc. (one should never need to go higher than 192 or so). This gives more possibilities to match the hemisphere to other objects.
To use this, simply put this file in the directory where you keep .scad files, and include this line in your other .scad files:
use <geodesic_hemisphere.scad>
Use it exactly like you would use the OpenSCAD sphere() primitive, with the same parameters.
Category: Math Art
The author remixed this model. Imported from Thingiverse.