20 {{0, 1, 7, 6},
false},
21 {{1, 2, 8, 7},
false},
22 {{2, 3, 9, 8},
false},
23 {{3, 4, 10, 9},
false},
24 {{4, 5, 11, 10},
false},
25 {{5, 0, 6, 11},
false},
26 {{6, 7, 8, 9, 10, 11},
true}},
37 if (!std::isfinite(cot_alpha) || cot_alpha < 0)
38 throw std::runtime_error(
"pyramid angle alpha out of bounds");
41 std::ostringstream ostr;
42 ostr <<
"Incompatible parameters in Pyramid6 ";
45 ostr <<
", alpha[rad]:" <<
m_alpha <<
")";
46 throw std::runtime_error(ostr.str());
51 double ac = a * sqrt(3) / 2;
52 double b = a * (1 - r);
54 double bc = b * sqrt(3) / 2;
56 double zcom =
m_height * (.5 - 2 * r / 3 + r * r / 4) / (1 - r + r * r / 3);
Defines M_PI and some more mathematical constants.
void checkNodeArgs() const
Raises exception if a parameter value is invalid.
A frustum (truncated pyramid) with regular hexagonal base.
const double & m_base_edge
Pyramid6(double base_edge, double height, double alpha)
static const ff::PolyhedralTopology topology
double cot(double x)
cotangent function: