# Path: antitile/xmath.py
# def reflect_through_origin(normal):
# def complex_to_float2d(arr):
# def float2d_to_complex(arr):
# def line_intersection(a1, a2, b1, b2):
# def record_initialize(shape, dtype, default_bool=False,
#                       default_int=-1,
#                       default_float=np.nan):
# def transpose(long_array, filler=-1):
# def recordify(names, arrays):
# def renumber(in_array, fill=-1):
# def triple_product(a, b, c):
# def normalize(vectors, axis=-1):
# def slerp(pt1, pt2, intervals):
# def lerp(pt1, pt2, intervals):
# def nlerp(*args):
# def distance(x, y, p=2, axis=-1, scale=1):
# def triangle_area(a, b, c):
# def bearing(origin, destination, pole=np.array([0, 0, 1])):
# def central_angle(x, y, signed=False):
# def central_angle_equilateral(pts):
# def triangle_solid_angle(a, b, c):
# def spherical_bearing(origin, destination, pole=np.array([0, 0, 1])):
# def sqrt(x):


import csv
import numpy as np
import antitile
from math import gcd
from antitile import xmath
               '" fill="none" stroke=')
    if m > 0:
        footer1 += '"blue"/>'
    else:
        footer1 += '"black"/>'
    footer2 = '</svg>'
    statements = [header1, header2]
    if g > 1 and m > 0:
        style = 'stroke="red" stroke-dasharray="3"'
        statements += lines(g, 0, digits, shapeinfo, style)
    statements += lines(n, m, digits, shapeinfo)
    statements += [footer1, footer2]
    return '\n'.join(statements)

square = {'name': 'square',
          'shape': np.array([[1, 1],
                             [1, 181],
                             [181, 181],
                             [181, 1]]),
          'size': [182,]*2,
          'frame': lambda n, m: antitile.breakdown.frame_square(n, m)*180 + 1,
          'diagonal': 'Diagonal subdivision'}

tri_shape = np.array([[1, 157],
                      [181, 157],
                      [91, 1.1154273188010393]])
triangle = {'name': 'triangle',
            'shape': tri_shape,
            'size': [182, 158],
            'frame': lambda n, m: antitile.breakdown.frame_triangle(

# Path: antitile/xmath.py
# def reflect_through_origin(normal):
# def complex_to_float2d(arr):
# def float2d_to_complex(arr):
# def line_intersection(a1, a2, b1, b2):
# def record_initialize(shape, dtype, default_bool=False,
#                       default_int=-1,
#                       default_float=np.nan):
# def transpose(long_array, filler=-1):
# def recordify(names, arrays):
# def renumber(in_array, fill=-1):
# def triple_product(a, b, c):
# def normalize(vectors, axis=-1):
# def slerp(pt1, pt2, intervals):
# def lerp(pt1, pt2, intervals):
# def nlerp(*args):
# def distance(x, y, p=2, axis=-1, scale=1):
# def triangle_area(a, b, c):
# def bearing(origin, destination, pole=np.array([0, 0, 1])):
# def central_angle(x, y, signed=False):
# def central_angle_equilateral(pts):
# def triangle_solid_angle(a, b, c):
# def spherical_bearing(origin, destination, pole=np.array([0, 0, 1])):
# def sqrt(x):


# Path: bin/svg_subdiv.py
import csv
import numpy as np
import antitile
from math import gcd
from antitile import xmath

               '" fill="none" stroke=')
    if m > 0:
        footer1 += '"blue"/>'
    else:
        footer1 += '"black"/>'
    footer2 = '</svg>'
    statements = [header1, header2]
    if g > 1 and m > 0:
        style = 'stroke="red" stroke-dasharray="3"'
        statements += lines(g, 0, digits, shapeinfo, style)
    statements += lines(n, m, digits, shapeinfo)
    statements += [footer1, footer2]
    return '\n'.join(statements)

square = {'name': 'square',
          'shape': np.array([[1, 1],
                             [1, 181],
                             [181, 181],
                             [181, 1]]),
          'size': [182,]*2,
          'frame': lambda n, m: antitile.breakdown.frame_square(n, m)*180 + 1,
          'diagonal': 'Diagonal subdivision'}

tri_shape = np.array([[1, 157],
                      [181, 157],
                      [91, 1.1154273188010393]])
triangle = {'name': 'triangle',
            'shape': tri_shape,
            'size': [182, 158],
            'frame': lambda n, m: antitile.breakdown.frame_triangle(

                tri_shape, n, m, interp=xmath.lerp),