I am trying to build a package that will display a sector of an ellipse where the angle is taken from a focus of the ellipse rather than from the center. The code seems to work fine when called with individual values.
A problem arises when I try to embed a call to the code within a Manipulate. Here is a simplified failing version:
Manipulate[ Show[ RegionPlot[ Sector[5, 3, ang, ang + \[Pi]/6], PlotRange -> {{-6, 6}, {-6, 6}} ] ], {{ang, 0, "Initial angle"}, 0, \[Pi]/2, Appearance -> "Labeled"} ]
When I move the slider, I can see errors at some different values of ang (such as 1.5708 and 0.119381), while others work fine. The error message says "The cell Line[{1,1}] is degenerate." and seems to be coming from BoundedMeshRegion.
I have tried several approaches to debugging the problem:
1) I tried removing the Manipulate and plugging in a failing value, but the code worked fine.
2) I tried Trace, but the output was quite long and unenlightening to me.
3) Incidentally, removing the PlotRange call removes the error message, but the displayed plot is clipped on both ends.
My question is how to debug this problem? That is, how should I think about attacking the problem. Alternatively, am I misusing the computational resources (e.g. RegionPlot) in some way?
Note, the code for the package is available here (.txt or .wl). A secondary utility package is available here I am running Mathematica version 10.0.2.0.
Thanks.
Spencer
Sector
depends, so unfortunately I am unable to reproduce your code. Would you be able to you provide those as well? $\endgroup$