Group Abstract Group Abstract

Message Boards Message Boards

0
|
5.1K Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

[?] Use ReplaceAll in equations and use PlotParametric3D?

Help me find what is wrong in the following (2 option) code. The objective is replace the symbol assigned from option 1 to alternate symbols . These equations are applied to a PlotParametric3D .

The plot from second option uses ReplaceAll. Unfortunately, the second option plot returns empty. Using WM 11.1 . The second option saws function ReplaceAll .

(* First Option  *)
CoordinateTransformData[
 "Cartesian" -> "OblateSpheroidal", "Mapping", {u, v, w}]
With[{a = 2, \[Xi] = \[Pi]/5},
 ParametricPlot3D[{a Cosh[\[Xi]] Cos[\[Eta]] Cos[\[Phi]], 
   a Cosh[\[Xi]] Cos[\[Eta]] Sin[\[Phi]], 
   a Sinh[\[Xi]] Sin[\[Eta]]}, {\[Eta], -\[Pi]/2, \[Pi]/2}, {\[Phi], 
   0, 2 \[Pi]}]]

(* Second Option  *)
CoordinateTransformData[
 "Cartesian" -> "OblateSpheroidal", "Mapping", {u, v, w}]
sol2 = % /. {u -> \[Xi], v -> \[Eta], w -> \[Phi]}
sol2 = Evaluate[Simplify[sol2 /. x_String :> ToExpression[x]]]
With[{a = 2, \[Xi] = \[Pi]/5},
 ParametricPlot3D[
  sol2, {\[Eta], -\[Pi]/2, \[Pi]/2}, {\[Phi], 0, 2 \[Pi]}]]
POSTED BY: Jose Calderon

With acts only on symbols that appear explicitly in the expression. In your second option neither a nor Xi appear explicitly. You get a plot for example this way:

ParametricPlot3D[sol2 /. {\[FormalA] -> 2, \[Xi] -> \[Pi]/5},
 {\[Eta], -\[Pi]/2, \[Pi]/2}, {\[Phi], 0, 2 \[Pi]}]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard