geometry-processing-mesh-reconstruction icon indicating copy to clipboard operation
geometry-processing-mesh-reconstruction copied to clipboard

Grid seems to do something different than comments

Open aPToul opened this issue 7 years ago • 0 comments

In poisson_surface_reconstruction.cpp, a grid is made for us.

I noticed that it is using the max_extent to compute the step size for h.

But if we want to guarantee the shortest side has 30 grid points, I am thinking we should use the minimum. Let me know if I've misunderstood something.

My final approach was:

min_extent = min(x_extent, y_extent, z_extent)

// We want to evenly space 30 points, so we have 29 edges between them
h = min_extent / (30 - 1) 

// Pad after computing h, so we surely have 30 points plus the padded ones
padded_x_extent = x_extent + h*pad*2
... // same for padded_y, padded_z

// Add one so we reach the last point
n_x = (padded_x_extent) / h + 1 
... // same for n_y, n_z

aPToul avatar Jan 27 '18 22:01 aPToul