20 {{0, 1, 4, 3},
false},
21 {{1, 2, 5, 4},
false},
22 {{2, 0, 3, 5},
false},
34 if (!std::isfinite(cot_alpha) || cot_alpha < 0)
35 throw std::runtime_error(
"pyramid angle alpha out of bounds");
38 std::ostringstream ostr;
39 ostr <<
"Incompatible parameters in Pyramid3: ";
42 ostr <<
", alpha[rad]:" <<
m_alpha <<
")";
43 throw std::runtime_error(ostr.str());
48 double ac = a / sqrt(3) / 2;
49 double ah = a / sqrt(3);
50 double b = a * (1 - r);
52 double bc = b / sqrt(3) / 2;
53 double bh = b / sqrt(3);
55 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 equilateral trigonal base.
const double & m_base_edge
static const ff::PolyhedralTopology topology
Pyramid3(double base_edge, double height, double alpha)
double cot(double x)
cotangent function: