def case(casenum):
    """
    Creates a test case consisting of two polylines

    Parameters
    ----------
    casenum : int
        Number between 0 and count -1.

    Returns
    -------
    Two polylines, or the count if casenum == -1

    """
    cases = []
    
    # input lines from Hangouet 1995, fig. 13
    # slightly modified so that solution is as indicated by Hangouet
    A = [(5,0.95),(0.44,-1.99),(0,0)]
    B = [(3.5,-1.2),(3.19,-0.68),(5,0.3),(5.61,1.77),(3.19,0.59),(0.18,0.59),(0.77,-1.6)]
    cases.append((A,B))
    
    # parallel lines
    A = [(0,0),(3,3),(12,2),(14,5)]
    B = [(0,12),(4,6),(13,5),(9,6)]
    cases.append((A,B))
    
    # coincident lines
    A = [(0,0),(4,6),(12,2),(14,5),(17,7)]
    B = [(0,10),(4,6),(12,2),(9,7)]
    cases.append((A,B))
    
    # overlapping lines
    A = [(0,0),(4,6),(12,2),(14,5),(17,7)]
    B = [(0,10),(6,5),(10,3),(9,7)]        
    cases.append((A,B))

    # two parallel segments in a row
    A = [(0,0),(4,6),(14,1),(16,3),(19,5)]
    B = [(0,10),(6,6),(8,5),(10,4),(9,7)]        
    cases.append((A,B))
    
    # two overlapping segments in a row
    A = [(0,0),(4,6),(14,1),(16,3),(19,5)]
    B = [(0,10),(6,5),(8,4),(10,3),(9,7)]        
    cases.append((A,B))
    
    # * cleanup *
    if casenum == -1:
        return len(cases)
    else:
        return cases[casenum]