#include <algorithm>
#include <iostream>
#include <Ponca/src/Fitting/basket.h>
#include <Ponca/src/Fitting/gls.h>
#include <Ponca/src/Fitting/orientedSphereFit.h>
#include <Ponca/src/Fitting/unorientedSphereFit.h>
#include <Ponca/src/Fitting/sphereFit.h>
#include <Ponca/src/Fitting/weightFunc.h>
#include <Ponca/src/Fitting/weightKernel.h>
#include <Ponca/src/Fitting/curvature.h>
#include <Ponca/src/Fitting/weingarten.h>
#include <Ponca/SpatialPartitioning>
#include <Ponca/src/Common/pointTypes.h>
#include <Ponca/src/Common/pointGeneration.h>
#include <vector>
using namespace std;
using Scalar = MyPoint::Scalar;
using VectorType = MyPoint::VectorType;
template <typename Fit>
{
constexpr Scalar
tmax = Scalar(100.0);
{
}
{
cout <<
"Center: [" <<
_fit.center().transpose() <<
"] ; radius: " <<
_fit.radius() <<
endl;
cout <<
"Pratt normalization" << (
_fit.applyPrattNorm() ?
" is now done." :
" has already been applied.")
cout <<
"Value of the scalar field at the initial point: " <<
_p.transpose() <<
" is equal to "
cout <<
"It's gradient at this place is equal to: " <<
_fit.primitiveGradient(
_p).transpose() <<
endl;
<<
"\t Eta : " <<
_fit.eta().transpose() <<
endl
<<
"\t Kappa: " <<
_fit.kappa() <<
endl;
cout <<
"The initial point " <<
_p.transpose() <<
endl
<<
"Is projected at " <<
_fit.project(
_p).transpose() <<
endl;
}
}
{
VectorType
p = VectorType::Random();
constexpr int n = 10000;
std::cout << "====================\nOrientedSphereFit:\n";
std::cout << "\n\n====================\nUnorientedSphereFit:\n";
std::cout << "\n\n====================\nUnorientedSphereFit:\n";
{
}
std::cout << "\n\n====================\nSphereFit:\n";
return 0;
}
Aggregator class used to declare specialized structures with derivatives computations,...
Aggregator class used to declare specialized structures using CRTP.
bool addNeighbor(const DataPoint &_nei)
Add a neighbor to perform the fit.
Make CurvatureEstimatorBase available to BasketDiff object.
Differentiation of GLSParam.
Compute a Weingarten map from the spatial derivatives of the normal field .
This Source Code Form is subject to the terms of the Mozilla Public License, v.
Compute principal curvatures from a base class providing fundamental forms.