Esempio n. 1
0
        //constructor
        public AngleDerivation(double par_mirr_angle_with_z_degrees, double fresnel_normal_with_z_degrees, double refractive_index)
        {
            //debug storage:
            this.debug_mirr_angle_deg = par_mirr_angle_with_z_degrees; this.debug_fresnel_angle_deg = fresnel_normal_with_z_degrees;

            //storing relevant variables
            this.refractive_index = refractive_index;
            this.fresnel_norm_z   = Math.Cos(AngleDerivation.getRadians(fresnel_normal_with_z_degrees));
            this.par_mirr_z       = Math.Cos(AngleDerivation.getRadians(par_mirr_angle_with_z_degrees));
        }
Esempio n. 2
0
        public void setIncomingLightAngle(double angle_with_z_axis, double angle_with_x_axis)
        {
            double opx, opy, opz, xangle, zangle;

            Scientrace.Vector op;
            zangle = AngleDerivation.getRadians(angle_with_z_axis);
            xangle = AngleDerivation.getRadians(angle_with_x_axis);
            opx    = Math.Sin(zangle) * Math.Cos(xangle);
            opy    = Math.Sin(zangle) * Math.Sin(xangle);
            opz    = Math.Sqrt(1 - (opy * opy) - (opx * opx));
            op     = new Scientrace.Vector(opx, opy, opz);
            this.setIncomingLightVector(op);
        }
Esempio n. 3
0
        public void setOutputAngles(double nxo, double nyo, double uxo, double uyo)
        {
            double nx, ny, ux, uy;
            double rn = Math.Sqrt((nxo * nxo) + (nyo * nyo));
            double ru = Math.Sqrt((uxo * uxo) + (uyo * uyo));

            nx        = nxo / rn;
            ny        = nyo / rn;
            ux        = uxo / ru;
            uy        = uyo / ru;
            this.nrad = AngleDerivation.getRadians(nx, ny);
            this.urad = AngleDerivation.getRadians(ux, uy);
            this.removeNans();
            //Console.WriteLine(this.nrad+"AFTER");
        }