
displacement MHbump 
    (	
	    float Km = 0.1; 		
	    float truedisp = 1;
		string texturename = "";
		float furfreq = 10;
		float furval = 10
	)
{
    normal NN = normalize(N); 
	float mag = 0;
	float texVal,cx;
	color texCol;
	vector disp = (0,0,0);
	if (texturename != "")
		{
		texCol = color texture (texturename);
		texVal = float texture (texturename);
		if (comp(texCol, 0) > 0.0001){
			mag =  furval*comp(texCol, 0)*noise(furfreq*P);
			disp = mag*Km*NN;
			//cx = random()*xcomp(disp);
			//setxcomp(disp,cx);			
			}
		else{
			disp = mag*Km*NN;
		    }
		
		}
    
	//printf(" HUMP =  %f\n", ampl1);
	if (truedisp == 1)
	{
	    P = P-disp;
        N=calculatenormal(P);
	}
	else
	{
        N = calculatenormal(P - disp);
    } 	
	
}

