Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taubin filter algorithm problem/question: Border vertices are added to their own "sum" #207

Open
felipeek opened this issue Dec 7, 2022 · 0 comments

Comments

@felipeek
Copy link

felipeek commented Dec 7, 2022

Hi,

I have been analyzing the Taubin filter implemented by this library and I noticed that when calculating the neighbor sum of a border vertex i, the same vertex i is added to the neighbor list. This is done here:

// si azzaera i dati per i vertici di bordo
for (fi = m.face.begin(); fi != m.face.end(); ++fi)
{
if (!(*fi).IsD())
for (int j = 0; j < 3; ++j)
if ((*fi).IsB(j))
{
TD[(*fi).V0(j)].sum = (*fi).P0(j);
TD[(*fi).V1(j)].sum = (*fi).P1(j);
TD[(*fi).V0(j)].cnt = 1;
TD[(*fi).V1(j)].cnt = 1;
}
}

Note that, after this loop, the neighbor list of all border vertices will contain themselves. It is interesting because the comment says that this loop is only "cleaning border vertices". Shouldn't the sum and cnt of all border vertices be set to 0 then?

My understanding is that by adding the border vertices to their own neighbor list, the algorithm is basically smoothing these vertices a little less than others. This might be on purpose, but it seems a bit arbitrary, so I am wondering if this was made on purpose or if it is a bug. If this was made on purpose, I wanted to kindly ask if this was done based on some known reference,

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant