mkazhdan / PoissonRecon

Poisson Surface Reconstruction
MIT License
1.59k stars 431 forks source link

some porblems about PPolynomial #235

Open sjunwl opened 2 years ago

sjunwl commented 2 years ago

hi professor , when i review the PPolynomial code, i cannot understand two following functions: 1、 PPolynomial::MovingAverage( double radius ) const 2、Polynomial< Degree >::BSplineComponent( int i ) I am very confused,and Is there any recommended theoretical material about them? thanks verymuch.

mkazhdan commented 2 years ago

The PPolynomial class is a (templated) class used to represent a function that is described as a piecwise-polynomial (where each polynomial is of degree no more than Degree). It is used to represent B-splines.

  1. The function PPolynomial< Degree >::MovingAverage returns a new piecewise polynomial (of degree Degree+1) whose value at a point x the integral of the original polynomial over the range [x-radius,x+radius].
  2. A B-spline of degree Degree is a piecewise polynomial consisting of Degree+1 polynomials (ignoring the constantly zero polynomials on either end). The function Polynomial< Degree >::BSplineComponent( int i ) returns the i-th component of the (standard) B-spline.
sjunwl commented 2 years ago

Hi,professor. thank you for you reply. But I'm still confused about the function "Polynomial< Degree >::BSplineComponent( int i )". I had transform the code into a formula, as the picture follow. But I'm not sure is that right. If wrong, could you please give me a formula correspondding to the code. image

mkazhdan commented 2 years ago

That seems right, only I fix k=0, I assume that uk=k, and what you call B{k,1} I would call B_{k,0} since it is a constant function (i.e. a zero-th order polynomial).

Also, under the assumption that uk=k, it should be the case that B{k,d} is the translational shift of B_{0,d}, so fixing k=0 should be sufficient.