Bug introduced in 12.0 or earlier and persisting through 12.0.0 or later
I'm drawing some objects (lines, circles etc) in a Manipulate
. I am rotating the Manipulate
upon showing all the graphics. I have found for a dashed circle any rotation angle other than 0 results in the circle flickering / not being rendered. This does not happen for a solid circle.
I have made a minimal simplified demo below. If you scale the radius of the circles, with a rotation angle of 0 things are fine, dashed and solid line circles are visible. However, for other rotation angles, the dashed, but not solid, circle flickers in and out of visibility when the radius is changed. When static (radius or rotation angle not being changed with sliders), the dashed circle vanishes.
Clear["Global`*"]
Manipulate[
(* Make a line and circle *)
thePlaneCircle = Graphics[{Red, Dashed, Thick, Circle[{0, -5}, r]}];
thePlaneCircleSolid = Graphics[{Red, Thick, Circle[{0, 5}, r]}];
theLine = Graphics[Line[{{0, -50}, {0, 50}}]];
(* Rotate and show *)
Rotate[
Show[thePlaneCircle, thePlaneCircleSolid, theLine]
, rot Degree]
, {{r, 5, "Radius"}, 1, 10, Appearance -> "Labeled"}
, {{rot, 0, "Rotation Angle"}, 0, 360, Appearance -> "Labeled"}
]
I'm aware that I could avoid this if I simply did not use Rotate
around Show
, and exchanged my x and y coordinates, but for the purposes of my more complicated original code, this would be a pain.
However, I am puzzled as to why only the dashed circle flickers in this simplified example, regardless.
I'm reasonably new to Mathematica, so apologies if I have made a glaring silly error.
I'm using Mathematica version 12 on macOS Mojave 10.14.4.
Thanks
Update: I've submitted this a report of a possible bug. In the report pointing to this thread and showing Carls minimal example. Thanks for your help. Will report back if I get a response.
Update: Has been confirmed as a bug by Wolfram. No specific workaround available.
Rotate[Graphics[{Red, Dashed, Thick, Circle[{0, -5}, 1]}], 74. Degree]
$\endgroup$TrackedSymbols :> {r, rot}
. I can't test it myself because I don't have V12 $\endgroup$