Hi Roland,
You'll only double the check. I'd be very surprised if it was a limiting factor. Although I admit that my gut instinct could be wrong.
For more acceleration, I suggest the following:
For each point determine and store (here floora and rounda act as floora(x)=floor(x/tol)*tol and rounda(x)=floor(x/tol+0.5)*tol)
for a comparison you can now do:
Tim
You'll only double the check. I'd be very surprised if it was a limiting factor. Although I admit that my gut instinct could be wrong.
For more acceleration, I suggest the following:
For each point determine and store (here floora and rounda act as floora(x)=floor(x/tol)*tol and rounda(x)=floor(x/tol+0.5)*tol)
Code:
xyzF=floora(xyz) # triplet
xyzR=rounda(xyz) # triplet
r2F=floor(x*x+y*y+z*z)
r2R=floor(x*x+y*y+z*z)
Code:
if ((r2R[1]==r2R[2]) || (r2F[1]==r2F[2])) is false, return false
else return ((xyzF[1]==xyzF[2]) || (xyzR[1]==xyzR[2]))
Tim