v@P.x = rint((@P.x/2))*2;
v@P.y = rint((@P.y/3))*3;
v@P.z = rint((@P.z/2))*2;
vector min,max;
int it = 0;
getbbox(0,min,max);
int maxIt = chi("maxIt");
while (it<=maxIt){
it++;
float randx = rand(it+987)*max.x;
float randy=rand(it+876)*max.y;
float randz=rand(it)*max.z;
vector rand = set(randx,randy,randz);
addpoint(0,rand);
}
// garde les points interieurs
int proche [] = nearpoints(0,@P,2,5);
int len = len(proche);
if (len!=5)removepoint(0,@ptnum);
VEX