Example #1
0
def patchwork(dimensions, connections):
    """
    `dimensions` should be a list of (width, height) pairs representing
    different charts.  
    `connections` are connections between those charts.  These are tuples
    of the form (2, 3, 'x', fun, invfun), where the third item is either 'x' or
    'y', describing if this connection is side-to-side or top-to-bottom.  
    The first two are the charts to connect. `fun` is the map, if any,
    to transform the margin when taking the first to the second.  `invfun`
    should be the reverse of this.  By default no transformation is applied.
    If `fun` is only a number, this is added for the transformation.  If
    `fun` is a pair, the first number is added and the second is taken modulo.
    In these cases `invfun` is not necessary.  If direction begins with '-'
    then the margin is reversed when being pasted.
    """
    return topology('patchwork',
                    dimensions=dimensions,
                    connections=connections,
                    )
Example #2
0
def projective_plane(width, height):
    return topology('projective plane',
                    width=width,
                    height=height)
Example #3
0
def rectangle(width, height):
    return topology("rectangle", width=width, height=height)
Example #4
0
File: torus.py Project: kcsaff/CA
def fall(width, height, fall):
    return topology('torusfall',
                    width=width,
                    height=height,
                    fall=fall)
Example #5
0
File: torus.py Project: kcsaff/CA
def torus(width, height):
    return topology('torus',
                    width=width,
                    height=height)