ITF_GFX_UV_ATLAS = {} x=2 y=2 stepX=1/x stepY=1/y i=1 for v=0,y-1 do for u=0,x-1 do ITF_GFX_UV_ATLAS[i] = {index=i-1,uv0=vector2dNew(stepX*u,stepY*v),uv1=vector2dNew(stepX*u+stepX,stepY*v+stepY)} i = i+1 end end