
#declare SphereRadius = 1;
#declare SphereY_Top = 2;
#declare SphereModValue = SphereRadius * SphereRadius / ( SphereY_Top * SphereY_Top );

#declare SphereFunc = function{ x * x + SphereModValue * y * y + z * z - SphereRadius * SphereRadius }
#declare WrinklesFunc = function{ pattern{ wrinkles scale 1 } }

#declare Rock2 = 
isosurface{
	function{ SphereFunc(x,y,z) 
		- WrinklesFunc(x,y,z) * 1
	}
	threshold 0
	contained_by{ box{ < -2, 0, - 2 >, < 2, 4, 2 > } }
	accuracy 0.001
	max_gradient 10
}

#macro PlaceRock2(Transform, Pigment, MaxGradientValue)
	isosurface{
		function{ SphereFunc(x,y,z) 
			- WrinklesFunc(x,y,z) * 1
		}
		threshold 0
		contained_by{ box{ < -2, 0, - 2 >, < 2, 4, 2 > } }
		accuracy 0.001
		max_gradient MaxGradientValue
		texture{ pigment{ Pigment } }
		transform{ Transform }
	}	
#end