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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started