* Gets the (x, y, z) cartesian coordinates from the current ρ, θ, z polar+z point
*
* @return array an array of 3 floats number, representing the (x, y, z) cartesian coordinates
*/
function to_cartesian () {
$x = $this->r * cos(self::get_radians($this->t));
$y = $this->r * sin(self::get_radians($this->t));
return array($x, $y, $this->z);
}
/**
* Converts the current GeoPointPolarZ instance to a GeoPoint3D instance
*
* @return GeoPoint3D an instance of the GeoPoint3D class representing the (x, y, z) cartesian coordinates
*/
function to_Point3D () {
$pt = $this->to_cartesian();
return new GeoPoint3D($pt[0], $pt[1], $pt[2]);
}
/**
* Gets the (ρ, φ, θ) spherical coordinates from the current (ρ, θ, z) polar+z point
*
* The algo used is from http://fr.wikipedia.org/wiki/Coordonn%C3%A9es_sph%C3%A9riques#Relation_avec_les_autres_syst.C3.A8mes_de_coordonn.C3.A9es_usuels
*
* @return array an array of 3 floats number, representing the (ρ, φ, θ) spherical coordinates