 void coneMain();
 void gemMain();
 
-
-
-
-
-
-
 const float eps_pq = 1.0*pow(10.0, -5.0); 
 
-
-//see derivations: T_i*w_i is a multiple of 2*PI
+// computes p-part of pq factor
+// see derivations: T_i*w_i is a multiple of 2*PI
+// using some trigo-complex number magic
+// @param w_i angular frequency
+// @param T_i period
+// @param N_i iteration according to period
+// @return p factor
 float get_p_factor(float w_i, float T_i, float N_i){
 	float tmp = 1.0;
 	if (abs(1.0-cos(T_i*w_i)) < eps_pq){


bool userSetPeriodFlag = (periodCount <= 0) ? true : false;




// global shader variables
float varX_InTxtUnits;
float varY_InTxtUnits;
float dH = 0.0f;
float orgU;
float orgV;

// function declarations
void mainBRDFMap();

	return output;
}

//compute fresnel coefficient according to Schlick's approximation
//quantitative description of transmissed and reflectied fraction of light
//when a beam of light hits a plane surface.
//describe what fraction of the light is reflected and what fraction is refracted
//see: http://en.wikipedia.org/wiki/Fresnel_equations
//@param K1 incident light direction
//@param K2 viewing direction
//@return reflected amount of light
float getFresnelFactor(vec3 K1, vec3 K2){
	float nSkin = 1.5;
	float nK = 0.0;
