Skip to content

Commit

Permalink
libpsalm: Removed parameter estimation code
Browse files Browse the repository at this point in the history
  • Loading branch information
Pseudomanifold committed Feb 9, 2011
1 parent 5f4f290 commit 92ff415
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 44 deletions.
37 changes: 0 additions & 37 deletions libpsalm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,40 +130,3 @@ bool fill_hole( int num_vertices, long* vertex_IDs, double* coordinates, double*

return(result);
}

/*!
* Given a mesh input density and the desired density of the triangulated
* hole, calculates an estimate for the density parameter of Liepa's
* subdivision scheme.
*
* @param input_density Average density of the input data
* @param desired_density Desired density of triangulated hole
*
* @returns Estimated value for the alpha parameter of Liepa's subdivision
* scheme.
*
* @warning The estimation is only useful for density values < 2000. A
* density much larger than this would require separate treatment.
*/

namespace libpsalm
{

double estimate_density(double input_density, double desired_density)
{
// Fitted parameter values with asymptotic standard error of < 3%,
// which is sufficient for most mesh data.

double a0 = 7.63324e-07;
double a1 = -0.00710062;
double b0 = -4.70052e-07;
double b1 = 0.00573126 ;
double c0 = 2.29083;

double x = input_density; // abbreviations so that the function is written more easily
double y = desired_density;

return(a0*x*x+a1*x+b0*y*y+b1*y+c0);
}

} // end of namespace "libpsalm"
7 changes: 0 additions & 7 deletions libpsalm.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,4 @@
bool fill_hole( int num_vertices, long* vertex_IDs, double* coordinates, double* scale_attributes, double* normals,
int* num_new_vertices, double** new_coordinates, int* num_new_faces, long** new_vertex_IDs);

namespace libpsalm
{

double estimate_density(double input_density, double desired_density);

} // end of namespace "libpsalm"

#endif

0 comments on commit 92ff415

Please sign in to comment.