Question: Make a 3D scatter plot: points on a sphere. The conversion between standard spherical coordinates r, ?, ? and cartesian coordinates c, y, z is

Make a 3D scatter plot: points on a sphere. The conversion between standard spherical coordinates r, ?, ? and cartesian coordinates c, y, z is y rsin ? sin ?, = Here the radius must obey r ? 0, the polar angle "theta" must obey 0 ?-T, and the azimuthal angle "phi" must obey 0 ? 2?. Make a plot of some points on the surface of a sphere, as follows: Set r to a fixed value of your choosing. Start with empty lists for the x, y and z coordinates of your points (for example, set xiist = [], etc.) Then use nested for statements to vary ? over N values covering its allowed range, and similarly vary ? over N points (for example, you can use for theta in np.linspace (0,pi,nn):). For each of these N2 points calculate z, y, z and append to the lists. Make a 3D scatter plot of the resulting points. Start with N = 20 then increase N once your program is working.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!