TheBird

svg.py

400 B · python · 20 lines

1import mrlypy.two as m22from mrlypy.core.colors import red3from config import DATA_DIR45SCALE = 1067def cell_2d():8    fp = f"{DATA_DIR}/cell.svg"9    cell = m2.carpet_2d(3, 2).paint()10    data = cell.svg_square(SCALE, outline=red, width=3)11    print(data)12    with open(fp, "w") as f:13        f.write(data)14    print(f"Saved: {fp}")1516def main():17    cell_2d()1819if __name__ == "__main__":20    main()