22     static const int n_heights =
 
   23         std::max(2, 
static_cast<int>(std::round(
 
   25     double h_step = (
height - dh) / (n_heights - 1);
 
   28     for (
int i = 0; i < n_heights; ++i) {
 
   29         double z = i * h_step;
 
   30         double radius_factor = std::sqrt(1.0 - std::pow((z + r_z - 
height) / r_z, 2));
 
   31         auto ellipse = 
EllipseVertices(radius_factor * r_x, radius_factor * r_y, i * h_step);
 
   32         std::move(ellipse.begin(), ellipse.end(), it);
 
   33         it = it + ellipse.size();
 
std::vector< kvector_t > EllipseVertices(double r_x, double r_y, double z)
Generate vertices of centered ellipse with given semi-axes at height z.
 
Defines class TruncatedEllipsoid.
 
std::vector< kvector_t > m_vertices
List of vertices initialized during construction.
 
static const size_t N_Circle
 
TruncatedEllipsoid(double r_x, double r_y, double r_z, double height, double dh)