7
$\begingroup$

Bug introduced in 10.0 and fixed in 10.3


So after 2 days of trying to figure out what's going on, I figure I should post here as I don't have enough knowledge about the Mathematica evaluation process "under the hood". I'm running Mathematica 10.1.0 for Linux x86 (64-bit) (March 24, 2015) on Xubuntu 14.04.4 LTS. The following code causes the "blue text of kernel death" (or whatever is the term):

Table[
 ParametricPlot3D[{1.16^(v + a) Cos[(v + a)] (1 + 
  Cos[u]), -1.16^(v + a) Sin[(v + a)] (1 + 
  Cos[u]), -2 1.16^(v + a) (1 + Sin[u])}, {u, 0, 2 Pi}, {v, -15, 
  6}, Mesh -> None, PlotRange -> All, ViewPoint -> {2, 2, 3}, 
  Boxed -> False, Axes -> False, PlotPoints -> 50, MaxRecursion -> 2, 
  ImageSize -> 500, Background -> None],
   {a, 0, 2 Pi, 0.02}]

It's basically a rotated conch, and I wanted to make a gif of it. Turns out, it keeps aborting the evaluation without ever reporting an error, the CPU and RAM usage are negligible, and there's no indication my laptop can't handle the evaluation in a reasonable amount of time. Resetting the preferences doesn't help, so I'm at a loss. Is this a version bug, or am I missing something?

$\endgroup$
12
  • $\begingroup$ Please do not use bugs tag for unconfirmed issues. $\endgroup$ Jun 1, 2016 at 19:51
  • 2
    $\begingroup$ Try storing the Table in a variable and suppress the output (by adding a ;). The problem may be that Mathematica is trying to display 600+ graphics simultaneously (as an output). $\endgroup$ Jun 1, 2016 at 19:56
  • $\begingroup$ I think this may be ParametricPlot3D acting up. I was having similar problems working with a different question earlier today. I'm using 10.0.1.0 on OS X. $\endgroup$
    – N.J.Evans
    Jun 1, 2016 at 20:03
  • $\begingroup$ @JHM Already did that, and if I try to plot something simpler 600+ times, say a piece of a sphere, and let it output the result, it actually completes it. I don't see what's so special about the function in the post to make the kernel literally quit with no explanation. $\endgroup$
    – blueshift
    Jun 1, 2016 at 20:03
  • $\begingroup$ Your code does work (at least on Mathematica 10.1.0 on Windows (64-bit)). Try storing the Table in a variable and put a semicolon at the end. The computation takes several minutes to complete, though, due to its complexity. Monitor the variable a if you want to see progress. $\endgroup$ Jun 1, 2016 at 20:09

3 Answers 3

4
$\begingroup$

This was introduced in 10.0 and fixed in 10.3.

curve1 = {Cos[φ] (4. - 1. Cos[4 φ] + 
      1. Cos[8 φ] - 1. Cos[12 φ]), (4. - 
      1. Cos[4 φ] + 1. Cos[8 φ] - 
      1. Cos[12 φ]) Sin[φ]};

curve2 = 2. - 1. Cos[4 φ];

tangent1 = D[curve1, φ];

surface = {{Cos[3 z], Sin[3 z], 0}, {-Sin[3 z], Cos[3 z], 0}, {0, 0, 
     1}}.Append[(1 - Sqrt[1 - Abs[z]]) (curve1 + 
       Reverse[tangent1 {-1, 1}]/Sqrt[tangent1.tangent1] curve2), z];

ParametricPlot3D[Evaluate[surface], {φ, 0, 2 Pi}, {z, 0, 1},
  Mesh -> 120, BoxRatios -> {1, 1, 2}, MeshFunctions -> {#4 &}, 
 MeshShading -> {Red, None}]

enter image description here

$\endgroup$
1
$\begingroup$

This isn't a very satisfactory answer, but it turns out that this exact same code works on version 10.4.0 for Linux x86 (64-bit) (February 26, 2016) on the same OS and laptop, and as @JHM points out it works on a Windows machine, therefore I suspect this might be a version+OS specific bug. In any case, my problem is solved.

$\endgroup$
-2
$\begingroup$

Try Block

Block[{a},
    Table[ParametricPlot3D[{1.16^(v + a) Cos[(v + a)] (1 + 
    Cos[u]), -1.16^(v + a) Sin[(v + a)] (1 + 
    Cos[u]), -2 1.16^(v + a) (1 + Sin[u])}, {u, 0, 2 Pi}, {v, -15, 
    6}, Mesh -> None, PlotRange -> All, ViewPoint -> {2, 2, 3}, 
    Boxed -> False, Axes -> False, PlotPoints -> 50, MaxRecursion -> 2,
    ImageSize -> 500, Background -> None], {a, 0, 2 Pi, 0.02}]
    ]
$\endgroup$
5
  • $\begingroup$ This does not solve the issue because it is a problem with Table and ParametricPlot3D, not with the variable a. $\endgroup$ Jun 1, 2016 at 20:19
  • $\begingroup$ I had the same problem, and it solved the problem. $\endgroup$ Jun 1, 2016 at 20:20
  • $\begingroup$ Your issue may have been that a was defined outside of the code, thus affecting the Table loop. The OP's problem is not with the global definition of a, but instead a bizarre kernel behavior (random aborts). Block in this case simply is saying that the definition of a inside Block is separate from that outside of Block. $\endgroup$ Jun 1, 2016 at 20:22
  • $\begingroup$ It worked when I applied to the OP's problem. I think it is an Linux issue. I'm running Mathematica 10.0.2.0 for Linux x86 (64-bit) (Slackware). $\endgroup$ Jun 1, 2016 at 21:05
  • 1
    $\begingroup$ OP's code should work fine even without the Block. $\endgroup$ Jun 1, 2016 at 22:13

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.