Port to C++ of Thomas Perl's Circle1D