60 const RealType HGR = (sqrt(5.0) + 1.0) / 4.0;
62 Basis.push_back(
Vector3d(HGR, 0.0, 0.5));
63 Basis.push_back(
Vector3d(HGR, 0.0, -0.5));
64 Basis.push_back(
Vector3d(0.5, HGR, 0.0));
65 Basis.push_back(
Vector3d(-0.5, HGR, 0.0));
66 Basis.push_back(
Vector3d(0.0, 0.5, HGR));
67 Basis.push_back(
Vector3d(0.0, -0.5, HGR));
68 Basis.push_back(
Vector3d(0.5, -HGR, 0.0));
69 Basis.push_back(
Vector3d(0.0, 0.5, -HGR));
70 Basis.push_back(
Vector3d(-HGR, 0.0, 0.5));
71 Basis.push_back(
Vector3d(0.0, -0.5, -HGR));
72 Basis.push_back(
Vector3d(-HGR, 0.0, -0.5));
73 Basis.push_back(
Vector3d(-0.5, -HGR, 0.0));
79 Edges.push_back(std::make_pair(0, 1));
80 Edges.push_back(std::make_pair(0, 2));
81 Edges.push_back(std::make_pair(0, 4));
82 Edges.push_back(std::make_pair(0, 5));
83 Edges.push_back(std::make_pair(0, 6));
85 Edges.push_back(std::make_pair(10, 3));
86 Edges.push_back(std::make_pair(10, 7));
87 Edges.push_back(std::make_pair(10, 8));
88 Edges.push_back(std::make_pair(10, 9));
89 Edges.push_back(std::make_pair(10, 11));
91 Edges.push_back(std::make_pair(1, 2));
92 Edges.push_back(std::make_pair(1, 6));
93 Edges.push_back(std::make_pair(1, 7));
94 Edges.push_back(std::make_pair(1, 9));
96 Edges.push_back(std::make_pair(8, 3));
97 Edges.push_back(std::make_pair(8, 4));
98 Edges.push_back(std::make_pair(8, 5));
99 Edges.push_back(std::make_pair(8, 11));
101 Edges.push_back(std::make_pair(2, 3));
102 Edges.push_back(std::make_pair(2, 4));
103 Edges.push_back(std::make_pair(2, 7));
105 Edges.push_back(std::make_pair(11, 5));
106 Edges.push_back(std::make_pair(11, 6));
107 Edges.push_back(std::make_pair(11, 9));
109 Edges.push_back(std::make_pair(6, 5));
110 Edges.push_back(std::make_pair(6, 9));
112 Edges.push_back(std::make_pair(3, 4));
113 Edges.push_back(std::make_pair(3, 7));
115 Edges.push_back(std::make_pair(7, 9));
117 Edges.push_back(std::make_pair(5, 4));
122 Facets.push_back(std::make_tuple(0, 1, 2));
123 Facets.push_back(std::make_tuple(0, 2, 4));
124 Facets.push_back(std::make_tuple(0, 4, 5));
125 Facets.push_back(std::make_tuple(0, 5, 6));
126 Facets.push_back(std::make_tuple(0, 1, 6));
128 Facets.push_back(std::make_tuple(10, 3, 7));
129 Facets.push_back(std::make_tuple(10, 3, 8));
130 Facets.push_back(std::make_tuple(10, 8, 11));
131 Facets.push_back(std::make_tuple(10, 9, 11));
132 Facets.push_back(std::make_tuple(10, 7, 9));
134 Facets.push_back(std::make_tuple(1, 2, 7));
135 Facets.push_back(std::make_tuple(1, 7, 9));
136 Facets.push_back(std::make_tuple(1, 6, 9));
138 Facets.push_back(std::make_tuple(8, 5, 11));
139 Facets.push_back(std::make_tuple(8, 4, 5));
140 Facets.push_back(std::make_tuple(8, 3, 4));
142 Facets.push_back(std::make_tuple(2, 3, 7));
143 Facets.push_back(std::make_tuple(2, 3, 4));
145 Facets.push_back(std::make_tuple(11, 5, 6));
146 Facets.push_back(std::make_tuple(11, 6, 9));
176 if (n < 0)
return Points;
181 Points.push_back(
Vector3d(0.0, 0.0, 0.0));
188 for (std::vector<Vector3d>::iterator i = Basis.begin(); i != Basis.end();
190 Points.push_back((*i) * RealType(n));
196 if (n < 2)
return Points;
198 for (std::vector<std::pair<int, int>>::iterator i = Edges.begin();
199 i != Edges.end(); ++i) {
200 Vector3d e1 = Basis[(*i).first] * RealType(n);
201 Vector3d e2 = Basis[(*i).second] * RealType(n);
203 for (
int j = 1; j <= n - 1; j++) {
204 Points.push_back(e1 + (e2 - e1) * RealType(j) / RealType(n));
211 if (n < 3)
return Points;
213 for (
const auto& [first, second, third] : Facets) {
214 Vector3d e1 = Basis[first] * RealType(n);
215 Vector3d e2 = Basis[second] * RealType(n);
216 Vector3d e3 = Basis[third] * RealType(n);
218 for (
int j = 1; j <= n - 2; j++) {
219 Vector3d v1 = e1 + (e2 - e1) * RealType(j + 1) / RealType(n);
220 Vector3d v2 = e1 + (e3 - e1) * RealType(j + 1) / RealType(n);
222 for (
int k = 1; k <= j; k++) {
223 Points.push_back(v1 + (v2 - v1) * RealType(k) / RealType(j + 1));