using LensSimulatorCore.Shapes;
namespace LensSimulatorCore.Optical;
///
/// A Ray contains a Wavelength, a list of hit points and a list of lines.
///
public struct Ray
{
///
///
///
/// Wavelength in µm
/// Angle in Radians
///
public Ray(double wavelength, double angle, Point startPosition)
{
Wavelength = wavelength;
Lines = new List();
PointVectors = new List();
Lines.Add(new Line(Math.Tan(-angle), startPosition.Y - (startPosition.X * Math.Tan(-angle))));
PointVectors.Add(new PointVector(startPosition, new Point(Math.Cos(-angle),Math.Sin(-angle))));
}
public double Wavelength { get; }
public List Lines { get; }
public List PointVectors { get; set; }
public ElementHit Cast(List elements)
{
List allSurfaces = elements[0].Surfaces.ToList();
Point hitPosition;
ElementHit hit = new ElementHit();
foreach (Element element in elements)
{
}
return hit;
}
}