Code throws exception

matt - wrote what i think is a quick for loop to iterate some points,
but it throws an exception. Can't figure out the issue, since it could
be with any of the methods (each implements each other). If you see any
glaring mistakes, change them. if not, time for debugging?