Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] bug in Loop subdivision

Subject: CGAL users discussion list

List archive

[cgal-discuss] bug in Loop subdivision


Chronological Thread 
  • From: Ivan Middleton <>
  • To:
  • Subject: [cgal-discuss] bug in Loop subdivision
  • Date: Tue, 22 Apr 2014 19:39:06 -0600

I was just comparing the results of CGAL's implementation of Loop subdivision with my own implementation, and found a very bad error in CGAL.

On line 240 of include/CGAL/Subdivision_mask_3.h we find:

FT Cn = (FT) (5.0/8.0 - std::sqrt(3+2*std::cos(6.283/(double)n))/64.0);

The square root should instead be a squaring operation! (A much more minor point is that it surely wouldn't hurt to use a more accurate value for 2pi.)

This number Cn is what's called beta (or n*beta) in most references. See for instance page 70 of

Best regards,
Ivan




Archive powered by MHonArc 2.6.18.

Top of Page