JuliaGeometry / CoordinateTransformations.jl

A fresh approach to coordinate transformations...
Other
178 stars 25 forks source link

Add Alternative Spherical angle conventions #73

Open jonalm opened 3 years ago

jonalm commented 3 years ago

Would you consider having an alternative Spherical coordinate conventions, in particular the one which (at least according to wikipedia https://en.wikipedia.org/wiki/Spherical_coordinate_system#Conventions) is common practice in physics (i.e. x = [r sin(theta) cos(phi), r sin(\theta)sin(\phi), r cos(theta)]). This could live along the current convention like SphericalPhysics or PhysicsSpherical, or by adding a type parameter which indicates the convention Spherical{T,A, Convension}?

waldyrious commented 3 years ago

See also #25 and #68.

marius311 commented 1 year ago

+1 this would be really useful.

For future reference, if you're used to this:

image

Then you would construct:

Spherical(1, ϕ, π/2-θ)