![]() For example, try this: T = Spherical('radius', ) # matches Mathematica ordering Read the documentation to Spherical to see how to change the coordinate system to match Mathematica's order. So according to many calculus textbook, and according to the Wolfram Mathworld website, Mathematica has the names backwards (i.e., Mathematica uses theta for inclination angle and phi for azimuth angle, whereas typical mathematical convention is to use theta for azimuth angle and phi for inclination angle). Note that in mathematica, the SphericalPlot3d "phi" corresponds to the PolarPlot "theta" (that's the azimuth angle) and the SphericalPlot3d "theta" is the inclination angle (which in lots of calculus textbooks is called "phi"). This is consistent with calculus textbooks, for example, and provides a natural extension of the polar plot commands (where the single parameter is the azimuth angle). The spherical_plot3d function adopts the convention that the first argument is the azimuth angle and the second angle is the inclination angle (or "polar angle"). In Sage, you can define the coordinates however you choose. ![]() See mathworld for many ways in which spherical coordinates are phrased in different disciplines. In Sage, we use "azimuth", "elevation", and "inclination", rather than "phi" and "theta". In different disciplines, phi and theta mean different things. What command should I give in sage to get a plot like the one we get from Mathematica? The following plot is what I wanted using spherical3d plotīut in sage, giving the same command is giving me this plot instead. I shall also give another example with pictures. I want to do a 3d polar plot of this to get a doughnut shape Or Another Example: polar_plot of cos(theta) I wanted to plot this sin(2*theta) function as a 3d plot, by revolving it around by it's vertical axis.īut the command spherical_plot3d(sin(2*theta),(theta,0,2*pi),(x,0,pi)) I tried spherical_plot but it is not giving me the plot which I expect to be equivalent to the revolution surface I get from rotating the 2d polar plot along vertical axis.Įxample: show(polar_plot(sin(2*theta),theta,0,2*pi)) The polar plot is of the form r=f(theta).īut the polar_plot function in sage gives me only 2d plot. I have to make a 3d plot by rotating a 2d polar plot along the vertical axis. The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. The cookie is used to store the user consent for the cookies in the category "Performance". This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. The cookies is used to store the user consent for the cookies in the category "Necessary". ![]() The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". ![]() The cookie is used to store the user consent for the cookies in the category "Analytics". These cookies ensure basic functionalities and security features of the website, anonymously. Necessary cookies are absolutely essential for the website to function properly.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |