7
$\begingroup$

This code works ok in V 10.0.2 (from a post I was looking at here)

I noticed what seems to be a regression bug. This code works in version 10.0.2 on windows 7

Mathematica graphics

Clear[t]
tmp = RevolutionPlot3D[{2 + Cos[t], Sin[t]}, {t, 0, 2 Pi}, PlotPoints -> 2]; 
tmp = GraphicsComplex[tmp[[1, 1]], tmp[[1, 2, 1, 1, 5, 1]]];
r1 = BoundaryDiscretizeGraphics@tmp

Mathematica graphics

But on V 10.1:

Mathematica graphics

Clear[t]
tmp = RevolutionPlot3D[{2 + Cos[t], Sin[t]}, {t, 0, 2 Pi}, PlotPoints -> 2]; 
tmp = GraphicsComplex[tmp[[1, 1]], tmp[[1, 2, 1, 1, 5, 1]]];
r1 = BoundaryDiscretizeGraphics@tmp

Mathematica graphics

Is this a new bug in 10.1? Windows 7, 64 bit

$\endgroup$

1 Answer 1

2
$\begingroup$

This could indeed be a bug, but it is one with a simple workaround. Just don't set the PlotPoints to such a low number. In fact, I find that with any number smaller than 6 it will fail:

BoundaryDiscretizeGraphics@
   Cases[Normal@
     RevolutionPlot3D[{2 + Cos[t], Sin[t]}, {t, 0, 2 Pi}, 
      PlotPoints -> #], _Polygon, Infinity] & /@ {5, 6}

enter image description here

Obviously you get a better region the more points you use. Here are the results from using PlotPoints->Automatic on the left and PlotPoints->40 on the right.

enter image description here

The real question is, what kind of test is being applied to the list of polygons to see whether the region is closed? By inspection, the following certainly appears to be closed,

Cases[Normal@
   RevolutionPlot3D[{2 + Cos[t], Sin[t]}, {t, 0, 2 Pi}, 
    PlotPoints -> 2], _Polygon, Infinity] // Graphics3D

enter image description here

The workaround above is valid for versions 10.1, 10.2, and 10.31

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.