GOAT (Geometrical optics application tool) 0.1
Loading...
Searching...
No Matches
GOAT::raytracing::tubedRay Class Reference

This class represents a ray with a finite cross section. class tubedRay: This class represents a ray with a finite cross section. Therefore it is defined by four edge rays and one probe ray in the middle. Therefore, selffocusing of the ray can be considered. Each of these rays has its own electric field and directional vector. The probe ray is used to decide wether an object is hidden or not. More...

#include <tubedray.h>

Inheritance diagram for GOAT::raytracing::tubedRay:
GOAT::raytracing::RayBase

Public Member Functions

void checkObjectIntersection (int Index[5], maths::Vector< double > *Pmin)
double cross (const maths::Vector< double > P10, const maths::Vector< double > P11, const maths::Vector< double > P20, const maths::Vector< double > P21)
maths::Vector< double > crossPlane (const maths::Vector< double > Pe, const maths::Vector< double > n)
double crossXAxis (const maths::Vector< double > &P1, const maths::Vector< double > &P2, const maths::Vector< double > &k)
int currentObjectIndex ()
 returns index of the currently hitted object
bool Einschluss ()
 like isInObject (for compatibilty reasons, will be removed in future)
ObjectShapeEinschluss (int i)
double flaeche ()
maths::Matrix< std::complex< double > > Fresnel_reflect (double alpha, std::complex< double > n1, std::complex< double > n2)
 calculates the Fresnel matrix for the reflected beam (used in method reflect)
maths::Matrix< std::complex< double > > Fresnel_trans (double alpha, std::complex< double > beta, std::complex< double > n1, std::complex< double > n2)
 calculates the Fresnel matrix for the refracted beam (used in method reflect)
maths::Vector< std::complex< double > > getAmp (int i)
 returns the value of the electric field of the i-th sub-ray
maths::Vector< std::complex< double > > getE ()
 gives back electric field strength
maths::Vector< double > getk ()
 return the directional vector of the central sub-ray (same as getk(4) )
maths::Vector< double > getk (int i)
 returns the directional vector of the i-th sub-ray
maths::Vector< double > getP ()
 returns the position of the central sub-ray (same as getP(4) )
maths::Vector< double > getP (int i)
 returns the position of the i-th sub-ray
void getP (maths::Vector< double > p[5])
 returns an array whichs holds the current positions of the sub-rays
std::complex< double > getphi (int i)
std::complex< double > getRefract ()
 returns the current refractive index
bool Getunnelt ()
void initElectricField (const maths::Vector< std::complex< double > > &Pol, const int numRays, double dx, Plane Eb)
void initElectricField (const maths::Vector< std::complex< double > > &Pol, int AnzRays=1)
void initElectricFieldGauss (int i, const Plane &Eb, const maths::Vector< std::complex< double > > &Pol)
double Intensity (int i)
 returns the squared magnitude of the electric field
bool isInObject ()
 Is the ray currently inside an object?
bool next ()
 do the next step
maths::Vector< double > nextCaustic (double &l)
double normVol (maths::Vector< double > P[5], maths::Vector< double > k, maths::Vector< double > n)
int objectIndex ()
 index of the current object or -1
tubedRayoperator= (const tubedRay &S)
double pjump (maths::Vector< double > P1[5], maths::Vector< double > P2[5], const double epsilon=1E-10)
 This method checks if there is a phase jump due to self focusing The method checks if neighboring edge rays cross each other between the start position and the end position. In this case a phase jump of -pi has to be considered. The parameter epsilon is there for compatibility reasons and will not be considered (the parameter will be removed in future)
double pjump (maths::Vector< double > P1[5], maths::Vector< double > P2[5], maths::Vector< double > *S)
 This method checks if there is a phase jump due to self focusing The method checks if neighboring edge rays cross each other. In this case a phase jump of -pi has to be considered.
double pjump (void)
 for internal use only
tubedRay reflect (maths::Vector< double > *n, std::complex< double > n1, std::complex< double > n2)
 This method reflects the beam.
tubedRay reflect (maths::Vector< double > n, std::complex< double > n1, std::complex< double > n2)
int reflections ()
void reflectRay (RayBase *&tray, maths::Vector< double > n, std::complex< double > n1, std::complex< double > n2)
 reflects ray
void refract (maths::Vector< double > *n, std::complex< double > n1, std::complex< double > n2)
 This method refracts the beam.
void refract (maths::Vector< double > n, std::complex< double > n1, std::complex< double > n2)
 Strahl wird reflektiert.
maths::Vector< double > schneidePlane (const Plane &E, bool &found)
int schneidePlane (const Plane &E, double d, maths::Vector< double > &S1, maths::Vector< double > &S2)
bool schneidePlane (maths::Vector< double > *Erg, const Plane &E)
void setAmp (int i, const maths::Vector< std::complex< double > > &A)
 sets the value of the electric field of the i-th sub-ray
void setGauss (Gauss g)
void setGetunnelt (bool v)
void setiR (int i)
void setk (int i, const maths::Vector< double > &K)
void setN0 (std::complex< double > n)
void setP (int i, const maths::Vector< double > &p)
void setphi (int i, const std::complex< double > &p)
void setRefract (std::complex< double > n)
 set current refractive index
 tubedRay ()
 tubedRay (const maths::Vector< double > &p, double dy, double dz, const maths::Vector< std::complex< double > > &Pol, const maths::Vector< double > &K, std::complex< double > n0, double r0, double k0, const int Anzein=0, std::vector< ObjectShape * > Einschluss=std::vector< ObjectShape * >(), bool logRay=false)
 tubedRay (const tubedRay &ray)
 tubedRay (Plane E, const maths::Vector< double > &p, double dy, double dz, const maths::Vector< std::complex< double > > &Pol, std::complex< double > n0, double r0, double k0, const int Anzein=0, std::vector< ObjectShape * > Einschluss=std::vector< ObjectShape * >(), bool logRay=false)
 tubedRay (tubedRayBuffer &B)
void tunnel (maths::Vector< std::complex< double > > Pol, std::complex< double > n1, std::complex< double > n2)
 Strahl wird gebrochen.
void tunnel (maths::Vector< std::complex< double > > Pol, std::complex< double > na, std::complex< double > np, int l)
 ~tubedRay ()

Public Attributes

maths::Vector< std::complex< double > > E [5]
Gauss g
bool getunnelt
int iR
bool isValid
maths::Vector< double > k [5]
maths::Vector< double > ka
double KORR
bool logRay
maths::Vector< double > OK
maths::Vector< double > P [5]
std::complex< double > phi [5]
int pol
Public Attributes inherited from GOAT::raytracing::RayBase
bool inObject =false
 is in an object
int iR =0
 number of reflections already done
double k0 =2.0*M_PI
 wave number
std::complex< double > n
std::complex< double > n0
 current refractive index and refractive index of the host material
int numObj =0
 number of objects
std::vector< ObjectShape * > Obj
 list of all objects
int objIndex =0
 index of the current object
double r0 =1.0
double rc =1.0
 radius of the calculation sphere
int status = RAYBASE_STATUS_NONE
bool suppress_phase_progress =false
 suppress phase change in next(), needed for short pulse consideration
RayBasetray =0
 transmitted ray (used by the raytracer, for internal use only)

Friends

std::ostream & operator<< (std::ostream &os, tubedRay S)

Detailed Description

This class represents a ray with a finite cross section. class tubedRay: This class represents a ray with a finite cross section. Therefore it is defined by four edge rays and one probe ray in the middle. Therefore, selffocusing of the ray can be considered. Each of these rays has its own electric field and directional vector. The probe ray is used to decide wether an object is hidden or not.

Definition at line 88 of file tubedray.h.

Constructor & Destructor Documentation

◆ tubedRay() [1/5]

GOAT::raytracing::tubedRay::tubedRay ( )

◆ tubedRay() [2/5]

GOAT::raytracing::tubedRay::tubedRay ( const tubedRay & ray)

◆ tubedRay() [3/5]

GOAT::raytracing::tubedRay::tubedRay ( tubedRayBuffer & B)

◆ tubedRay() [4/5]

GOAT::raytracing::tubedRay::tubedRay ( Plane E,
const maths::Vector< double > & p,
double dy,
double dz,
const maths::Vector< std::complex< double > > & Pol,
std::complex< double > n0,
double r0,
double k0,
const int Anzein = 0,
std::vector< ObjectShape * > Einschluss = std::vector< ObjectShape * >(),
bool logRay = false )

Constructor of tubedRay which is described by the

Parameters
g

◆ tubedRay() [5/5]

GOAT::raytracing::tubedRay::tubedRay ( const maths::Vector< double > & p,
double dy,
double dz,
const maths::Vector< std::complex< double > > & Pol,
const maths::Vector< double > & K,
std::complex< double > n0,
double r0,
double k0,
const int Anzein = 0,
std::vector< ObjectShape * > Einschluss = std::vector< ObjectShape * >(),
bool logRay = false )

◆ ~tubedRay()

GOAT::raytracing::tubedRay::~tubedRay ( )

Member Function Documentation

◆ checkObjectIntersection()

void GOAT::raytracing::tubedRay::checkObjectIntersection ( int Index[5],
maths::Vector< double > * Pmin )

◆ cross()

double GOAT::raytracing::tubedRay::cross ( const maths::Vector< double > P10,
const maths::Vector< double > P11,
const maths::Vector< double > P20,
const maths::Vector< double > P21 )

◆ crossPlane()

maths::Vector< double > GOAT::raytracing::tubedRay::crossPlane ( const maths::Vector< double > Pe,
const maths::Vector< double > n )

◆ crossXAxis()

double GOAT::raytracing::tubedRay::crossXAxis ( const maths::Vector< double > & P1,
const maths::Vector< double > & P2,
const maths::Vector< double > & k )

◆ currentObjectIndex()

int GOAT::raytracing::tubedRay::currentObjectIndex ( )
inline

returns index of the currently hitted object

Definition at line 136 of file tubedray.h.

◆ Einschluss() [1/2]

bool GOAT::raytracing::tubedRay::Einschluss ( )
inline

like isInObject (for compatibilty reasons, will be removed in future)

Definition at line 130 of file tubedray.h.

◆ Einschluss() [2/2]

ObjectShape * GOAT::raytracing::tubedRay::Einschluss ( int i)
inline

Definition at line 128 of file tubedray.h.

◆ flaeche()

double GOAT::raytracing::tubedRay::flaeche ( )

◆ Fresnel_reflect()

maths::Matrix< std::complex< double > > GOAT::raytracing::tubedRay::Fresnel_reflect ( double alpha,
std::complex< double > n1,
std::complex< double > n2 )

calculates the Fresnel matrix for the reflected beam (used in method reflect)

Parameters
[in]alphaangle of incidence (in radiants)
[in]n1refractive index first medium
[in]n2refractive index second medium
Returns
Fresnel matrix

◆ Fresnel_trans()

maths::Matrix< std::complex< double > > GOAT::raytracing::tubedRay::Fresnel_trans ( double alpha,
std::complex< double > beta,
std::complex< double > n1,
std::complex< double > n2 )

calculates the Fresnel matrix for the refracted beam (used in method reflect)

Parameters
[in]alphaangle of incidence (in radiants)
[in]n1refractive index first medium
[in]n2refractive index second medium
Returns
Fresnel matrix

◆ getAmp()

maths::Vector< std::complex< double > > GOAT::raytracing::tubedRay::getAmp ( int i)
inline

returns the value of the electric field of the i-th sub-ray

Definition at line 126 of file tubedray.h.

◆ getE()

maths::Vector< std::complex< double > > GOAT::raytracing::tubedRay::getE ( )
inlinevirtual

gives back electric field strength

Implements GOAT::raytracing::RayBase.

Definition at line 104 of file tubedray.h.

◆ getk() [1/2]

maths::Vector< double > GOAT::raytracing::tubedRay::getk ( )
inlinevirtual

return the directional vector of the central sub-ray (same as getk(4) )

Implements GOAT::raytracing::RayBase.

Definition at line 121 of file tubedray.h.

◆ getk() [2/2]

maths::Vector< double > GOAT::raytracing::tubedRay::getk ( int i)
inline

returns the directional vector of the i-th sub-ray

Definition at line 120 of file tubedray.h.

◆ getP() [1/3]

maths::Vector< double > GOAT::raytracing::tubedRay::getP ( )
inlinevirtual

returns the position of the central sub-ray (same as getP(4) )

Implements GOAT::raytracing::RayBase.

Definition at line 123 of file tubedray.h.

◆ getP() [2/3]

maths::Vector< double > GOAT::raytracing::tubedRay::getP ( int i)
inline

returns the position of the i-th sub-ray

Definition at line 122 of file tubedray.h.

◆ getP() [3/3]

void GOAT::raytracing::tubedRay::getP ( maths::Vector< double > p[5])
inline

returns an array whichs holds the current positions of the sub-rays

Definition at line 125 of file tubedray.h.

◆ getphi()

std::complex< double > GOAT::raytracing::tubedRay::getphi ( int i)
inline

Definition at line 124 of file tubedray.h.

◆ getRefract()

std::complex< double > GOAT::raytracing::tubedRay::getRefract ( )
inline

returns the current refractive index

Definition at line 113 of file tubedray.h.

◆ Getunnelt()

bool GOAT::raytracing::tubedRay::Getunnelt ( )
inline

Definition at line 135 of file tubedray.h.

◆ initElectricField() [1/2]

void GOAT::raytracing::tubedRay::initElectricField ( const maths::Vector< std::complex< double > > & Pol,
const int numRays,
double dx,
Plane Eb )

◆ initElectricField() [2/2]

void GOAT::raytracing::tubedRay::initElectricField ( const maths::Vector< std::complex< double > > & Pol,
int AnzRays = 1 )

◆ initElectricFieldGauss()

void GOAT::raytracing::tubedRay::initElectricFieldGauss ( int i,
const Plane & Eb,
const maths::Vector< std::complex< double > > & Pol )

◆ Intensity()

double GOAT::raytracing::tubedRay::Intensity ( int i)
inline

returns the squared magnitude of the electric field

Definition at line 137 of file tubedray.h.

◆ isInObject()

bool GOAT::raytracing::tubedRay::isInObject ( )
inlinevirtual

Is the ray currently inside an object?

Implements GOAT::raytracing::RayBase.

Definition at line 131 of file tubedray.h.

◆ next()

bool GOAT::raytracing::tubedRay::next ( )
virtual

do the next step

Implements GOAT::raytracing::RayBase.

◆ nextCaustic()

maths::Vector< double > GOAT::raytracing::tubedRay::nextCaustic ( double & l)

◆ normVol()

double GOAT::raytracing::tubedRay::normVol ( maths::Vector< double > P[5],
maths::Vector< double > k,
maths::Vector< double > n )

◆ objectIndex()

int GOAT::raytracing::tubedRay::objectIndex ( )
inlinevirtual

index of the current object or -1

Implements GOAT::raytracing::RayBase.

Definition at line 105 of file tubedray.h.

◆ operator=()

tubedRay & GOAT::raytracing::tubedRay::operator= ( const tubedRay & S)

◆ pjump() [1/3]

double GOAT::raytracing::tubedRay::pjump ( maths::Vector< double > P1[5],
maths::Vector< double > P2[5],
const double epsilon = 1E-10 )

This method checks if there is a phase jump due to self focusing The method checks if neighboring edge rays cross each other between the start position and the end position. In this case a phase jump of -pi has to be considered. The parameter epsilon is there for compatibility reasons and will not be considered (the parameter will be removed in future)

Parameters
[in]P1Array which holds the start position of the edge rays
[in]P2Array which holds the end position of the edge rays
Returns
value of the phase jump (0, \(-\frac{\pi}{2}\) or \(-\pi\))

◆ pjump() [2/3]

double GOAT::raytracing::tubedRay::pjump ( maths::Vector< double > P1[5],
maths::Vector< double > P2[5],
maths::Vector< double > * S )

This method checks if there is a phase jump due to self focusing The method checks if neighboring edge rays cross each other. In this case a phase jump of -pi has to be considered.

Parameters
[in]P1Array which holds the start position of the edge rays
[in]P2Array which holds the end position of the edge rays
[out]SArray of two vectors which hold the position of the foci for self focusing, if it exists otherwise it is set to a zero vector
Returns
value of the phase jump (0, \(-\frac{\pi}{2}\) or \(-\pi\))

◆ pjump() [3/3]

double GOAT::raytracing::tubedRay::pjump ( void )

for internal use only

◆ reflect() [1/2]

tubedRay GOAT::raytracing::tubedRay::reflect ( maths::Vector< double > * n,
std::complex< double > n1,
std::complex< double > n2 )

This method reflects the beam.

Parameters
[in]nsurface normal (angles of incidence will be calculated with help of the directional vectors k)
[in]n1refractive index first medium
[in]n2refractive index second medium
Returns
refracted ray

◆ reflect() [2/2]

tubedRay GOAT::raytracing::tubedRay::reflect ( maths::Vector< double > n,
std::complex< double > n1,
std::complex< double > n2 )

◆ reflections()

int GOAT::raytracing::tubedRay::reflections ( )
inline

Definition at line 139 of file tubedray.h.

◆ reflectRay()

void GOAT::raytracing::tubedRay::reflectRay ( RayBase *& tray,
maths::Vector< double > n,
std::complex< double > n1,
std::complex< double > n2 )
virtual

reflects ray

Implements GOAT::raytracing::RayBase.

◆ refract() [1/2]

void GOAT::raytracing::tubedRay::refract ( maths::Vector< double > * n,
std::complex< double > n1,
std::complex< double > n2 )

This method refracts the beam.

Parameters
[in]narray which holds surface normals of the edge rays (angles of incidence will be calculated with help of the directional vectors k)
[in]n1refractive index first medium
[in]n2refractive index second medium

◆ refract() [2/2]

void GOAT::raytracing::tubedRay::refract ( maths::Vector< double > n,
std::complex< double > n1,
std::complex< double > n2 )

Strahl wird reflektiert.

◆ schneidePlane() [1/3]

maths::Vector< double > GOAT::raytracing::tubedRay::schneidePlane ( const Plane & E,
bool & found )

◆ schneidePlane() [2/3]

int GOAT::raytracing::tubedRay::schneidePlane ( const Plane & E,
double d,
maths::Vector< double > & S1,
maths::Vector< double > & S2 )

◆ schneidePlane() [3/3]

bool GOAT::raytracing::tubedRay::schneidePlane ( maths::Vector< double > * Erg,
const Plane & E )

◆ setAmp()

void GOAT::raytracing::tubedRay::setAmp ( int i,
const maths::Vector< std::complex< double > > & A )
inline

sets the value of the electric field of the i-th sub-ray

Definition at line 127 of file tubedray.h.

◆ setGauss()

void GOAT::raytracing::tubedRay::setGauss ( Gauss g)
inline

Definition at line 102 of file tubedray.h.

◆ setGetunnelt()

void GOAT::raytracing::tubedRay::setGetunnelt ( bool v)
inline

Definition at line 118 of file tubedray.h.

◆ setiR()

void GOAT::raytracing::tubedRay::setiR ( int i)
inline

Definition at line 117 of file tubedray.h.

◆ setk()

void GOAT::raytracing::tubedRay::setk ( int i,
const maths::Vector< double > & K )
inline

Definition at line 114 of file tubedray.h.

◆ setN0()

void GOAT::raytracing::tubedRay::setN0 ( std::complex< double > n)
inline

Definition at line 119 of file tubedray.h.

◆ setP()

void GOAT::raytracing::tubedRay::setP ( int i,
const maths::Vector< double > & p )
inline

Definition at line 116 of file tubedray.h.

◆ setphi()

void GOAT::raytracing::tubedRay::setphi ( int i,
const std::complex< double > & p )
inline

Definition at line 115 of file tubedray.h.

◆ setRefract()

void GOAT::raytracing::tubedRay::setRefract ( std::complex< double > n)
inline

set current refractive index

Definition at line 112 of file tubedray.h.

◆ tunnel() [1/2]

void GOAT::raytracing::tubedRay::tunnel ( maths::Vector< std::complex< double > > Pol,
std::complex< double > n1,
std::complex< double > n2 )

Strahl wird gebrochen.

◆ tunnel() [2/2]

void GOAT::raytracing::tubedRay::tunnel ( maths::Vector< std::complex< double > > Pol,
std::complex< double > na,
std::complex< double > np,
int l )

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
tubedRay S )
friend

Member Data Documentation

◆ E

maths::Vector<std::complex<double> > GOAT::raytracing::tubedRay::E[5]

Definition at line 216 of file tubedray.h.

◆ g

Gauss GOAT::raytracing::tubedRay::g

Definition at line 225 of file tubedray.h.

◆ getunnelt

bool GOAT::raytracing::tubedRay::getunnelt

Definition at line 222 of file tubedray.h.

◆ iR

int GOAT::raytracing::tubedRay::iR

Definition at line 220 of file tubedray.h.

◆ isValid

bool GOAT::raytracing::tubedRay::isValid

Definition at line 224 of file tubedray.h.

◆ k

maths::Vector<double> GOAT::raytracing::tubedRay::k[5]

Definition at line 215 of file tubedray.h.

◆ ka

maths::Vector<double> GOAT::raytracing::tubedRay::ka

Definition at line 226 of file tubedray.h.

◆ KORR

double GOAT::raytracing::tubedRay::KORR

Definition at line 227 of file tubedray.h.

◆ logRay

bool GOAT::raytracing::tubedRay::logRay

Definition at line 223 of file tubedray.h.

◆ OK

maths::Vector<double> GOAT::raytracing::tubedRay::OK

Definition at line 213 of file tubedray.h.

◆ P

maths::Vector<double> GOAT::raytracing::tubedRay::P[5]

Definition at line 214 of file tubedray.h.

◆ phi

std::complex<double> GOAT::raytracing::tubedRay::phi[5]

Definition at line 218 of file tubedray.h.

◆ pol

int GOAT::raytracing::tubedRay::pol

Definition at line 221 of file tubedray.h.


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