infei2006
(Lingfei Li)
January 9, 2022, 1:59am
1
Here, I intend to plot a 3D picture of
with two implicit functions
where x, y, t, \xi, \eta, are variables. Of course, these variables can be constrained to certain interval that will guarantee the function to be well-posed.
How can I draw this one?
problem.nb (5.85 KB)
When t=0 the function you want to plot is identically zero.
Here is an attempt:
func[\[Xi]_, \[Eta]_,
t_] = -((1350.` Sech[\[Eta]]^2 Tanh[\[Eta]] (1.` Sech[
0.1 t - \[Xi]]^2 Tanh[0.1 t - \[Xi]] +
0.6` Sech[0.3 t - \[Xi]]^2 Tanh[0.3 t - \[Xi]] +
1.6` Sech[0.1 t + \[Xi]]^2 Tanh[0.1 t + \[Xi]]))/((1 -
1.5 Sech[\[Eta]]^2) (1 - Sech[0.1 t - \[Xi]]^2 -
0.5 Sech[0.3 t - \[Xi]]^2 -
1.5 Sech[0.1 t + \[Xi]]^2) (0.3 Sech[\[Eta]]^2 +
0.5 Sech[0.1 t - \[Xi]]^2 + 0.3 Sech[0.3 t - \[Xi]]^2 -
0.8` Sech[0.1 t + \[Xi]]^2)^2)) // Rationalize //
Simplify;
xyToXiEta[x_?NumericQ, y_, t_] :=
NSolve[{x == \[Xi] - 1/2 Tanh[\[Xi] - 3/10 t] -
Tanh[\[Xi] - 1/10 t] - 3/2 Tanh[\[Xi] + 1/10 t],
y == \[Eta] - 3/2 Tanh[\[Eta]]}, {\[Xi], \[Eta]}, Reals];
With[{t = 1},
ListPointPlot3D[
Flatten[
Table[{x, y, func[\[Xi], \[Eta], t]} /. xyToXiEta[x, y, t], {x, -1,
1, 1/20}, {y, -1, 1, 1/20}], 2], BoxRatios -> {1, 1, 1},
Axes -> True, PlotRange -> {All, All, 2000 {-1, 1}},
AxesLabel -> {x, y, z}]]
infei2006
(Lingfei Li)
January 9, 2022, 11:17am
4
Thank you for your reply, it gives me a clue.
infei2006
(Lingfei Li)
January 9, 2022, 11:57am
5
Unfortunately,
NSolve[{x == \[Xi] - 1/2 Tanh[\[Xi] - 3/10 t] - Tanh[\[Xi] - 1/10 t] - 3/2 Tanh[\[Xi] + 1/10 t], y == \[Eta] - 3/2 Tanh[\[Eta]]}, {\[Xi], \[Eta]}, Reals]
does not function.
With : t=1 ;
With[{t = 1},
ListPlot3D[
Flatten[Table[{x, y, func[\[Xi], \[Eta], t]} /.
xyToXiEta[x, y, t], {x, -1, 1, 1/20}, {y, -1, 1, 1/20}], 2],
BoxRatios -> {1, 1, 1}, Axes -> True,
PlotRange -> {All, All, 2000 {-1, 1}}, AxesLabel -> {x, y, z}]]
infei2006
(Lingfei Li)
January 9, 2022, 1:57pm
7
Thank you for your reply.
infei2006
(Lingfei Li)
January 9, 2022, 1:59pm
8
Sorry for the mistake, it does function.
xzczd
(xzczd)
January 10, 2022, 2:02pm
9