Group Abstract Group Abstract

Message Boards Message Boards

DiscretizeRegion failing on macOS with 14.3

The first graphic is from a notebook many years old, and the second is from the latest version of Mathematica. What's going on?

Is this a known regression in functionality?

enter image description here enter image description here

n = 7; m = 3; dt = 2 Pi/n; dtm = 2 Pi/m; r = 
 1./(1 - Sin[dt/2]/Cos[dtm/2]); R = 1. r Cos[(dt + dtm)/2]/Cos[dtm/2];
ToMatrix[z_, 
   r_] := (I/r) {{z, r^2 - z Conjugate[z]}, {1, -Conjugate[z]}};
alist = Table[
  ToMatrix[r Exp[I t], r - 1], {t, dt/2, 2 Pi, dt}]; Tlist = 
 Join[{IdentityMatrix[2]}, alist];
homography[{{a_, b_}, {c_, d_}}, z_] := (a z + b)/(c z + d);
FindT[T0_, Tlist_] := 
  MemberQ[Tlist, 
   T_ /; Abs[homography[T, 0] - homography[T0, 0]] < 1.0*^-3];
i2 = 1; Do[i1 = i2 + 1; i2 = Length[Tlist]; 
 Do[Scan[(T = Tlist[[i]] . #; 
     If[! FindT[T, Tlist], Tlist = Append[Tlist, T]]) &, alist], {i, 
   i1, i2}], {2}];
plot = Show[
  Graphics[
   Map[Line[
      Table[z = homography[#, R Exp[I t]]; {Re[z], Im[z]}, {t, 0, 
        2 Pi, dt}]] &, Tlist], AspectRatio -> Automatic], 
  Axes -> True]

data = (Table[
      z = homography[#1, R Exp[I t]]; {Re[z], Im[z], 0.}, {t, 0, 
       2 \[Pi], dt}] &) /@ Tlist;
L = MeshRegion[Join @@ Most /@ data, 
   Line[Join @@ (Partition[#1, 2, 1, 1] &) /@ 
      Partition[Range[7 Length[data]], 7]]];
f = RegionDistance[L];
\[Theta]1 = 0.08;
\[Theta]2 = 0.01;
z =.
R1 = ImplicitRegion[
   f[{x, y, z}] <= \[Theta]1, {{x, -4, 4}, {y, -4, 4}, {z, -2, 2}}];
S1 = DiscretizeRegion[R1, MaxCellMeasure -> 0.0001]
POSTED BY: Eric Mockensturm
9 Replies

This is known now to the developers. They suggested this workaround, could you please try it?

S1 = BoundaryDiscretizeRegion[R1, MaxCellMeasure -> 0.001]
POSTED BY: Ahmed Elbanna

Yes, that works as Michael noted.

POSTED BY: Eric Mockensturm
POSTED BY: Ahmed Elbanna

Works for me on version 14.3. What is your current version?
Also could you please try to evaluate the notebook below and let us know the outputs?

POSTED BY: Ahmed Elbanna

I'm using 14.3 on an M3 Ultra Mac Studio with 96 MB. When I evaluate the notebook you attached, I get

DiscretizeRegion[
 ImplicitRegion[
  RegionDiceFunction[MeshRegion[< 3 >, < 1 >], <>][{x, y, z}] <= 
    0.08 && -4 <= x <= 4 && -4 <= y <= 4 && -2 <= z <= 2, {x, y, z}], 
 MaxCellMeasure -> 0.0001]

and not the region you got or I got in a previous version of Mma.

POSTED BY: Eric Mockensturm
POSTED BY: Michael Rogers

Thank you for investigating this. I was planning to fire up a VM and test with other OSs. Now I don't have to.

POSTED BY: Eric Mockensturm
POSTED BY: EDITORIAL BOARD
POSTED BY: Eric Mockensturm
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard