optics
Class Optics

java.lang.Object
  extended by optics.Optics

public class Optics
extends java.lang.Object

a class for optical functions


Constructor Summary
Optics()
           
 
Method Summary
static double calculateDielectricReflectance(Vector3D v, Vector3D tv, Vector3D n, double Ni, double Nt)
          calculates the fresnel reflection
static Vector3D calculateReflectedRay(Vector3D In, Vector3D Normal)
          calculates the reflected ray from an incoming ray at a normal
static boolean calculateRefractedRay(Vector3D Normal, double Ni, double Nt, Vector3D In)
          calculates the refracted ray from an incoming ray at a normal
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Optics

public Optics()
Method Detail

calculateReflectedRay

public static Vector3D calculateReflectedRay(Vector3D In,
                                             Vector3D Normal)
calculates the reflected ray from an incoming ray at a normal

Parameters:
In - incoming vector
Normal -
Returns:
reflected ray

calculateRefractedRay

public static boolean calculateRefractedRay(Vector3D Normal,
                                            double Ni,
                                            double Nt,
                                            Vector3D In)
calculates the refracted ray from an incoming ray at a normal

Parameters:
Normal -
Ni - IOR of incoming ray
Nt - IOR of refracted ray
In - [in/out] incoming vector / refracted ray
Returns:
do we have a refracted ray?

calculateDielectricReflectance

public static double calculateDielectricReflectance(Vector3D v,
                                                    Vector3D tv,
                                                    Vector3D n,
                                                    double Ni,
                                                    double Nt)
calculates the fresnel reflection

Parameters:
v - incoming ray (pointing away from surface)
tv - refracted ray
n - normal
Ni - IOR of incoming ray
Nt - IOR of the material
Returns:
dielectric reflectance