float xt = x[0]; float yt = x[1]; float zt = x[2]; //GOOD COMBINATION float sphere = (225.0 - xt*xt - yt*yt - zt*zt)/30; float cube = R_int(R_int(12.0 - fabs(xt), 12.0 - fabs(yt)), 12.0 - fabs(zt)); //return cube; return R_int(cube, sphere);