12 const size_t size = opt.
size;
14 auto mptr = std::make_shared<TriMesh>();
18 tris.rowwise() =
Vector3l(0, 1, 2).transpose();
19 auto mut = tris.rightCols<2>();
20 for (
int j = 0; j < size; ++j) {
21 mut.row(j).array() += j;
27 int vertex_size = size + 2;
29 const auto& name = csettings.name;
30 double radius = csettings.radius;
31 Eigen::Vector2d::ConstMapType degree_range(csettings.degrees.data());
32 double diff = degree_range.y() - degree_range.x();
33 double dtheta = diff * M_PI / 180.0 / size;
34 double theta0 = M_PI * degree_range.x() / 18.0;
37 Eigen::Matrix<double, Eigen::Dynamic, 2> P(vertex_size, 2);
39 for (
int j = 0; j <= size; ++j) {
40 double theta = dtheta * j + theta0;
41 double c = radius * std::cos(theta);
42 double s = radius * std::sin(theta);
45 Eigen::Vector2d::ConstMapType o(csettings.center.data());
46 P.rowwise() += o.transpose();
void initialize(Eigen::Ref< const RowVectors3l > FV, Eigen::Ref< const RowVectors3l > FE, Eigen::Ref< const RowVectors3l > FF, Eigen::Ref< const VectorXl > VF, Eigen::Ref< const VectorXl > EF)
std::optional< Coordinates > coordinates
std::shared_ptr< TriMesh > make_mesh(const DiskOptions &opt)
attribute::MeshAttributeHandle set_matrix_attribute(const Mat &data, const std::string &name, const PrimitiveType &type, Mesh &mesh)
Vector< int64_t, 3 > Vector3l
RowVectors< int64_t, 3 > RowVectors3l