Question:
A point P has rectangular coordinates (1, 0, 2 ) and lies on the surface of a sphere centred on the origin.
i) Find the spherical coordinates for point P.
ii) Find an equation for the surface of the sphere.
iii) Using spherical coordinates write a Matlab program that plots the surface of the sphere.
Submit your code and graph.
i) (x, y, z) = (1, 0, √2)
P = √(x2 + y2 + z2) = √(12 + 02 )+ √22 = √3
Q = tan-1(y/x) = tan-1(0/1) = 0
z = pcos(Φ)
cos(Φ) = √2/√3
sin(Φ) = 1/√2
ii) x2 + y2 + z2 = P2