def test_circles_2():

    # The colors package contain e few utility functions for colors:
    import cartesius.colors as colors

    coordinate_system = cartesius.CoordinateSystem()

    from_color = (255, 0, 255)
    to_color = (0, 255, 0)

    iterations = 20
    for i in range(1, iterations):
        x = i / 2.
        y = math.sin(x)
        center = (i / 1, math.sin(x))
        color = colors.get_color_between(from_color, to_color, i/float(iterations))
        coordinate_system.add(elements.Circle(center, radius=math.sqrt(x),
                transparency_mask=50, fill_color=color, color=(0, 0, 0)))

    return coordinate_system.draw(300, 200), coordinate_system.draw(300, 200, antialiasing=True)
Another example with circles
dataset/ETHPy150Open tkrajina/cartesius/create_images_and_readme.py/test_circles_2