func CartesianToCylindical(coord Vec3) (rho, phi, z float64) {
	rho = float64(math.Hypot(float64(coord[0]), float64(coord[1])))
	phi = float64(math.Atan2(float64(coord[1]), float64(coord[0])))
	z = coord[2]
	return
}
CartesianToCylindical converts 3-dimensional cartesian coordinates (x,y,z) to
cylindrical coordinates with radial distance r, azimuth phi, and height z.

All angles are in radians.
package mgl64
import (
	"math"
)
func CartesianToSpherical(coord Vec3) (r, theta, phi float64) {
	r = coord.Len()
	theta = float64(math.Acos(float64(coord[2] / r)))
	phi = float64(math.Atan2(float64(coord[1]), float64(coord[0])))
	return
}