Charcoal, 162 146 bytes
Nθ⊞υ⟦⁰¦¹⊘⊕₂⁵⟧≔⟦⟧ηFυFE²⊞OΦιν×⊖⊗κ§ι⁰F¬№υκFΦ⊞Oυκ⁼⁴ΣXEμ⁻ξ§κπ²⊞η⟦κμ⟧FηF…¹θ⊞υE§ι⁰⁺×κλ×⁻θꧧι¹μFηFΦυ⬤ι№η⟦μκ⟧F…²θF…¹λ⊞υE§ι⁰⁺⁺×μν×⁻λ짧ι¹ξ×⁻θλ§κξIEυ∕ι₂ΣXι²
Try it online! Link is to verbose version of code. Explanation:
Nθ
Input b
.
Nθ⊞υ⟦⁰¦¹⊘⊕₂⁵⟧≔⟦⟧ηFυFE²⊞OΦιν×⊖⊗κ§ι⁰F¬№υκFΦ⊞Oυκ⁼⁴ΣXEμ⁻ξ§κπ²⊞η⟦κμ⟧⊞υ⟦⁰¦¹⊘⊕₂⁵⟧≔⟦⟧η
Generate the verticesStart with one vertex and no edges of a regularan icosahedron of side 2
.
FηF…¹θ⊞υE§ι⁰⁺×κλ×⁻θꧧι¹μFυ
ExtrapolateProcess all vertices as they are discovered.
FE²⊞OΦιν×⊖⊗κ§ι⁰
Generate more vertices by rotating about the line x=y=z
and reflecting in the xy
plane. (This is the same procedure as for the regular dodecahedron in the linked question.)
F¬№υκ
Ignore previously discovered vertices.
FΦ⊞Oυκ⁼⁴ΣXEμ⁻ξ§κπ²⊞η⟦κμ⟧
Save the new vertex and also discover any edges by checking for previously found vertices that are 2
away. (Very fortunately, ϕ²+1²+(ϕ-1)²=2²
under floating-point arithmetic.) Since only previously found vertices are checked, each edge is only detected once, and has a specific direction.
Fη
Loop over the edges.
F…¹θ
Loop over the intermediate points.
⊞υE§ι⁰⁺×κλ×⁻θꧧι¹μ
Extrapolate a point along the edge. (Sadly Charcoal doesn't have a way of adding two vectors which would really simplify this. Maybe if it had octonions...)
Fη
Loop over the edges again.
FηFΦυ⬤ι№η⟦μκ⟧F…²θF…¹λ⊞υE§ι⁰⁺⁺×μν×⁻λ짧ι¹ξ×⁻θλ§κξFΦυ⬤ι№η⟦μκ⟧
ExtrapolateLoop over the vertices that have edges to both vertices of that edge. (Note that because the edges have a specific direction, each face can only be detected once.)
F…²θF…¹λ
Loop over the interior points of the face.
⊞υE§ι⁰⁺⁺×μν×⁻λ짧ι¹ξ×⁻θλ§κξ
Extrapolate a point inside the facesface. (Due to the normalisation, it's not necessary to interpolate.)
IEυ∕ι₂ΣXι²
Normalise all the points.