Questions tagged [spherical-coordinate]

Spherical coordinates (r, θ, φ) as commonly used in physics (ISO convention): radial distance r, polar angle θ (theta), and azimuthal angle φ (phi). The symbol ρ (rho) is often used instead of r. Spherical coordinates (r, θ, φ) as often used in mathematics: radial distance r, azimuthal angle θ, and polar angle φ.

enter image description here

In mathematics, a spherical coordinate system is a coordinate system for three-dimensional space where the position of a point is specified by three numbers: the radial distance of that point from a fixed origin, its polar angle measured from a fixed zenith direction, and the azimuth angle of its orthogonal projection on a reference plane that passes through the origin and is orthogonal to the zenith, measured from a fixed reference direction on that plane. It can be seen as the three-dimensional version of the polar coordinate system.

The radial distance is also called the radius or radial coordinate. The polar angle may be called colatitude, zenith angle, normal angle, or inclination angle.

The use of symbols and the order of the coordinates differs between sources. In one system frequently encountered in physics (r, θ, φ) gives the radial distance, polar angle, and azimuthal angle, whereas in another system used in many mathematics books (r, θ, φ) gives the radial distance, azimuthal angle, and polar angle. In both systems ρ is often used instead of r. Other conventions are also used, so great care needs to be taken to check which one is being used.

A number of different spherical coordinate systems following other conventions are used outside mathematics. In a geographical coordinate system positions are measured in latitude, longitude and height or altitude. There are a number of different celestial coordinate systems based on different fundamental planes and with different terms for the various coordinates. The spherical coordinate systems used in mathematics normally use radians rather than degrees and measure the azimuthal angle counterclockwise from the x-axis to the y-axis rather than clockwise from north (0°) to east (+90°) like the horizontal coordinate system.1 The polar angle is often replaced by the elevation angle measured from the reference plane. Elevation angle of zero is at the horizon.

The spherical coordinate system generalises the two-dimensional polar coordinate system. It can also be extended to higher-dimensional spaces and is then referred to as a hyperspherical coordinate system.

More

80 questions
6
votes
1 answer

Interpolating non-uniformly distributed points on a 3D sphere

I have several points on the unit sphere that are distributed according to the algorithm described in https://www.cmu.edu/biolphys/deserno/pdf/sphere_equi.pdf (and implemented in the code below). On each of these points, I have a value that in my…
Adrien Suau
  • 269
  • 3
  • 11
5
votes
2 answers

Converting spherical coordinates into Cartesian and then converting back into Cartesian isn't giving the desired output

I'm trying to write two functions for converting Cartesian coordinates to spherical coordinates and vice-versa. Here are the equations that I've used for the conversions (also could be found on this Wikipedia page): And Here is my…
4
votes
0 answers

Wrapping Galactic Longitude between (-180, +180) degrees using SphericalCircle in Astropy

I am trying to plot spherical circles in galactic coordinates using the SphericalCircle module in astropy. I'm having trouble wrapping galactic longitude angles between (-180, 180) degrees instead of the default (0, 360) degrees. Below is an example…
Vishnu
  • 499
  • 1
  • 5
  • 23
3
votes
1 answer

Plotting a 3-dimensional superball shape

I'm trying to plot a 3D superball in python matplotlib, where a superball is defined as a general mathematical shape that can be used to describe rounded cubes using a shape parameter p, where for p = 1 the shape is equal to that of a sphere. This…
3
votes
1 answer

Coloring sections of sphere, some regions end up with unassigned colors

I am trying to create a spherical histogram and I have found an addon that creates a spherical histogram, however it uses equal area quadrilaterals and for my purposes I would like to preserve the lines found on the traditional sphere created with…
yes
  • 67
  • 4
3
votes
1 answer

Why is Vector3 not updating Unity3d

I have been losing my sanity on this for a while now. Just disregard the part which is commented out (Not the problem). I am trying to do a 360 degree longitude and 180 degree longitude sweep and then raycast. But apparently the direction vector…
3
votes
2 answers

Python - Plotting Antenna Radiation Pattern

This is a code I found and slightly modified. How can I scale the color from the origin and set the axes from the origin for the visualization? I've tried to find information but most of it is for 2d plots. Here I have added two arrays for theta and…
okrus
  • 81
  • 1
  • 1
  • 8
3
votes
1 answer

Configure SCNNode in scene

I want to display few objects placed around one point like on sphere within SceneKit, but have some issue with object configuration. The main idea is to make camera positioned in the center (0,0,0) and all object will be configured used spherical…
hbk
  • 10,908
  • 11
  • 91
  • 124
2
votes
1 answer

Iterate Through Voxels in Spherical Volume from Center Out

I'm not quite sure the best way to articulate this question, but I am trying to find a relatively simple way programmatically (in Java ideally, though theory is welcome too) to iterate through voxels one at a time starting from a center point and…
klaytonme
  • 83
  • 8
2
votes
1 answer

How to plot a heat map on spherical surface having azimuth and elevation and a corresponding value for every position

I have three values : azimuth, elevation and an error value at that position. And from that I have a number of such 3 value combinations. So three arrays of azimuths, elevations and correspondng error. I want to plot a sphere with heat map such that…
2
votes
2 answers

How would I go about writing a program to rotate at point around a sphere based on an angle as if walking around it?

I am working on a project where I need to (as a 2d point) walk around a 3d sphere. I am having trouble figuring out how to achieve this without polar distortion. Basically I want to have Move Forward, Backward, Left, and Right, as well as Turn Left,…
2
votes
0 answers

Filter by distance from coordinates (Django over MariaDB)?

I have a collection of records with latitude & longitude coordinates in my database. Is there a straightforward way to filter for other objects within some specified radius of a given object? Use would be for a method place.get_nearby(rad_km=1.3)…
2
votes
1 answer

Proper conversion between Quaternions and Spherical Rotation Coordinates?

I'm learning about more quaternion conversions and I have a question regarding quaternion to spherical rotation conversion code at the following section of this…
karamazovbros
  • 950
  • 1
  • 11
  • 40
2
votes
2 answers

Python, Spherical Plot- Color Scaling

I'm pretty new with python. For the past two days I have been trying to figure out how to scale the color of a 3d plot (Antenna Radiation Pattern) with matplotlib. It looks like the scaling works in one of the xyz axis, but not when the scaling goes…
okrus
  • 81
  • 1
  • 1
  • 8
2
votes
1 answer

Conversion from dual fisheye coordinates to equirectangular coordinates

The following link suggests that we can convert dual fisheye coordinates to equirectangular coordinates using the following equations: // 2D fisheye to 3D vector phi = r * aperture / 2 theta = atan2(y, x) // 3D vector to…
chesschi
  • 666
  • 1
  • 8
  • 36
1
2 3 4 5 6