1
$\begingroup$

I use the following code to generate a plot:

a[r_] := A r^3/( r^3 + A^3 L1^2); Rg[r_] := (2 ma r^3)/( r^3 + 2 ma^3 L^2); \[Rho][r_] := r^2 + a[r]^2*Cos[\[Theta]]^2; \[CapitalDelta][r_] := r^2 - Rg[r] r + a[r]^2; g = {{-(1 - (Rg[r] r)/\[Rho][r])(*G[r]*), 0, 0, -((a[r] Sin[\[Theta]]^2 r Rg[r])/\[Rho][r])}, {0, \[Rho][ r]/\[CapitalDelta][r], 0, 0}, {0, 0, \[Rho][r], 0}, {-((a[r] Sin[\[Theta]]^2 r Rg[r])/\[Rho][r]), 0, 0, Sin[\[Theta]]^2 (r^2 + a[r]^2 + ( a[r]^2 Rg[r] r Sin[\[Theta]]^2)/\[Rho][r])}}; v1 = {Sqrt[-(g[[1, 1]] - g[[1, 4]]^2/g[[4, 4]])], 0, 0, 0} ; (v1.g.v1) /. {A -> 6, ma -> 10, L1 -> 0.1, L -> 0.1}; Plot3D[%,{r,0,20},{\[Theta],0,Pi}] 

and I get the plot:

enter image description here

Now I want to add a vertical plane at r=18. How can I do that?

$\endgroup$
3
  • 1
    $\begingroup$ Show[plot, Graphics3D @ InfinitePlane[...]] $\endgroup$ Commented Dec 13, 2019 at 10:25
  • $\begingroup$ @Kuba Could you please be more explicit? In the documentation I have found that I should substitute three coordinate points in [...], but I don't get which. I have tried variuos combination, but I always get the same plot that I have reported. $\endgroup$ Commented Dec 13, 2019 at 10:31
  • $\begingroup$ Have a look at Hyperplane. $\endgroup$ Commented Dec 13, 2019 at 10:36

1 Answer 1

7
$\begingroup$

More information about plane is needed (Thanks to @Kuba's comment)!

Show[{Plot3D[%, {r, 0, 20}, {\[Theta], 0, Pi}, AxesLabel -> Automatic] , Graphics3D[InfinitePlane[{18, 0, 0}, {{0, 1, 0}, {0, 0, 1}}]]}] 

enter image description here

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.