# tracing – Table 4D, limiting the slider and drawing ListSliceContourPlot3D

This is a follow-up of an earlier graph where I was trying to visualize 4D, T (x, y, z, t) data (3D space and temperature time).
SliceContourPlot3D. I wanted to get away from the evaluation of the function every time that in the real application my function will have hundreds of elements. So I wanted to create a datatable and use ListSliceContourPlot3D.

This is the first version (thanks to @kglr):

``````Sun[x_, y_, z_, t_] : =
Sin[x] Cos[y] Sin[z] Exp[
t];

data = N[Table[
g[x, y, z, t], {x, 0, 10, 0.1}, {y, 0, 10, 0.1}, {z, 0, 10, 0.1}]];

Handle[
If[planes === {}, planes = {"XStackedPlanes"}];
data2 = data /. north

ListSliceContourPlot3D[data2,
planes /. {"XStackedPlanes" -> {"XStackedPlanes", {i}},
"YStackedPlanes" -> {"YStackedPlanes", {j}},
"ZStackedPlanes" -> {"ZStackedPlanes", {k}}},
DataRange -> {{0, 10}, {0, 10}, {0, 10}},
AxesLabel -> {Style["x", 13, Blue]Style["y", 13, Blue],
Style["z", 13, Blue]}, PlotLegends -> Automatic,
ColorFunction -> "TemperatureMap",
PerformanceGoal -> "Quality"], {{plans, "XStackedPlanes",
Style["Planes of Interest", 12, Blue]}, {"XStackedPlanes",
"YStackedPlanes", "ZStackedPlanes"},
TogglerBar}, {{tijk, 0, style["Time", 12, Blue]}, 0, 10, 1,
Appearance -> "Tagged"}, {{i, 0,
Style["zy plane position", 12, Blue]}, 0, 10, 0.1,
Appearance -> "Labeling",
Enabled -> MemberQ[planes, "XStackedPlanes"]}, {{j, 0,
Style["zx plane position", 12, Blue]}, 0, 10, 0.1,
Appearance -> "Labeling",
Enabled -> MemberQ[planes, "YStackedPlanes"]}, {{k, 0,
Style["xy plane position", 12, Blue]}, 0, 10, 0.1,
Appearance -> "Labeling",
Enabled -> MemberQ[planes, "ZStackedPlanes"]}
Continuous action -> False]
``````

It works but there is room to do it better.

1. The data is limited in x, y, z and the time is continuous, but I can click on the + button in the corner of the slider and enter a value as 8.88 and graph something even if it does not have that data because the data was calculated with 0.1 intervals. How can I prevent the user from entering such a value? Including the limitation of the upper and lower limits.
2. It is still slow, so I wanted to make a 4D table that also calculates time as the spatial variables. But it's too slow even with a short function like this. For me it does not make sense to be so slow, I'm working with Machine Precision. It should be faster. I do not know what I'm missing.

Sun[x_, y_, z_, t_] : =
Sin[x] Cos[y] Sin[z] Exp
data = table[
N[g[x, y, z, t]], {x, 0, 10., 0.5}, {y, 0, 10., 0.5}, {z, 0, 10.,
0.5}, {t, 0, 10., 0.5}];

3- Suppose there is a quicker way to do this after I tried to pick up the correct part that I could not.

ListSliceContourPlot3D[data {All, All, All, tijk},
blueprints /. {"XStackedPlanes" -> {"XStackedPlanes", {i}},
"YStackedPlanes" -> {"YStackedPlanes", {j}},
"ZStackedPlanes" -> {"ZStackedPlanes", {k}}} …..

data here data {x, y, z, t} so the slider of t with tijk will take the correct 3D data that I can draw the plane of interest.

And here again, I need to limit the slider to the places where the data is evaluated. 0, 0.1, …. 7.1 … 10. no 7.88.

(and I'm sorry for some reason, I could not have two of the codes enter here as a code)