Dear Andrzej,
It appears that rats is discontinuous around 0:
Plot[rats /. b -> 1.2 // Evaluate, {d, -1, 1},
PlotStyle -> {{Red}, {Blue}, {Green}}, Axes -> False, Frame -> True]
It seems that both Plot and ParametricPlot3D are not able to detect this
discontinuity. What you see in the unit box is the same thing as the
vertical line at 0 in my Plot example above.
We can fix this by specifying the Exclusions option manually:
Plot[rats /. b -> 1.2 // Evaluate, {d, -1, 1},
PlotStyle -> {{Red}, {Blue}, {Green}}, Axes -> False, Frame -> True,
Exclusions -> {0}]
For ParemetricPlot3D, this is done as follows:
unitBox = {{-1, 1}, {-1, 1}, {-1, 1}}; (* avoid typing *)
ParametricPlot3D[rats, {b, -1, 1}, {d, -1, 1},
PlotRange -> 10 unitBox, MaxRecursion -> 2, PlotPoints -> 40,
Exclusions -> {b == 0, d == 0}]
If you change the plot range to 1 unitBox (instead of 10), you get an
empty plot.
Note that I needed to limit MaxRecursion and PlotPoints manually,
otherwise my machine would run out of memory and freeze due to disk
swapping...
Alternatively we can chop up the parameter range into four pieces by
hand, like this:
With[{pr = 10 unitBox},
Show[
ParametricPlot3D[rats, {b, 0, 1}, {d, 0, 1}, PlotRange -> pr],
ParametricPlot3D[rats, {b, -1, 0}, {d, 0, 1}, PlotRange -> pr],
ParametricPlot3D[rats, {b, 0, 1}, {d, -1, 0}, PlotRange -> pr],
ParametricPlot3D[rats, {b, -1, 0}, {d, -1, 0}, PlotRange -> pr]
]
]
--
Szabolcs Horvát
Mma QA site proposal:
http://area51.stackexchange.com/proposals/37304