21 {{0, 1, 5, 4},
false},
22 {{1, 2, 6, 5},
false},
23 {{2, 3, 7, 6},
false},
24 {{3, 0, 4, 7},
false},
37 if (!std::isfinite(cot_alpha))
38 throw std::runtime_error(
"pyramid angle alpha out of bounds");
41 std::ostringstream ostr;
42 ostr <<
"Pyramid4() -> Error in class initialization with parameters";
45 ostr <<
" alpha[rad]:" <<
m_alpha <<
"\n\n";
46 ostr <<
"Check for 'height <= base_edge*tan(alpha)' failed.";
47 throw std::runtime_error(ostr.str());
51 double b = a * (1 - r);
53 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 with a quadratic base.
const double & m_base_edge
Pyramid4(double base_edge, double height, double alpha)
static const ff::PolyhedralTopology topology
double cot(double x)
cotangent function: