convert_point_3d_spher_to_cart convert_point_3d_spher_to_cart ConvertPoint3dSpherToCart ConvertPoint3dSpherToCart convert_point_3d_spher_to_cart (Operator)
convert_point_3d_spher_to_cart convert_point_3d_spher_to_cart ConvertPoint3dSpherToCart ConvertPoint3dSpherToCart convert_point_3d_spher_to_cart
— Convert spherical coordinates of a 3D point to Cartesian
coordinates.
Signature
Herror convert_point_3d_spher_to_cart (double Longitude , double Latitude , double Radius , const char* EquatPlaneNormal , const char* ZeroMeridian , double* X , double* Y , double* Z )
Herror T_convert_point_3d_spher_to_cart (const Htuple Longitude , const Htuple Latitude , const Htuple Radius , const Htuple EquatPlaneNormal , const Htuple ZeroMeridian , Htuple* X , Htuple* Y , Htuple* Z )
void ConvertPoint3dSpherToCart (const HTuple& Longitude , const HTuple& Latitude , const HTuple& Radius , const HTuple& EquatPlaneNormal , const HTuple& ZeroMeridian , HTuple* X , HTuple* Y , HTuple* Z )
static void HMisc ::ConvertPoint3dSpherToCart (const HTuple& Longitude , const HTuple& Latitude , const HTuple& Radius , const HString& EquatPlaneNormal , const HString& ZeroMeridian , HTuple* X , HTuple* Y , HTuple* Z )
static void HMisc ::ConvertPoint3dSpherToCart (double Longitude , double Latitude , double Radius , const HString& EquatPlaneNormal , const HString& ZeroMeridian , double* X , double* Y , double* Z )
static void HMisc ::ConvertPoint3dSpherToCart (double Longitude , double Latitude , double Radius , const char* EquatPlaneNormal , const char* ZeroMeridian , double* X , double* Y , double* Z )
static void HMisc ::ConvertPoint3dSpherToCart (double Longitude , double Latitude , double Radius , const wchar_t* EquatPlaneNormal , const wchar_t* ZeroMeridian , double* X , double* Y , double* Z )
(
Windows only)
static void HOperatorSet .ConvertPoint3dSpherToCart (HTuple longitude , HTuple latitude , HTuple radius , HTuple equatPlaneNormal , HTuple zeroMeridian , out HTuple x , out HTuple y , out HTuple z )
static void HMisc .ConvertPoint3dSpherToCart (HTuple longitude , HTuple latitude , HTuple radius , string equatPlaneNormal , string zeroMeridian , out HTuple x , out HTuple y , out HTuple z )
static void HMisc .ConvertPoint3dSpherToCart (double longitude , double latitude , double radius , string equatPlaneNormal , string zeroMeridian , out double x , out double y , out double z )
def convert_point_3d_spher_to_cart (longitude : MaybeSequence[float], latitude : MaybeSequence[float], radius : MaybeSequence[float], equat_plane_normal : str, zero_meridian : str) -> Tuple[Sequence[float], Sequence[float], Sequence[float]]
def convert_point_3d_spher_to_cart_s (longitude : MaybeSequence[float], latitude : MaybeSequence[float], radius : MaybeSequence[float], equat_plane_normal : str, zero_meridian : str) -> Tuple[float, float, float]
Description
The operator convert_point_3d_spher_to_cart convert_point_3d_spher_to_cart ConvertPoint3dSpherToCart ConvertPoint3dSpherToCart convert_point_3d_spher_to_cart
converts the
spherical coordinates of a 3D point, which are given in
Longitude Longitude Longitude longitude longitude
, Latitude Latitude Latitude latitude latitude
, and Radius Radius Radius radius radius
, into the
Cartesian coordinates X X X x x
, Y Y Y y y
, and Z Z Z z z
. The
spherical coordinates Longitude Longitude Longitude longitude longitude
and Latitude Latitude Latitude latitude latitude
must
be specified in radians. Furthermore, the Latitude Latitude Latitude latitude latitude
must be
within the range
, where the
latitude of the north pole is
, and hence, the
latitude of the south pole is
.
The orientation of the spherical coordinate system with respect to
the Cartesian coordinate system can be specified with the parameters
EquatPlaneNormal EquatPlaneNormal EquatPlaneNormal equatPlaneNormal equat_plane_normal
and ZeroMeridian ZeroMeridian ZeroMeridian zeroMeridian zero_meridian
.
EquatPlaneNormal EquatPlaneNormal EquatPlaneNormal equatPlaneNormal equat_plane_normal
determines the normal of the equatorial
plane (longitude == 0) pointing to the north pole (positive
latitude) and may take the following values:
'x' "x" "x" "x" "x" :
The equatorial plane is the yz plane. The
positive x axis points to the north pole.
'-x' "-x" "-x" "-x" "-x" :
The equatorial plane is the yz plane. The
positive x axis points to the south pole.
'y' "y" "y" "y" "y" :
The equatorial plane is the xz plane. The
positive y axis points to the north pole.
'-y' "-y" "-y" "-y" "-y" :
The equatorial plane is the xz plane. The
positive y axis points to the south pole.
'z' "z" "z" "z" "z" :
The equatorial plane is the xy plane. The
positive z axis points to the north pole.
'-z' "-z" "-z" "-z" "-z" :
The equatorial plane is the xy plane. The
positive z axis points to the south pole.
The position of the zero meridian can be specified with the
parameter ZeroMeridian ZeroMeridian ZeroMeridian zeroMeridian zero_meridian
. For this, the coordinate axis
(lying in the equatorial plane) that points to the zero meridian
must be passed. The following values for ZeroMeridian ZeroMeridian ZeroMeridian zeroMeridian zero_meridian
are
valid:
'x' "x" "x" "x" "x" :
The positive x axis points in the direction of the zero
meridian.
'-x' "-x" "-x" "-x" "-x" :
The negative x axis points in the direction of the zero
meridian.
'y' "y" "y" "y" "y" :
The positive y axis points in the direction of the zero
meridian.
'-y' "-y" "-y" "-y" "-y" :
The negative y axis points in the direction of the zero
meridian.
'z' "z" "z" "z" "z" :
The positive z axis points in the direction of the zero
meridian.
'-z' "-z" "-z" "-z" "-z" :
The negative z axis points in the direction of the zero
meridian.
Only reasonable combinations of EquatPlaneNormal EquatPlaneNormal EquatPlaneNormal equatPlaneNormal equat_plane_normal
and
ZeroMeridian ZeroMeridian ZeroMeridian zeroMeridian zero_meridian
are permitted, i.e., the normal of the
equatorial plane must not be parallel to the direction of the zero
meridian. For example, the combination
EquatPlaneNormal EquatPlaneNormal EquatPlaneNormal equatPlaneNormal equat_plane_normal
='y' "y" "y" "y" "y" and
ZeroMeridian ZeroMeridian ZeroMeridian zeroMeridian zero_meridian
='-y' "-y" "-y" "-y" "-y" is not permitted.
Note that in order to guarantee a consistent conversion back from
Cartesian to spherical coordinates by using
convert_point_3d_cart_to_spher convert_point_3d_cart_to_spher ConvertPoint3dCartToSpher ConvertPoint3dCartToSpher convert_point_3d_cart_to_spher
, the same values must be
passed for EquatPlaneNormal EquatPlaneNormal EquatPlaneNormal equatPlaneNormal equat_plane_normal
and ZeroMeridian ZeroMeridian ZeroMeridian zeroMeridian zero_meridian
as
were passed to convert_point_3d_spher_to_cart convert_point_3d_spher_to_cart ConvertPoint3dSpherToCart ConvertPoint3dSpherToCart convert_point_3d_spher_to_cart
.
The operator convert_point_3d_spher_to_cart convert_point_3d_spher_to_cart ConvertPoint3dSpherToCart ConvertPoint3dSpherToCart convert_point_3d_spher_to_cart
can be used,
for example, to convert a camera position that is given in spherical
coordinates into Cartesian coordinates. The result can then be
utilized to create a complete camera pose by passing the
Cartesian coordinates to create_cam_pose_look_at_point create_cam_pose_look_at_point CreateCamPoseLookAtPoint CreateCamPoseLookAtPoint create_cam_pose_look_at_point
.
Execution Information
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
Multithreading scope: global (may be called from any thread).
Processed without parallelization.
Parameters
Longitude Longitude Longitude longitude longitude
(input_control) angle.rad(-array) →
HTuple MaybeSequence[float] HTuple Htuple (real) (double ) (double ) (double )
Longitude of the 3D point.
Latitude Latitude Latitude latitude latitude
(input_control) angle.rad(-array) →
HTuple MaybeSequence[float] HTuple Htuple (real) (double ) (double ) (double )
Latitude of the 3D point.
Restriction:
- pi / 2 <= Latitude && Latitude <= pi / 2
Radius Radius Radius radius radius
(input_control) real(-array) →
HTuple MaybeSequence[float] HTuple Htuple (real) (double ) (double ) (double )
Radius of the 3D point.
EquatPlaneNormal EquatPlaneNormal EquatPlaneNormal equatPlaneNormal equat_plane_normal
(input_control) string →
HTuple str HTuple Htuple (string) (string ) (HString ) (char* )
Normal vector of the equatorial plane (points to the
north pole).
Default:
'-y'
"-y"
"-y"
"-y"
"-y"
List of values:
'-x' "-x" "-x" "-x" "-x" , '-y' "-y" "-y" "-y" "-y" , '-z' "-z" "-z" "-z" "-z" , 'x' "x" "x" "x" "x" , 'y' "y" "y" "y" "y" , 'z' "z" "z" "z" "z"
ZeroMeridian ZeroMeridian ZeroMeridian zeroMeridian zero_meridian
(input_control) string →
HTuple str HTuple Htuple (string) (string ) (HString ) (char* )
Coordinate axis in the equatorial plane that points
to the zero meridian.
Default:
'-z'
"-z"
"-z"
"-z"
"-z"
List of values:
'-x' "-x" "-x" "-x" "-x" , '-y' "-y" "-y" "-y" "-y" , '-z' "-z" "-z" "-z" "-z" , 'x' "x" "x" "x" "x" , 'y' "y" "y" "y" "y" , 'z' "z" "z" "z" "z"
X X X x x
(output_control) real(-array) →
HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
X coordinate of the 3D point.
Y Y Y y y
(output_control) real(-array) →
HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Y coordinate of the 3D point.
Z Z Z z z
(output_control) real(-array) →
HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Z coordinate of the 3D point.
Result
If the parameters are valid, the operator
convert_point_3d_spher_to_cart convert_point_3d_spher_to_cart ConvertPoint3dSpherToCart ConvertPoint3dSpherToCart convert_point_3d_spher_to_cart
returns the value 2 (
H_MSG_TRUE )
. If
necessary an exception is raised.
Possible Predecessors
get_shape_model_3d_params get_shape_model_3d_params GetShapeModel3dParams GetShapeModel3dParams get_shape_model_3d_params
See also
convert_point_3d_cart_to_spher convert_point_3d_cart_to_spher ConvertPoint3dCartToSpher ConvertPoint3dCartToSpher convert_point_3d_cart_to_spher
Module
3D Metrology