本文整理汇总了C++中TriMesh::build_circle方法的典型用法代码示例。如果您正苦于以下问题:C++ TriMesh::build_circle方法的具体用法?C++ TriMesh::build_circle怎么用?C++ TriMesh::build_circle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TriMesh
的用法示例。
在下文中一共展示了TriMesh::build_circle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: generate_minop_mesh
void generate_minop_mesh(TriMesh & mesh,
const string & filename,
double edge_length){
double angle = 0.125;
cout << "Initial meshing..."<< endl;
mesh.build_box_boundary({{-1.1,1.1},{-1.1,1.1}});
mesh.build_circle(zeros<vec>(2),50,1.0);
mesh.build_circle(zeros<vec>(2),30,1.0/sqrt(2.0));
mesh.build_circle(zeros<vec>(2),25,0.25);
cout << "Refining based on (" << angle
<< "," << edge_length << ") criterion ..."<< endl;
mesh.refine(angle,edge_length);
//cout << "Optimizing (25 rounds of Lloyd)..."<< endl;
//mesh.lloyd(15);
mesh.freeze();
// Write initial mesh to file
cout << "Writing:"
<< "\n\t" << (filename + ".node") << " (Shewchuk node file)"
<< "\n\t" << (filename + ".ele") << " (Shewchuk element file)"
<< "\n\t" << (filename + ".tri") << " (CGAL mesh file)" << endl;
mesh.write_shewchuk(filename);
mesh.write_cgal(filename + ".tri");
}