# Quality of parametric 3D plot on 2D plane

I need to plot the solution of an SDE which takes its values on the plane $$\{z = 1\} \subseteq \mathbb R^3$$. Here is the code of a minimal working example (the solution to the SDE is just the driving Brownian motion):

timeHoriz = 0.1;

trivialSDE =
ItoProcess[{{0, 0, 0}, {{1, 0, 0}, {0, 1, 0}, {0, 0, 0}}, {b1[t],
b2[t], b3[t], t}}, {{b1, b2, b3}, {0, 0, 0}}, {t, 0}];

bmPaths =
Table[RandomFunction[trivialSDE, {0., timeHoriz, 0.0001},
WorkingPrecision -> 60, Method -> "KloedenPlatenSchurz"], {i,
1}];

bmFun[t_] :=
Table[bmPaths[[i]]["PathFunction"][t][[{1, 2, 3}]], {i, 1}];

boxDim = 2;

tanbmPlot =
ParametricPlot3D[{bmFun[t][[1]][[1]], bmFun[t][[1]][[2]],
bmFun[t][[1]][[3]] + a}, {t, 0, timeHoriz},
PlotStyle -> {Thickness[0.001]}, Axes -> False,
PlotRange -> {{-boxDim, boxDim}, {-boxDim, boxDim}, {-boxDim,
boxDim}}]


Here a is a parameter that I would like to set to 1. The problem is that if I set it to any nonzero value, the quality of the plot worsens considerably (as if it's interpolating on very few points). Set it to zero, and you get a high quality plot. The same thing happens if you code the behaviour into the SDE itself by modifying the initial condition:

trivialSDE =
ItoProcess[{{0, 0, 0}, {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}, {b1[t],
b2[t], b3[t], t}}, {{b1, b2, b3}, {0, 0, 1}}, {t, 0}];


Other workarounds fail too and I have absolutely no idea what's going on. How do I get a good quality plot of the solution regardless of the plane I want it to be valued in? Thank you very much for any help.

Edit: here are a couple of screenshots of what I'm seeing. The first is obtained by setting a = 0 and the second by setting a = 1 (or any other nonzero value).

• numPaths isn't defined, example doesn't run! – Ulrich Neumann Jun 11 '19 at 10:39
• @UlrichNeumann Sorry about that, it was set to 1 earlier in my code. I'll edit now. – Emilio Ferrucci Jun 11 '19 at 10:40
• Thanks! ...example still doesn't run – Ulrich Neumann Jun 11 '19 at 10:52
• @UlrichNeumann Strange, it does for me.. have you set the parameter a to 0 or 1? – Emilio Ferrucci Jun 11 '19 at 11:05
• upps... Now it works. I tried to improve the quality using the option MaxRecursion->4 but no imrovement – Ulrich Neumann Jun 11 '19 at 12:12

Here I show, without understanding the background of the problem, the 3D plot:

ParametricPlot3D[{bmFun[t][[1]][[1]], bmFun[t][[1]][[2]],bmFun[t][[1]][[3]] + a}, {t, 0, timeHoriz}, {a, 0, 1.5},PlotStyle -> {Thickness[0.001]}, Axes -> False, ColorFunction -> Function[{x, y, z, u, a}, Hue[a]],PlotRange -> {{{-boxDim, boxDim}, {-boxDim, boxDim}, {-boxDim,boxDim}}, All}[[-1]], MaxRecursion -> 4]


Equal colors show slices a=constant.

Especially the slices a==0 and a==1 are shown in the nect plot.

Show[
Table[
ParametricPlot3D[{bmFun[t][[1]][[1]], bmFun[t][[1]][[2]],bmFun[t][[1]][[3]] + a}, {t, 0, timeHoriz},ColorFunction -> Function[{x, y, z, u, a}, Hue[a ]]]
, {a, 0, 1 ,1}] , Axes -> False,PlotRange -> {{{-boxDim, boxDim}, {-boxDim, boxDim}, {-boxDim,boxDim}}, All}[[-1]], MaxRecursion -> 4]


• Yes it's the same! – Ulrich Neumann Jun 11 '19 at 14:03
• I can't tell if there is a change at a = 0.. Have you not noticed a difference when plotting separately? Maybe it's a glitch on my version then. – Emilio Ferrucci Jun 11 '19 at 15:12
• The plot shows no significant difference for variing a I think! – Ulrich Neumann Jun 11 '19 at 18:41
• I added a couple of screenshots of the plots I'm getting. – Emilio Ferrucci Jun 11 '19 at 20:28