mirror of https://github.com/CGAL/cgal
parent
84663476e5
commit
ef6488a7c6
|
|
@ -10,11 +10,11 @@
|
|||
typedef CGAL::Simple_cartesian<double> Kernel;
|
||||
typedef Kernel::Point_3 Point;
|
||||
|
||||
int main(void)
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
const std::string input_filename_without_ext = "data/sphere_20k";
|
||||
const std::string input_filename = input_filename_without_ext + ".xyz";
|
||||
const std::string OUTPUT_FILENAME = input_filename_without_ext + "_WLOPED.xyz";
|
||||
const std::string input_filename = std::string(argv[1]); // input_filename_without_ext + ".xyz";
|
||||
const std::string OUTPUT_FILENAME = std::string(argv[2]); //input_filename_without_ext + "_WLOPED.xyz";
|
||||
|
||||
// Reads a .xyz point set file in points[]
|
||||
std::vector<Point> points;
|
||||
|
|
@ -31,7 +31,7 @@ int main(void)
|
|||
std::vector<Point> output;
|
||||
|
||||
//parameters
|
||||
const double retain_percentage = 2; // percentage of points to retain.
|
||||
const double retain_percentage = 20; // percentage of points to retain.
|
||||
const double neighbor_radius = 0.5; // neighbors size.
|
||||
|
||||
CGAL::wlop_simplify_and_regularize_point_set
|
||||
|
|
@ -39,8 +39,9 @@ int main(void)
|
|||
(points.begin(),
|
||||
points.end(),
|
||||
std::back_inserter(output),
|
||||
retain_percentage,
|
||||
neighbor_radius);
|
||||
retain_percentage//,
|
||||
//neighbor_radius
|
||||
);
|
||||
|
||||
std::ofstream out(OUTPUT_FILENAME.c_str());
|
||||
if (!out || !CGAL::write_xyz_points(
|
||||
|
|
|
|||
|
|
@ -436,14 +436,14 @@ wlop_simplify_and_regularize_point_set(
|
|||
///< This is a key parameter that needs to be finely tuned.
|
||||
///< The result will be irregular if too small, but a larger
|
||||
///< value will impact the runtime.
|
||||
///< In practice, choosing a radius such that each point has at least4 neighbors
|
||||
///< In practice, choosing a radius such that each point has at least 4 neighbors
|
||||
///< gives satisfactory result.
|
||||
///< The default value is set to `0.05 * diameter of bounding box`.
|
||||
///< The default value is set to 0.05 * the diameter of the bounding box.
|
||||
unsigned int iter_number, ///< number of iterations to solve the optimsation problem. The default value is 35.
|
||||
///< More iterations give a more regular result but increase the runtime.
|
||||
bool require_uniform_sampling,///< an optional preprocessing, which will give better result
|
||||
///< if the distribution of the input points is highly non-uniform.
|
||||
///< The default value is false.
|
||||
///< The default value is `false`.
|
||||
const Kernel& ///< geometric traits.
|
||||
)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue