Graph spherical coordinates4/16/2024 ![]() This is the same angle that we saw in polar/cylindrical coordinates. This is the distance from the origin to the point and we will require 0 0. Polar plots can be drawn using SphericalPlot3Dr, phi, phimin, phimax, theta, thetamin, thetamax.The plots above are spherical plots of the equations and, where denotes the real part and the imaginary part. Substituting the value of R we found earlier gives x = r*sin(ϕ)*cos(θ).įor y, we use similar logic to get y = R*sin(θ). Spherical coordinates consist of the following three quantities. A plot of a function expressed in spherical coordinates, with radius as a function of angles and. Construct another triangle in the xy-plane with a hypotenuse of length R, and with an angle of θ between the hypotenuse and x-component.įor x, we find that cos(θ) = x/R. Now that we have the component of r in the xy-plane, we can find the x and y components. The component of r in the xy-plane, which I'll refer to as R, is given by sin(ϕ) = R/r. Then solve for z to find z = r*cos(ϕ).įor x and y, we first have to find the component in the xy-plane, then use θ to solve for the two coordinates. This is the angle between the hypotenuse of the triangle and its z-component.įor z, take cos(ϕ) = z/r. To do this, I find it easier to first find that ϕ is the angle of the triangle opposite the line segment in the xy-plane. To find the values of x, y, and z in spherical coordinates, you can construct a triangle, like the first figure in the article, and use trigonometric identities to solve for the coordinates in terms of r, theta, and phi. This seems to be screwing up the interpolation routine, which isn't able to identify that it. above the x,y plane) has effective neighbours as mirror images below. Of course, what is happening is that I have multiple points with the same (or similar) (x,y) coordinates, but very different z coordinates, since every point on the sphere 'above the equator' (i.e. Now what I find is that my plot is all 'spiky', whereas I was hoping to see a smooth sphere. Sage: myPlot1 = list_plot3d(listOfPointsOnSurfaceOfSphere).show() Sage: r=1 # Representing the gain of an isotropic antenna However, when generating the points to plot I transform from spherical to cartesian coordinates when setting up the list of points to plot, thus: Thus what we are simply trying to do is to plot a sphere in 3 dimensions from a list of 3-tuples, where each tuple represents an (x,y,z) coordinate in Cartesian space. one which has equal gain in all directions. First, we need to recall just how spherical coordinates are defined. To discuss this case we can simplify the problem to say that we wish to plot the radiation pattern of an isotropic antenna, i.e. I also tried a different approach, which is to use list_plot3d, but to transform the coordinates from spherical to rectangular when building up my list to plot. Is there any way I can have fine control of the step-size in phi and theta (u and v in Sage-speak), or must I leave it to Sage to control these? ![]() However, the 3D plot which the above command delivers (via Jmol) seems to smooth the pattern where I don't want it to be smoothed (because it has abrupt edges), and is too 'blocky' where I would like the pattern to be smooth. My LUT has a high resolution with 0.1 degree intervals. Now this almost does what I want, but not quite. Which returned a value from the lookup table (LUT) representing antenna gain (a positive number in decibels). Check whether you want to plot in cylindrical coordinates or spherical coordinates. My first attempt at plotting this in Sage was to use the 'spherical_plot3d()' function. However, my problem generalises to any one of plotting a function in spherical coordinates. antenna gain/ radiation intensity as a function of theta and phi). The LUT in fact represents an antenna radiation pattern (i.e. The LUT is actually stored as a numpy 1801*3601 2D array indexed by theta and phi respectively in 0.1 degree steps. My problem is that I am trying to plot (in full 3D spherical coordinates) a set of values stored in a 2D lookup table or LUT.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |