|
GOAT (Geometrical optics application tool) 0.1
|
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>
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) | |
| ObjectShape * | Einschluss (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 | |
| tubedRay & | operator= (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 | |
| RayBase * | tray =0 |
| transmitted ray (used by the raytracer, for internal use only) | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, tubedRay S) |
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.
| GOAT::raytracing::tubedRay::tubedRay | ( | ) |
| GOAT::raytracing::tubedRay::tubedRay | ( | const tubedRay & | ray | ) |
| GOAT::raytracing::tubedRay::tubedRay | ( | tubedRayBuffer & | B | ) |
| 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
| g |
| 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 ) |
| GOAT::raytracing::tubedRay::~tubedRay | ( | ) |
| void GOAT::raytracing::tubedRay::checkObjectIntersection | ( | int | Index[5], |
| maths::Vector< double > * | Pmin ) |
| 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 ) |
| maths::Vector< double > GOAT::raytracing::tubedRay::crossPlane | ( | const maths::Vector< double > | Pe, |
| const maths::Vector< double > | n ) |
| double GOAT::raytracing::tubedRay::crossXAxis | ( | const maths::Vector< double > & | P1, |
| const maths::Vector< double > & | P2, | ||
| const maths::Vector< double > & | k ) |
|
inline |
returns index of the currently hitted object
Definition at line 136 of file tubedray.h.
|
inline |
like isInObject (for compatibilty reasons, will be removed in future)
Definition at line 130 of file tubedray.h.
|
inline |
Definition at line 128 of file tubedray.h.
| double GOAT::raytracing::tubedRay::flaeche | ( | ) |
| 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)
| [in] | alpha | angle of incidence (in radiants) |
| [in] | n1 | refractive index first medium |
| [in] | n2 | refractive index second medium |
| 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)
| [in] | alpha | angle of incidence (in radiants) |
| [in] | n1 | refractive index first medium |
| [in] | n2 | refractive index second medium |
|
inline |
returns the value of the electric field of the i-th sub-ray
Definition at line 126 of file tubedray.h.
|
inlinevirtual |
gives back electric field strength
Implements GOAT::raytracing::RayBase.
Definition at line 104 of file tubedray.h.
|
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.
|
inline |
returns the directional vector of the i-th sub-ray
Definition at line 120 of file tubedray.h.
|
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.
|
inline |
returns the position of the i-th sub-ray
Definition at line 122 of file tubedray.h.
|
inline |
returns an array whichs holds the current positions of the sub-rays
Definition at line 125 of file tubedray.h.
|
inline |
Definition at line 124 of file tubedray.h.
|
inline |
returns the current refractive index
Definition at line 113 of file tubedray.h.
|
inline |
Definition at line 135 of file tubedray.h.
| void GOAT::raytracing::tubedRay::initElectricField | ( | const maths::Vector< std::complex< double > > & | Pol, |
| const int | numRays, | ||
| double | dx, | ||
| Plane | Eb ) |
| void GOAT::raytracing::tubedRay::initElectricField | ( | const maths::Vector< std::complex< double > > & | Pol, |
| int | AnzRays = 1 ) |
| void GOAT::raytracing::tubedRay::initElectricFieldGauss | ( | int | i, |
| const Plane & | Eb, | ||
| const maths::Vector< std::complex< double > > & | Pol ) |
|
inline |
returns the squared magnitude of the electric field
Definition at line 137 of file tubedray.h.
|
inlinevirtual |
Is the ray currently inside an object?
Implements GOAT::raytracing::RayBase.
Definition at line 131 of file tubedray.h.
|
virtual |
do the next step
Implements GOAT::raytracing::RayBase.
| maths::Vector< double > GOAT::raytracing::tubedRay::nextCaustic | ( | double & | l | ) |
| double GOAT::raytracing::tubedRay::normVol | ( | maths::Vector< double > | P[5], |
| maths::Vector< double > | k, | ||
| maths::Vector< double > | n ) |
|
inlinevirtual |
index of the current object or -1
Implements GOAT::raytracing::RayBase.
Definition at line 105 of file tubedray.h.
| 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)
| [in] | P1 | Array which holds the start position of the edge rays |
| [in] | P2 | Array which holds the end position of the edge rays |
| 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.
| [in] | P1 | Array which holds the start position of the edge rays |
| [in] | P2 | Array which holds the end position of the edge rays |
| [out] | S | Array of two vectors which hold the position of the foci for self focusing, if it exists otherwise it is set to a zero vector |
| double GOAT::raytracing::tubedRay::pjump | ( | void | ) |
for internal use only
| tubedRay GOAT::raytracing::tubedRay::reflect | ( | maths::Vector< double > * | n, |
| std::complex< double > | n1, | ||
| std::complex< double > | n2 ) |
This method reflects the beam.
| [in] | n | surface normal (angles of incidence will be calculated with help of the directional vectors k) |
| [in] | n1 | refractive index first medium |
| [in] | n2 | refractive index second medium |
| tubedRay GOAT::raytracing::tubedRay::reflect | ( | maths::Vector< double > | n, |
| std::complex< double > | n1, | ||
| std::complex< double > | n2 ) |
|
inline |
Definition at line 139 of file tubedray.h.
|
virtual |
reflects ray
Implements GOAT::raytracing::RayBase.
| void GOAT::raytracing::tubedRay::refract | ( | maths::Vector< double > * | n, |
| std::complex< double > | n1, | ||
| std::complex< double > | n2 ) |
This method refracts the beam.
| [in] | n | array which holds surface normals of the edge rays (angles of incidence will be calculated with help of the directional vectors k) |
| [in] | n1 | refractive index first medium |
| [in] | n2 | refractive index second medium |
| void GOAT::raytracing::tubedRay::refract | ( | maths::Vector< double > | n, |
| std::complex< double > | n1, | ||
| std::complex< double > | n2 ) |
Strahl wird reflektiert.
| maths::Vector< double > GOAT::raytracing::tubedRay::schneidePlane | ( | const Plane & | E, |
| bool & | found ) |
| int GOAT::raytracing::tubedRay::schneidePlane | ( | const Plane & | E, |
| double | d, | ||
| maths::Vector< double > & | S1, | ||
| maths::Vector< double > & | S2 ) |
| bool GOAT::raytracing::tubedRay::schneidePlane | ( | maths::Vector< double > * | Erg, |
| const Plane & | E ) |
|
inline |
sets the value of the electric field of the i-th sub-ray
Definition at line 127 of file tubedray.h.
|
inline |
Definition at line 102 of file tubedray.h.
|
inline |
Definition at line 118 of file tubedray.h.
|
inline |
Definition at line 117 of file tubedray.h.
|
inline |
Definition at line 114 of file tubedray.h.
|
inline |
Definition at line 119 of file tubedray.h.
|
inline |
Definition at line 116 of file tubedray.h.
|
inline |
Definition at line 115 of file tubedray.h.
|
inline |
set current refractive index
Definition at line 112 of file tubedray.h.
| void GOAT::raytracing::tubedRay::tunnel | ( | maths::Vector< std::complex< double > > | Pol, |
| std::complex< double > | n1, | ||
| std::complex< double > | n2 ) |
Strahl wird gebrochen.
| void GOAT::raytracing::tubedRay::tunnel | ( | maths::Vector< std::complex< double > > | Pol, |
| std::complex< double > | na, | ||
| std::complex< double > | np, | ||
| int | l ) |
|
friend |
| maths::Vector<std::complex<double> > GOAT::raytracing::tubedRay::E[5] |
Definition at line 216 of file tubedray.h.
| Gauss GOAT::raytracing::tubedRay::g |
Definition at line 225 of file tubedray.h.
| bool GOAT::raytracing::tubedRay::getunnelt |
Definition at line 222 of file tubedray.h.
| int GOAT::raytracing::tubedRay::iR |
Definition at line 220 of file tubedray.h.
| bool GOAT::raytracing::tubedRay::isValid |
Definition at line 224 of file tubedray.h.
| maths::Vector<double> GOAT::raytracing::tubedRay::k[5] |
Definition at line 215 of file tubedray.h.
| maths::Vector<double> GOAT::raytracing::tubedRay::ka |
Definition at line 226 of file tubedray.h.
| double GOAT::raytracing::tubedRay::KORR |
Definition at line 227 of file tubedray.h.
| bool GOAT::raytracing::tubedRay::logRay |
Definition at line 223 of file tubedray.h.
| maths::Vector<double> GOAT::raytracing::tubedRay::OK |
Definition at line 213 of file tubedray.h.
| maths::Vector<double> GOAT::raytracing::tubedRay::P[5] |
Definition at line 214 of file tubedray.h.
| std::complex<double> GOAT::raytracing::tubedRay::phi[5] |
Definition at line 218 of file tubedray.h.
| int GOAT::raytracing::tubedRay::pol |
Definition at line 221 of file tubedray.h.