math_cart2sph | R Documentation |
Transform Cartesian to spherical coordinates according to international physics convention:
\theta
in range 0...\pi
(0...180 Deg) and \varphi
in range 0...2\pi
(0...360Deg)
math_cart2sph(xyz, DEG = FALSE)
xyz |
c(x, y, z) cartesian coordinates as vector or matrix |
DEG |
return angles |
https://de.wikipedia.org/wiki/Kugelkoordinaten#Umrechnungen
named vector or matrix
Florian Wagner florian.wagner@wagnius.ch
math_cart2sph(c(1,1,1), DEG = TRUE)
rbind(c(1,0.5,0.1),
c(1,0.2,0.6))|>
math_cart2sph()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.