convert_point_3d_cart_to_spherconvert_point_3d_cart_to_spherConvertPoint3dCartToSpherConvertPoint3dCartToSpherconvert_point_3d_cart_to_spher (Operator)

Name

convert_point_3d_cart_to_spherconvert_point_3d_cart_to_spherConvertPoint3dCartToSpherConvertPoint3dCartToSpherconvert_point_3d_cart_to_spher — Convert Cartesian coordinates of a 3D point to spherical coordinates.

Signature

convert_point_3d_cart_to_spher( : : X, Y, Z, EquatPlaneNormal, ZeroMeridian : Longitude, Latitude, Radius)

Herror convert_point_3d_cart_to_spher(double X, double Y, double Z, const char* EquatPlaneNormal, const char* ZeroMeridian, double* Longitude, double* Latitude, double* Radius)

Herror T_convert_point_3d_cart_to_spher(const Htuple X, const Htuple Y, const Htuple Z, const Htuple EquatPlaneNormal, const Htuple ZeroMeridian, Htuple* Longitude, Htuple* Latitude, Htuple* Radius)

void ConvertPoint3dCartToSpher(const HTuple& X, const HTuple& Y, const HTuple& Z, const HTuple& EquatPlaneNormal, const HTuple& ZeroMeridian, HTuple* Longitude, HTuple* Latitude, HTuple* Radius)

static HTuple HMisc::ConvertPoint3dCartToSpher(const HTuple& X, const HTuple& Y, const HTuple& Z, const HString& EquatPlaneNormal, const HString& ZeroMeridian, HTuple* Latitude, HTuple* Radius)

static double HMisc::ConvertPoint3dCartToSpher(double X, double Y, double Z, const HString& EquatPlaneNormal, const HString& ZeroMeridian, double* Latitude, double* Radius)

static double HMisc::ConvertPoint3dCartToSpher(double X, double Y, double Z, const char* EquatPlaneNormal, const char* ZeroMeridian, double* Latitude, double* Radius)

static double HMisc::ConvertPoint3dCartToSpher(double X, double Y, double Z, const wchar_t* EquatPlaneNormal, const wchar_t* ZeroMeridian, double* Latitude, double* Radius)   (Windows only)

static void HOperatorSet.ConvertPoint3dCartToSpher(HTuple x, HTuple y, HTuple z, HTuple equatPlaneNormal, HTuple zeroMeridian, out HTuple longitude, out HTuple latitude, out HTuple radius)

static HTuple HMisc.ConvertPoint3dCartToSpher(HTuple x, HTuple y, HTuple z, string equatPlaneNormal, string zeroMeridian, out HTuple latitude, out HTuple radius)

static double HMisc.ConvertPoint3dCartToSpher(double x, double y, double z, string equatPlaneNormal, string zeroMeridian, out double latitude, out double radius)

def convert_point_3d_cart_to_spher(x: MaybeSequence[float], y: MaybeSequence[float], z: MaybeSequence[float], equat_plane_normal: str, zero_meridian: str) -> Tuple[Sequence[float], Sequence[float], Sequence[float]]

def convert_point_3d_cart_to_spher_s(x: MaybeSequence[float], y: MaybeSequence[float], z: MaybeSequence[float], equat_plane_normal: str, zero_meridian: str) -> Tuple[float, float, float]

Description

The operator convert_point_3d_cart_to_spherconvert_point_3d_cart_to_spherConvertPoint3dCartToSpherConvertPoint3dCartToSpherConvertPoint3dCartToSpherconvert_point_3d_cart_to_spher converts Cartesian coordinates of a 3D point, which are given in XXXXxx, YYYYyy, and ZZZZzz, into spherical coordinates. The spherical coordinates are returned in LongitudeLongitudeLongitudeLongitudelongitudelongitude, LatitudeLatitudeLatitudeLatitudelatitudelatitude, and RadiusRadiusRadiusRadiusradiusradius. The LongitudeLongitudeLongitudeLongitudelongitudelongitude is returned in the range while the LatitudeLatitudeLatitudeLatitudelatitudelatitude is returned in the range . Furthermore, 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 EquatPlaneNormalEquatPlaneNormalEquatPlaneNormalEquatPlaneNormalequatPlaneNormalequat_plane_normal and ZeroMeridianZeroMeridianZeroMeridianZeroMeridianzeroMeridianzero_meridian.

EquatPlaneNormalEquatPlaneNormalEquatPlaneNormalEquatPlaneNormalequatPlaneNormalequat_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""x":

The equatorial plane is the yz plane. The positive x axis points to the north pole.

'-x'"-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""y":

The equatorial plane is the xz plane. The positive y axis points to the north pole.

'-y'"-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""z":

The equatorial plane is the xy plane. The positive z axis points to the north pole.

'-z'"-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 ZeroMeridianZeroMeridianZeroMeridianZeroMeridianzeroMeridianzero_meridian. For this, the coordinate axis (lying in the equatorial plane) that points to the zero meridian must be passed. The following values for ZeroMeridianZeroMeridianZeroMeridianZeroMeridianzeroMeridianzero_meridian are valid:

'x'"x""x""x""x""x":

The positive x axis points in the direction of the zero meridian.

'-x'"-x""-x""-x""-x""-x":

The negative x axis points in the direction of the zero meridian.

'y'"y""y""y""y""y":

The positive y axis points in the direction of the zero meridian.

'-y'"-y""-y""-y""-y""-y":

The negative y axis points in the direction of the zero meridian.

'z'"z""z""z""z""z":

The positive z axis points in the direction of the zero meridian.

'-z'"-z""-z""-z""-z""-z":

The negative z axis points in the direction of the zero meridian.

Only reasonable combinations of EquatPlaneNormalEquatPlaneNormalEquatPlaneNormalEquatPlaneNormalequatPlaneNormalequat_plane_normal and ZeroMeridianZeroMeridianZeroMeridianZeroMeridianzeroMeridianzero_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 EquatPlaneNormalEquatPlaneNormalEquatPlaneNormalEquatPlaneNormalequatPlaneNormalequat_plane_normal='y'"y""y""y""y""y" and ZeroMeridianZeroMeridianZeroMeridianZeroMeridianzeroMeridianzero_meridian='-y'"-y""-y""-y""-y""-y" is not permitted.

Note that in order to guarantee a consistent conversion back from spherical to Cartesian coordinates by using convert_point_3d_spher_to_cartconvert_point_3d_spher_to_cartConvertPoint3dSpherToCartConvertPoint3dSpherToCartConvertPoint3dSpherToCartconvert_point_3d_spher_to_cart, the same values must be passed for EquatPlaneNormalEquatPlaneNormalEquatPlaneNormalEquatPlaneNormalequatPlaneNormalequat_plane_normal and ZeroMeridianZeroMeridianZeroMeridianZeroMeridianzeroMeridianzero_meridian as were passed to convert_point_3d_cart_to_spherconvert_point_3d_cart_to_spherConvertPoint3dCartToSpherConvertPoint3dCartToSpherConvertPoint3dCartToSpherconvert_point_3d_cart_to_spher.

The operator convert_point_3d_cart_to_spherconvert_point_3d_cart_to_spherConvertPoint3dCartToSpherConvertPoint3dCartToSpherConvertPoint3dCartToSpherconvert_point_3d_cart_to_spher can be used, for example, to convert a given camera position into spherical coordinates. If multiple camera positions are converted in this way, one obtains a pose range (in spherical coordinates), which can be passed to create_shape_model_3dcreate_shape_model_3dCreateShapeModel3dCreateShapeModel3dCreateShapeModel3dcreate_shape_model_3d in order to create a 3D shape model.

Execution Information

Parameters

XXXXxx (input_control)  real(-array) HTupleMaybeSequence[float]HTupleHtuple (real) (double) (double) (double)

X coordinate of the 3D point.

YYYYyy (input_control)  real(-array) HTupleMaybeSequence[float]HTupleHtuple (real) (double) (double) (double)

Y coordinate of the 3D point.

ZZZZzz (input_control)  real(-array) HTupleMaybeSequence[float]HTupleHtuple (real) (double) (double) (double)

Z coordinate of the 3D point.

EquatPlaneNormalEquatPlaneNormalEquatPlaneNormalEquatPlaneNormalequatPlaneNormalequat_plane_normal (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Normal vector of the equatorial plane (points to the north pole).

Default value: '-y' "-y" "-y" "-y" "-y" "-y"

List of values: '-x'"-x""-x""-x""-x""-x", '-y'"-y""-y""-y""-y""-y", '-z'"-z""-z""-z""-z""-z", 'x'"x""x""x""x""x", 'y'"y""y""y""y""y", 'z'"z""z""z""z""z"

ZeroMeridianZeroMeridianZeroMeridianZeroMeridianzeroMeridianzero_meridian (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Coordinate axis in the equatorial plane that points to the zero meridian.

Default value: '-z' "-z" "-z" "-z" "-z" "-z"

List of values: '-x'"-x""-x""-x""-x""-x", '-y'"-y""-y""-y""-y""-y", '-z'"-z""-z""-z""-z""-z", 'x'"x""x""x""x""x", 'y'"y""y""y""y""y", 'z'"z""z""z""z""z"

LongitudeLongitudeLongitudeLongitudelongitudelongitude (output_control)  angle.rad(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Longitude of the 3D point.

LatitudeLatitudeLatitudeLatitudelatitudelatitude (output_control)  angle.rad(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Latitude of the 3D point.

RadiusRadiusRadiusRadiusradiusradius (output_control)  real(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Radius of the 3D point.

Result

If the parameters are valid, the operator convert_point_3d_cart_to_spherconvert_point_3d_cart_to_spherConvertPoint3dCartToSpherConvertPoint3dCartToSpherConvertPoint3dCartToSpherconvert_point_3d_cart_to_spher returns the value 2 (H_MSG_TRUE). If necessary an exception is raised.

Possible Successors

create_shape_model_3dcreate_shape_model_3dCreateShapeModel3dCreateShapeModel3dCreateShapeModel3dcreate_shape_model_3d, find_shape_model_3dfind_shape_model_3dFindShapeModel3dFindShapeModel3dFindShapeModel3dfind_shape_model_3d

See also

convert_point_3d_spher_to_cartconvert_point_3d_spher_to_cartConvertPoint3dSpherToCartConvertPoint3dSpherToCartConvertPoint3dSpherToCartconvert_point_3d_spher_to_cart

Module

3D Metrology