IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.MPetekLib.Algorithms.Models.RoughBilliard Class Reference

Public Member Functions

 RoughBilliard ()
 
void PropagateRay ()
 Propagate the ray from the current to the next point. The current r0 and A0 should already be known. Overwrites the r0 and A0 with the new values. More...
 
void FollowATrajectory ()
 Follows a trajectory of a billiard ball and writes the results to the list r. More...
 
void WriteATrajectoryToFile (int fileNumber)
 
void WriteStateSpaceTrajectoryToFile (int fileNumber)
 
void ExploreStateSpace (double initCosGamma, double finalCosGamma, int stepsCosGamma, double initPhi, double finalPhi, int stepsPhi)
 Constructs a grid of initial conditions and runs a simulation for each of them. More...
 

Properties

double a [get, set]
 The amplitude of the boundary's roughness (waviness). More...
 
int n [get, set]
 The roughness of the boundary. More...
 
double[] InitialPointPolar [get, set]
 The initial point of the current ray in polar coordinates. More...
 
double InitialDirectionAngle [set]
 The direction vector of the current ray. More...
 
double InitialPhi [get, set]
 
double InitialCosGamma [get, set]
 
int FirstScanIntervals [get, set]
 The number of intervals on which the presence of a solution is tested. More...
 
double AccuracyGoal [get, set]
 The accuracy of the bisection. More...
 
int NPropagations [get, set]
 The number of propagations that the FollowATrajectory() method will execute. More...
 

Private Member Functions

double IntersectionFunction (double phi)
 Used to calculate the intersections of rays, which don't go through the origin, with the billiard boundary. If this method returns 0, then there is an intersection located at the input polar angle phi. More...
 
double RadiusFunction (double phi)
 Returns the radius at which the boundary exists at a certain phi. More...
 
double K (double phi)
 The normalization factor of the tangent and the normal to the boundary. More...
 
double Comp1 (double phi)
 The x component of the tangent to the boundary. More...
 
double Comp2 (double phi)
 The y component of the tangent to the boundary. More...
 

Private Attributes

double _a = 0.1
 The amplitude of the boundary's roughness (waviness). More...
 
int _n = 5
 The roughness of the boundary. More...
 
double[] _r0Cart = new double[2]
 The initial point of the current ray. More...
 
double[] _r0Polar = new double[2]
 The initial point of the current ray in polar coordinates. More...
 
double[] _A0Cart = new double[2]
 The direction vector of the current ray. More...
 
double _initialPhi
 
double _initialCosGamma
 
double[] _A1Cart = new double[2]
 A temporaray variable. More...
 
double[] _r1Cart = new double[2]
 The initial point of the next ray. A temporary variable. More...
 
double _alpha0
 The angle between the ray and the x-axis in case the ray goes through the origin. More...
 
List< double[]> _vPolar = new List<double[]>(10)
 A list of all the polar coordinates of the intersections between the ray and the boundary. More...
 
List< double[]> _vCart = new List<double[]>(10)
 A list of all the cartesian coordinates of the intersections between the ray and the boundary. More...
 
double _d0
 The angular momentum. Also the distance between the current ray and the origin. More...
 
double _beta0
 The angle between the distance vector and the x-axis. More...
 
double[] _n0Cart = new double[2]
 The normal vector to the boundary. Points outwards. More...
 
int _firstScanIntervals = 10000
 The number of intervals on which the presence of a solution is tested. More...
 
double intervalWidth
 The interval width of the "search for rough positions of the intersections" method. More...
 
List< double[]> solutionIntervals = new List<double[]>(10)
 The found intervals on which the solution exists. More...
 
double firstValue
 The values at the start and at the end of the interval. More...
 
double secondValue
 
double leftPoint
 The variables used for bisection - searching for precise positions of the solutions. More...
 
double midPoint
 
double rightPoint
 
double leftValue
 
double midValue
 
double rightValue
 
double _accuracyGoal = 0.000000001
 The accuracy of the bisection. More...
 
double t
 A multiplier used at searching for the closest point in the direction of A. More...
 
double chosenT
 
double _comp1
 The x component of the tangent to the boundary. More...
 
double _comp2
 The y component of the tangent to the boundary. More...
 
double _K
 The normalization factor of the tangent to the boundary. More...
 
double _cosGamma = Double.NaN
 The projection of the direction vector on the tangent to the boundary. More...
 
int _nPropagations = 500
 
List< double[]> _r = new List<double[]>(100)
 A list of points marking the ray's path. More...
 
List< double[]> _stateCoordinates = new List<double[]>(100)
 A list of projections of the direction vector on the tangent to the boundary. More...
 

Constructor & Destructor Documentation

IG.MPetekLib.Algorithms.Models.RoughBilliard.RoughBilliard ( )
inline

Member Function Documentation

double IG.MPetekLib.Algorithms.Models.RoughBilliard.IntersectionFunction ( double  phi)
inlineprivate

Used to calculate the intersections of rays, which don't go through the origin, with the billiard boundary. If this method returns 0, then there is an intersection located at the input polar angle phi.

Parameters
phiThe input polar angle.
Returns
Zero if an intersection is found.
double IG.MPetekLib.Algorithms.Models.RoughBilliard.RadiusFunction ( double  phi)
inlineprivate

Returns the radius at which the boundary exists at a certain phi.

Parameters
phiThe phi at which the boundary radius is being calculated.
Returns
The boundary radius.
double IG.MPetekLib.Algorithms.Models.RoughBilliard.K ( double  phi)
inlineprivate

The normalization factor of the tangent and the normal to the boundary.

Parameters
phiThe angle coordinate.
double IG.MPetekLib.Algorithms.Models.RoughBilliard.Comp1 ( double  phi)
inlineprivate

The x component of the tangent to the boundary.

Parameters
phiThe angle coordinate.
double IG.MPetekLib.Algorithms.Models.RoughBilliard.Comp2 ( double  phi)
inlineprivate

The y component of the tangent to the boundary.

Parameters
phiThe angle coordinate.
void IG.MPetekLib.Algorithms.Models.RoughBilliard.PropagateRay ( )
inline

Propagate the ray from the current to the next point. The current r0 and A0 should already be known. Overwrites the r0 and A0 with the new values.

void IG.MPetekLib.Algorithms.Models.RoughBilliard.FollowATrajectory ( )
inline

Follows a trajectory of a billiard ball and writes the results to the list r.

void IG.MPetekLib.Algorithms.Models.RoughBilliard.WriteATrajectoryToFile ( int  fileNumber)
inline
void IG.MPetekLib.Algorithms.Models.RoughBilliard.WriteStateSpaceTrajectoryToFile ( int  fileNumber)
inline
void IG.MPetekLib.Algorithms.Models.RoughBilliard.ExploreStateSpace ( double  initCosGamma,
double  finalCosGamma,
int  stepsCosGamma,
double  initPhi,
double  finalPhi,
int  stepsPhi 
)
inline

Constructs a grid of initial conditions and runs a simulation for each of them.

///

Parameters
initCosGammaInitial projection of the momentum to the boundary.
finalCosGammaFinal projection of the momentum to the boundary.
stepsCosGamma
initPhi
finalPhi
stepsPhi

Referenced by IG.MPetekLib.Application.Scripts._27Billiard.Run().

Member Data Documentation

double IG.MPetekLib.Algorithms.Models.RoughBilliard._a = 0.1
private

The amplitude of the boundary's roughness (waviness).

int IG.MPetekLib.Algorithms.Models.RoughBilliard._n = 5
private

The roughness of the boundary.

double [] IG.MPetekLib.Algorithms.Models.RoughBilliard._r0Cart = new double[2]
private

The initial point of the current ray.

double [] IG.MPetekLib.Algorithms.Models.RoughBilliard._r0Polar = new double[2]
private

The initial point of the current ray in polar coordinates.

double [] IG.MPetekLib.Algorithms.Models.RoughBilliard._A0Cart = new double[2]
private

The direction vector of the current ray.

double IG.MPetekLib.Algorithms.Models.RoughBilliard._initialPhi
private
double IG.MPetekLib.Algorithms.Models.RoughBilliard._initialCosGamma
private
double [] IG.MPetekLib.Algorithms.Models.RoughBilliard._A1Cart = new double[2]
private

A temporaray variable.

double [] IG.MPetekLib.Algorithms.Models.RoughBilliard._r1Cart = new double[2]
private

The initial point of the next ray. A temporary variable.

double IG.MPetekLib.Algorithms.Models.RoughBilliard._alpha0
private

The angle between the ray and the x-axis in case the ray goes through the origin.

List<double[]> IG.MPetekLib.Algorithms.Models.RoughBilliard._vPolar = new List<double[]>(10)
private

A list of all the polar coordinates of the intersections between the ray and the boundary.

List<double[]> IG.MPetekLib.Algorithms.Models.RoughBilliard._vCart = new List<double[]>(10)
private

A list of all the cartesian coordinates of the intersections between the ray and the boundary.

double IG.MPetekLib.Algorithms.Models.RoughBilliard._d0
private

The angular momentum. Also the distance between the current ray and the origin.

double IG.MPetekLib.Algorithms.Models.RoughBilliard._beta0
private

The angle between the distance vector and the x-axis.

double [] IG.MPetekLib.Algorithms.Models.RoughBilliard._n0Cart = new double[2]
private

The normal vector to the boundary. Points outwards.

int IG.MPetekLib.Algorithms.Models.RoughBilliard._firstScanIntervals = 10000
private

The number of intervals on which the presence of a solution is tested.

double IG.MPetekLib.Algorithms.Models.RoughBilliard.intervalWidth
private

The interval width of the "search for rough positions of the intersections" method.

List<double[]> IG.MPetekLib.Algorithms.Models.RoughBilliard.solutionIntervals = new List<double[]>(10)
private

The found intervals on which the solution exists.

double IG.MPetekLib.Algorithms.Models.RoughBilliard.firstValue
private

The values at the start and at the end of the interval.

double IG.MPetekLib.Algorithms.Models.RoughBilliard.secondValue
private
double IG.MPetekLib.Algorithms.Models.RoughBilliard.leftPoint
private

The variables used for bisection - searching for precise positions of the solutions.

double IG.MPetekLib.Algorithms.Models.RoughBilliard.midPoint
private
double IG.MPetekLib.Algorithms.Models.RoughBilliard.rightPoint
private
double IG.MPetekLib.Algorithms.Models.RoughBilliard.leftValue
private
double IG.MPetekLib.Algorithms.Models.RoughBilliard.midValue
private
double IG.MPetekLib.Algorithms.Models.RoughBilliard.rightValue
private
double IG.MPetekLib.Algorithms.Models.RoughBilliard._accuracyGoal = 0.000000001
private

The accuracy of the bisection.

double IG.MPetekLib.Algorithms.Models.RoughBilliard.t
private

A multiplier used at searching for the closest point in the direction of A.

double IG.MPetekLib.Algorithms.Models.RoughBilliard.chosenT
private
double IG.MPetekLib.Algorithms.Models.RoughBilliard._comp1
private

The x component of the tangent to the boundary.

double IG.MPetekLib.Algorithms.Models.RoughBilliard._comp2
private

The y component of the tangent to the boundary.

double IG.MPetekLib.Algorithms.Models.RoughBilliard._K
private

The normalization factor of the tangent to the boundary.

double IG.MPetekLib.Algorithms.Models.RoughBilliard._cosGamma = Double.NaN
private

The projection of the direction vector on the tangent to the boundary.

int IG.MPetekLib.Algorithms.Models.RoughBilliard._nPropagations = 500
private
List<double[]> IG.MPetekLib.Algorithms.Models.RoughBilliard._r = new List<double[]>(100)
private

A list of points marking the ray's path.

List<double[]> IG.MPetekLib.Algorithms.Models.RoughBilliard._stateCoordinates = new List<double[]>(100)
private

A list of projections of the direction vector on the tangent to the boundary.

Property Documentation

double IG.MPetekLib.Algorithms.Models.RoughBilliard.a
getset

The amplitude of the boundary's roughness (waviness).

Referenced by IG.MPetekLib.Application.Scripts._27Billiard.Run().

int IG.MPetekLib.Algorithms.Models.RoughBilliard.n
getset

The roughness of the boundary.

Referenced by IG.MPetekLib.Application.Scripts._27Billiard.Run().

double [] IG.MPetekLib.Algorithms.Models.RoughBilliard.InitialPointPolar
getset

The initial point of the current ray in polar coordinates.

double IG.MPetekLib.Algorithms.Models.RoughBilliard.InitialDirectionAngle
set

The direction vector of the current ray.

double IG.MPetekLib.Algorithms.Models.RoughBilliard.InitialPhi
getset
double IG.MPetekLib.Algorithms.Models.RoughBilliard.InitialCosGamma
getset
int IG.MPetekLib.Algorithms.Models.RoughBilliard.FirstScanIntervals
getset

The number of intervals on which the presence of a solution is tested.

double IG.MPetekLib.Algorithms.Models.RoughBilliard.AccuracyGoal
getset

The accuracy of the bisection.

int IG.MPetekLib.Algorithms.Models.RoughBilliard.NPropagations
getset

The number of propagations that the FollowATrajectory() method will execute.

Referenced by IG.MPetekLib.Application.Scripts._27Billiard.Run().


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