@@ -154,17 +154,17 @@ Return `Point3D(x, y, z)` corresponding to `(ρ, θ, ϕ)`:
154
154
155
155
- θ is the azimuthal angle (the longitude) 0 is +x, π is -x, 2π is +x
156
156
157
- - ϕ is the polar angle (the latitude ) 0 is North Pole, π is South Pole
157
+ - ϕ is the polar angle (the colatitude ) 0 is North Pole, π is South Pole
158
158
159
159
There are two major conventions for spherical coordinate notation.
160
160
161
161
In physics books:
162
162
163
- (ρ, θ, φ) gives the radial distance, polar angle (latitude ), and azimuthal angle (longitude)
163
+ (ρ, θ, φ) gives the radial distance, polar angle (colatitude ), and azimuthal angle (longitude)
164
164
165
165
In mathematics books:
166
166
167
- (ρ, θ , φ ) gives the radial distance, azimuthal angle (longitude), and polar angle (latitude )
167
+ (ρ, θ , φ ) gives the radial distance, azimuthal angle (longitude), and polar angle (colatitude )
168
168
169
169
So we're using the mathematics one here.
170
170
"""
@@ -185,7 +185,7 @@ sphericaltocartesian((ρ, θ, ϕ)) = sphericaltocartesian(ρ, θ, ϕ)
185
185
"""
186
186
cartesiantospherical(x, y, z)
187
187
188
- Return `(ρ, θ, ϕ)` (radius, longitude, latitude ) of the Point3D(x, y, z).
188
+ Return `(ρ, θ, ϕ)` (radius, longitude, colatitude ) of the Point3D(x, y, z).
189
189
"""
190
190
function cartesiantospherical (x, y, z)
191
191
ρ = sqrt (x^ 2 + y^ 2 + z^ 2 )
197
197
"""
198
198
cartesiantospherical(pt::Point3D)
199
199
200
- Return `(ρ, θ, ϕ)` (radius, longitude, latitude ) of `pt`.
200
+ Return `(ρ, θ, ϕ)` (radius, longitude, colatitude ) of `pt`.
201
201
"""
202
202
cartesiantospherical (pt:: Point3D ) = cartesiantospherical (pt. x, pt. y, pt. z)
203
203
0 commit comments