Spherical Coordinates and Mathematica

Click For Summary
SUMMARY

The discussion focuses on using spherical coordinates to graph the cone defined by the equation z = Sqrt[x^2 + y^2] in Mathematica. The key to solving for the angle \[Phi] is recognizing that the cone's symmetry allows for simplification, leading to the conclusion that \[Phi] equals \(\pi/4\). The correct spherical coordinate transformations are x = \[Rho] sin(\[Phi]) cos(\[Theta]), y = \[Rho] sin(\[Phi]) sin(\[Theta]), and z = \[Rho] cos(\[Phi]). The provided Mathematica code demonstrates how to implement these transformations in a 3D parametric plot.

PREREQUISITES
  • Understanding of spherical coordinates and their transformations
  • Familiarity with Mathematica programming language
  • Basic knowledge of trigonometric functions and their properties
  • Ability to interpret 3D parametric plots
NEXT STEPS
  • Study the derivation of spherical coordinate transformations in detail
  • Learn how to use Mathematica's ParametricPlot3D function effectively
  • Explore the properties of conic sections in spherical coordinates
  • Investigate the implications of symmetry in mathematical modeling
USEFUL FOR

Mathematicians, physics students, computer scientists, and anyone interested in 3D modeling and visualization using Mathematica.

StephenDoty
Messages
261
Reaction score
0
Use spherical coordinates to draw the cone z=Sqrt[x^2+y^2].
Hint: You will need to determine \[Phi].

How would I go about finding phi?
Below are the x y and z components, but I cannot figure out how to find the range of phi:

z^2=x^2 + y^2
(Rho)=sqrt(2x^2+2y^2)

x = sqrt(2x^2+2y^2) sin [Phi] cos [Theta]
y = sqrt(2x^2+2y^2) sin [Phi] sin [Theta]
z = sqrt(2x^2+2y^2) cos [Phi]

Mathematica Code:
ParametricPlot3D[{sqrt(2x^2+2y^2) Sin[[Phi]]*Cos[[Theta]],
sqrt(2x^2+2y^2)Sin[[Phi]] Sin[[Theta]], sqrt(2x^2+2y^2) Cos[[Phi]]}, {[Phi], 0,
Pi}, {[Theta], 0, 2*Pi}, ViewPoint -> {6, 3, 2}]

Any help would be appreciated.
Thanks
Stephen
 
Last edited:
Physics news on Phys.org
StephenDoty said:
Use spherical coordinates to draw the cone z=Sqrt[x^2+y^2].
Hint: You will need to determine \[Phi].

How would I go about finding phi?
Below are the x y and z components, but I cannot figure out how to find the range of phi:

z^2=x^2 + y^2
(Rho)=sqrt(2x^2+2y^2)

x = sqrt(2x^2+2y^2) sin [Phi] cos [Theta]
y = sqrt(2x^2+2y^2) sin [Phi] sin [Theta]
z = sqrt(2x^2+2y^2) cos [Phi]

Mathematica Code:
ParametricPlot3D[{sqrt(2x^2+2y^2) Sin[[Phi]]*Cos[[Theta]],
sqrt(2x^2+2y^2)Sin[[Phi]] Sin[[Theta]], sqrt(2x^2+2y^2) Cos[[Phi]]}, {[Phi], 0,
Pi}, {[Theta], 0, 2*Pi}, ViewPoint -> {6, 3, 2}]

Any help would be appreciated.
Thanks
Stephen
Oh, please don't think of Mathematica as a Panacea. Like any computer program, GIGO! You are mixing Cartesian and Spherical coordinates there: you don't want "x" and "y" in your spherical coordinates formula.

x= \rho cos(\theta)sin(\phi)
and
y= \rho sin(\theta) sin(\phi)
so
x^2+ y^2= \rho^2 sin^2(\phi)(cos^2(\theta)+ sin^2(\theta))= \rho^2 sin^2(\phi)
and so the equation becomes
z= \rho cos(\phi)= \sqrt{\rho^2sin(\phi)}= \rho sin\phi
or simply
cos(\phi)= sin(\phi)
tan(\phi)= 1[/itex]<br /> <br /> Of course, there is a much easier way to find \phi! Since the equation is symmetric in x and y, just look in the xz-plane. If y= 0, the equation becomes z= x, a line which makes an angle of \pi/4 with the x-axis and so the entire cone makes an angle of \pi/2- \pi/4= \pi/4 with the z-axis. That is, \phi= \pi/4. <br /> (And, of course, tan(\pi/4)= 1.)
 
so to graph it would I use
x= (Rho)sin(phi)cos(theta)
y=(Rho)sin(phi)sin(theta)
z=(Rho)cos(phi)

with theta going from 0 to 2pi
phi = pi/4
Rho= some range like (0,3)

or is there a way to solve for Rho?
Thanks
Stephen
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 11 ·
Replies
11
Views
7K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 29 ·
Replies
29
Views
5K
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
Replies
16
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K