3
$\begingroup$

I am trying to plot the family of curves $V = constant$ from the following surface of revolution expressed in spherical coordinates $(r,\theta,\phi)$ with $\phi = constant$:$$ V = \frac{2 r\sin\theta}{1+r^2}$$ where $0 \leq V \leq 1$ , $0 \leq r \lt \infty$ , $0 \leq \theta \leq \pi$ , ( so $ 0 \leq \sin\theta \leq 1$ ) .

How can this be plotted so that $V$ is manipulated between 0 and 1, or plotted for $V$ in increments of 1/10 between 0 and 1 ? I have not been able to do this with any Mathematica plotting functions. Any ideas on how to do this?

$\endgroup$
2
  • $\begingroup$ In Cartesian coordinates, $V = 2\sqrt{x^2+y^2}/(1+x^2+y^2+z^2)$. So restricting to $\phi=0$, that is the $xz$-plane with $x>0$, we would get $V = 2x/(1+x^2+z^2)$. You want a 2-dim ContourPlot of that, in the $xz$ coordinate system? $\endgroup$
    – user293787
    Commented Jul 5, 2022 at 6:26
  • $\begingroup$ @user293787 That is correct, although IMO it seems better to use $\rho$ than $x$ because $x^2+y^2 = \rho^2$ . $\endgroup$
    – Bobster
    Commented Jul 12, 2022 at 15:32

2 Answers 2

3
$\begingroup$

After cogitating on the original answer, I believe that answer is incorrect. On page 112 of the book "Field Theory Handbook" by Moon and Spencer (second edition) is the toroidal coordinate system which has the equation relating the toroidal variable $\eta$ to the cartesian coordinates $(x,y,z)$ as follows:$$x^2+y^2+z^2+a^2= 2a\sqrt{x^2+y^2}\coth\eta$$ The curves $\eta= constant$ in the $\phi=constant$ plane are nested circles with $0\leqslant \eta \lt \infty$. $\quad$We have $$x^2+y^2=\rho^2$$Choosing $a=1$ for use in Mathematica is equivalent to replacing $\rho$ and $z$ with $\frac{\rho}{a}$ and $\frac za$ , so equivalently we have$$ \coth\eta=\frac{\rho^2+z^2+1}{2\rho}$$where $(\rho,\phi,z)$ are the cylindrical coordinates with $\rho\geqslant0$ and $-\infty\lt z\lt+\infty$.$\quad$ In spherical coordinates this is $$\coth\eta=\frac{r^2+1}{2r\sin\theta}$$where $\rho = r\sin\theta$ and $\rho^2+z^2=r^2$.$\quad$We want to study the curves $\eta = constant$, so any function of $\eta$ will give the same curve shape, i.e. the nested circles of toroidal coordinates. If we choose the function $V$ such that $$V=\frac{2r\sin\theta}{r^2+1}$$ then $0\leqslant V\leqslant 1$, or in cylindrical coordinates$$V=\frac{2\rho}{\rho^2+z^2+1}$$This is the formula that is needed for plotting the originally stated problem, but the domain size of $\rho$ must be equal to the domain size of $z$ (like 8 for the ContourPlot below), otherwise the plotted curves will appear as nested ellipses instead of nested circles. I believe that ContourPlot can only be used for 2D cartesian coordinates or cylindrical coordinates $(\rho,z)$ in the $\phi = constant$ plane because angles on one axis like $\theta$ and distances like $r$ on the other makes no sense. Plot of V

$\endgroup$
1
  • 1
    $\begingroup$ You can always choose a new accepted answer if you want, including your own. Only the answer you choose last will have the green checkmark. $\endgroup$
    – user293787
    Commented Jul 11, 2022 at 9:47
2
$\begingroup$

Try ContourPlot

ContourPlot [(2 r Sin[\[Theta]])/(1 + r^2), {r, 0, 10}, {\[Theta], 0, Pi},Contours -> Range[0, 10, .1], PlotLegends -> Automatic]

enter image description here

$\endgroup$
10
  • $\begingroup$ r, θ are spherical coordinates,not the Cartesian coordinate. $\endgroup$
    – cvgmt
    Commented Jul 5, 2022 at 7:09
  • $\begingroup$ @cvgmt Where did you read about cartesian coordinates? $\endgroup$ Commented Jul 5, 2022 at 7:13
  • $\begingroup$ {r, 0, 10}, {θ, 0, Pi} indicate that your set {r, θ} in Cartesion coordinates. $\endgroup$
    – cvgmt
    Commented Jul 5, 2022 at 7:16
  • $\begingroup$ @cvgmt Sorry cannot follow. The question is described in spherical coordinates and the answer is given in the same coordinate space. $\endgroup$ Commented Jul 5, 2022 at 7:20
  • $\begingroup$ For example, when φ = 0, we need to map the contours in the domain {r, 0, 10}, {θ, 0, Pi} to 3D spaces by {r,θ}|->{r Sin[θ], 0, r Cos[θ]} $\endgroup$
    – cvgmt
    Commented Jul 5, 2022 at 8:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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