2
$\begingroup$

How to draw sectional plot for a 3D parameter equation?

Firstly, the MMA code is given as

A = -2/3000;
F = (7 Sinh[\[Xi] - 0.3 t])/(30 Cosh[\[Xi] - 0.3 t]) - (
   23 Sinh[\[Xi] - 0.3 t])/(60 (Cosh[\[Xi] - 0.3 t])^3) + (
   7 Sinh[\[Xi] - 0.1 t])/(15 Cosh[\[Xi] - 0.1 t]) - (
   23 Sinh[\[Xi] - 0.1 t])/(30 (Cosh[\[Xi] - 0.1 t])^3) - (
   7 Sinh[\[Xi] + 0.1 t])/(15 Cosh[\[Xi] + 0.1 t]) + (
   23 Sinh[\[Xi] + 0.1 t])/(30 (Cosh[\[Xi] + 0.1 t])^3) + 10;
FX = 0.3 (Sech[\[Xi] - 0.3 t])^2 + 0.5 (Sech[\[Xi] - 0.1 t])^2 - 
   0.8 (Sech[\[Xi] + 0.1 t])^2;
G = (7 Sinh[\[Eta]])/(30 Cosh[\[Eta]]) - (23 Sinh[\[Eta]])/(
   60 (Cosh[\[Eta]])^3);
GY = 0.3 (Sech[\[Eta]])^2;
func[\[Xi]_, \[Eta]_, t_] = (-3 FX*GY)/(2 A (F + G)^2);
With[{t = -25}, 
 With[{X = \[Xi] - 0.5 Tanh[\[Xi] - 0.3 t] - Tanh[\[Xi] - 0.1 t] - 
     1.5 Tanh[\[Xi] + 0.1 t], Y = \[Eta] - 1.15 Tanh[\[Eta]]}, 
  ParametricPlot3D[{X, Y, func[\[Xi], \[Eta], t]}, {\[Xi], 
    4, -10}, {\[Eta], 3, -3}, PlotRange -> All, Mesh -> None, 
   PlotPoints -> 100, ColorFunction -> "Rainbow", 
   AxesLabel -> {Style[x, {15}], Style[y, {15}]}]]]

and it comes

enter image description here

Here, I would like to draw a 2D sectional plot for this 3D graphic at y=0, such as

enter image description here

To achieve this goal, my code is

Y = 0;
With[{t = -25}, 
 With[{X = \[Xi] - 0.5 Tanh[\[Xi] - 0.3 t] - Tanh[\[Xi] - 0.1 t] - 
     1.5 Tanh[\[Xi] + 0.1 t]}, 
  ParametricPlot[{X, func[\[Xi], \[Eta], t]}, {\[Xi], 
    5, -10}, {\[Eta], 3, -3}, PlotRange -> All, Mesh -> None, 
   PlotPoints -> 100, AxesLabel -> {Style[x, {15}], Style[y, {15}]}]]]

and it comes

enter image description here

How can I get the second picture(line sectional plot)?

cross-post: https://community.wolfram.com/groups/-/m/t/2444906?p_p_auth=9qba31rV

$\endgroup$
2
$\begingroup$

Set η = 0

With[{t = -25}, 
 With[{X = ξ - 0.5 Tanh[ξ - 0.3 t] - Tanh[ξ - 0.1 t] - 
     1.5 Tanh[ξ + 0.1 t], η = 0}, 
  ParametricPlot[{X, func[ξ, η, t]}, {ξ, 5, -10}, 
   PlotRange -> All, Mesh -> None, 
   PlotPoints -> 100, 
   AxesLabel -> {Style[x, 15], Style[y, 15]},
   AspectRatio -> 1]]]

enter image description here

$\endgroup$
2
$\begingroup$

Set

MeshFunctions -> {#4 &}, Mesh -> {{0}}, MeshStyle -> Thick, 
   PlotStyle -> None, BoundaryStyle -> None

That is

Y = 0;
With[{t = -25}, 
 With[{X = ξ - 0.5 Tanh[ξ - 0.3 t] - Tanh[ξ - 0.1 t] - 
     1.5 Tanh[ξ + 0.1 t]}, 
  ParametricPlot[{X, func[ξ, η, t]}, {ξ, 
    5, -10}, {η, 3, -3}, PlotRange -> All, PlotPoints -> 100, 
   MeshFunctions -> {#4 &}, Mesh -> {{0}}, MeshStyle -> Thick, 
   PlotStyle -> None, BoundaryStyle -> None, 
   AxesLabel -> {Style[x, {15}], Style[y, {15}]}]]]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.