public void GetNormalAt( float x, float z, out Vector3 result )
{
Vector3 here, left, down;
here.x = x;
here.y = GetHeightAt( x, z );
here.z = z;
left.x = x - 1;
left.y = GetHeightAt( x - 1, z );
left.z = z;
down.x = x;
down.y = GetHeightAt( x, z + 1 );
down.z = z + 1;
left = left - here;
down = down - here;
left.Normalize();
down.Normalize();
result = left.Cross( down );
result.Normalize();
}