GLAMERDOC++
Gravitational Lensing Code Library
Public Member Functions | Public Attributes | List of all members
Utilities::Geometry::SphericalPoint< T > Class Template Reference

represents a point in spherical coordinates, theta = 0 is equator More...

#include <geometry.h>

Inheritance diagram for Utilities::Geometry::SphericalPoint< T >:
Inheritance graph
[legend]

Public Member Functions

 SphericalPoint (T r, T theta, T phi)
 
 SphericalPoint (Point_3d< T > &x)
 
SphericalPointoperator= (const SphericalPoint &p)
 
SphericalPointoperator= (Point_3d< T > &x)
 
bool operator== (const SphericalPoint &p) const
 
void TOcartisian (T x[]) const
 output Cartesian coordinates of the point More...
 
Point_3d< T > TOcartisian () const
 output cartisian coordinates of the point
 
void cartisianTOspherical (T const x[])
 set the spherical coordinates of the point from the cartisian coordinates
 
void TOspherical (Point_3d< T > &x)
 
void StereographicProjection (const SphericalPoint &central, T x[]) const
 Calculates the stereographic projection of the point onto a plane. More...
 
void StereographicProjection (const SphericalPoint &central, Point_2d &x) const
 
Point_2d StereographicProjection (const SphericalPoint &central) const
 
void OrthographicProjection (const SphericalPoint &central, T x[]) const
 Calculates the orthographic projection of the point onto a plane. More...
 
Point_2d OrthographicProjection (const SphericalPoint &central) const
 
void InverseOrthographicProjection (const SphericalPoint &central, T const x[])
 Convert from an orthographic projection of the plane onto the unit sphere. More...
 
void InverseOrthographicProjection (const SphericalPoint &central, const Point_2d &x)
 
SphericalPoint< T > InverseOrthographicProjection (const Point_2d &x)
 
angular_separation (SphericalPoint &p)
 angle between points. This uses the haversine formula that is more stable for small angles than the more commin formula
 
Point_3d< T > unitPhi ()
 unit vector in phi direction
 
Point_3d< T > unitTheta ()
 unit vector in theta direction
 
OrthographicAngleTheta (const SphericalPoint &central)
 the angle between the orthographic x-axis and the constant theta curve More...
 
OrthographicAnglePhi (const SphericalPoint &central)
 the angle between the orthographic x-axis and the constant Phi curve More...
 
Point_3d< T > theta_hat () const
 
Point_3d< T > phi_hat () const
 

Public Attributes

r
 
theta
 
phi
 

Detailed Description

template<typename T = double>
class Utilities::Geometry::SphericalPoint< T >

represents a point in spherical coordinates, theta = 0 is equator

Member Function Documentation

◆ InverseOrthographicProjection() [1/3]

template<typename T >
SphericalPoint< T > Utilities::Geometry::SphericalPoint< T >::InverseOrthographicProjection ( const Point_2d x)
Parameters
x2D coordinate on projection

◆ InverseOrthographicProjection() [2/3]

template<typename T >
void Utilities::Geometry::SphericalPoint< T >::InverseOrthographicProjection ( const SphericalPoint< T > &  central,
const Point_2d x 
)
Parameters
centralpoint on the sphere where the tangent plane touches
x2D output coordinate on projection

◆ InverseOrthographicProjection() [3/3]

template<typename T >
void Utilities::Geometry::SphericalPoint< T >::InverseOrthographicProjection ( const SphericalPoint< T > &  central,
T const  x[] 
)

Convert from an orthographic projection of the plane onto the unit sphere.

Parameters
centralpoint on the sphere where the tangent plane touches
x2D output coordinate on projection

◆ OrthographicAnglePhi()

template<typename T >
T Utilities::Geometry::SphericalPoint< T >::OrthographicAnglePhi ( const SphericalPoint< T > &  central)

the angle between the orthographic x-axis and the constant Phi curve

Parameters
centralpoint on the sphere where the tangent plane touches

◆ OrthographicAngleTheta()

template<typename T >
T Utilities::Geometry::SphericalPoint< T >::OrthographicAngleTheta ( const SphericalPoint< T > &  central)

the angle between the orthographic x-axis and the constant theta curve

Parameters
centralpoint on the sphere where the tangent plane touches

◆ OrthographicProjection() [1/2]

template<typename T >
Point_2d Utilities::Geometry::SphericalPoint< T >::OrthographicProjection ( const SphericalPoint< T > &  central) const
Parameters
centralpoint on the sphere where the tangent plane touches

◆ OrthographicProjection() [2/2]

template<typename T >
void Utilities::Geometry::SphericalPoint< T >::OrthographicProjection ( const SphericalPoint< T > &  central,
x[] 
) const

Calculates the orthographic projection of the point onto a plane.

The result is in radian units. Near the central point this is a rectolinear projection onto a tangent plane. Points in the oposite hemosphere are maped to points on the border at |x| = 1

Parameters
centralpoint on the sphere where the tangent plane touches
x2D output coordinate on projection

◆ StereographicProjection() [1/3]

template<typename T >
Point_2d Utilities::Geometry::SphericalPoint< T >::StereographicProjection ( const SphericalPoint< T > &  central) const
Parameters
centralpoint on the sphere where the tangent plane touches

◆ StereographicProjection() [2/3]

template<typename T >
void Utilities::Geometry::SphericalPoint< T >::StereographicProjection ( const SphericalPoint< T > &  central,
Point_2d x 
) const
Parameters
centralpoint on the sphere where the tangent plane touches
x2D output coordinate on projection

◆ StereographicProjection() [3/3]

template<typename T >
void Utilities::Geometry::SphericalPoint< T >::StereographicProjection ( const SphericalPoint< T > &  central,
x[] 
) const

Calculates the stereographic projection of the point onto a plane.

The result is in radian units. Near the central point this is a rectolinear projection onto a tangent plane.

Parameters
centralpoint on the sphere where the tangent plane touches
x2D output coordinate on projection

◆ TOcartisian()

template<typename T >
void Utilities::Geometry::SphericalPoint< T >::TOcartisian ( x[]) const

output Cartesian coordinates of the point

output cartisian coordinates


The documentation for this class was generated from the following file: