def get_loop_segments(loop):
    """returns a list of segments in a loop"""
    segments = []
    last_point = None
    for this_point in loop:
        if last_point is not None:
            new_segment = [last_point, this_point]
            segments.append(new_segment)
        last_point = this_point
    return segments