private void setConfigs(Matrix new_m, int[] start, int[] vector, int[] start_vector) {
        assert start.length == 2;
        assert vector.length == 2;
        assert start_vector.length == 2;
        
        m = new_m;
        
        starting_point[0] = (start[0] < 0) ? m.width-start[0] : start[0];
        starting_point[1] = (start[1] < 0) ? m.height-start[1] : start[1];
        
        point_vector = vector;
        starting_point_vector = start_vector;
        
        calculateNext();
    }