# Path: scot/eegtopo/geo_spherical.py
# class Point(object):
# class Line(object):
# class Circle(object):
# class Construct(object):
#     def __init__(self, x=None, y=None, z=None):
#     def fromvector(cls, v):
#     def vector(self):
#     def list(self):
#     def vector(self, v):
#     def __repr__(self):
#     def distance(self, other):
#     def distances(self, points):
#     def __init__(self, a, b):
#     def get_point(self, l):
#     def distance(self, p):
#     def __init__(self, a, b, c=None):
#     def get_point(self, l):
#     def get_radius(self):
#     def angle(self, p):
#     def distance(self, p):
#     def midpoint(a, b):
#     def line_intersect_line(k, l):
#     def line_intersect_circle(line, circle):
#     def circle_intersect_circle(a, b):
# 
# Path: scot/eegtopo/tools.py
# class Struct(object):
#     def __init__(self, content=None):
#         if type(content) == dict:
#             self.__dict__ = content
# 
#     def __getitem__(self, index):
#         return self.__dict__[index]
# 
#     def __setitem__(self, index, value):
#         self.__dict__[index] = value
# 
#     def __iter__(self):
#         for i in self.__dict__:
#             yield self[i]
# 
#     def keys(self):
#         return self.__dict__.keys()
# 
#     def __len__(self):
#         return len(self.__dict__)
# 
#     def __str__(self):
#         longest = max([len(i) for i in self.__dict__])
#         return '\n'.join(['%s : ' % i.rjust(longest) + str(self[i]) for i in self.__dict__])
# 
#     def __repr__(self):
#         return 'Struct( %s )' % str(self.__dict__)


from numpy import *
from scot.eegtopo import geo_spherical as geo
from .tools import Struct
# Released under The MIT License (MIT)
# http://opensource.org/licenses/MIT
# Copyright (c) 2013 Martin Billinger

"""Module to generate 3d EEG locations"""



Point = geo.Point
Line = geo.Line
Circle = geo.Circle
construct = geo.Construct


def intersection(a, b, expr=lambda c: c.vector.z >= 0):
    pts = construct.circle_intersect_circle(a, b)
    return [c for c in pts if expr(c)]


midpoint = construct.midpoint


#noinspection PyPep8Naming
def construct_1020_easycap(variant=0):

# Path: scot/eegtopo/geo_spherical.py
# class Point(object):
# class Line(object):
# class Circle(object):
# class Construct(object):
#     def __init__(self, x=None, y=None, z=None):
#     def fromvector(cls, v):
#     def vector(self):
#     def list(self):
#     def vector(self, v):
#     def __repr__(self):
#     def distance(self, other):
#     def distances(self, points):
#     def __init__(self, a, b):
#     def get_point(self, l):
#     def distance(self, p):
#     def __init__(self, a, b, c=None):
#     def get_point(self, l):
#     def get_radius(self):
#     def angle(self, p):
#     def distance(self, p):
#     def midpoint(a, b):
#     def line_intersect_line(k, l):
#     def line_intersect_circle(line, circle):
#     def circle_intersect_circle(a, b):
# 
# Path: scot/eegtopo/tools.py
# class Struct(object):
#     def __init__(self, content=None):
#         if type(content) == dict:
#             self.__dict__ = content
# 
#     def __getitem__(self, index):
#         return self.__dict__[index]
# 
#     def __setitem__(self, index, value):
#         self.__dict__[index] = value
# 
#     def __iter__(self):
#         for i in self.__dict__:
#             yield self[i]
# 
#     def keys(self):
#         return self.__dict__.keys()
# 
#     def __len__(self):
#         return len(self.__dict__)
# 
#     def __str__(self):
#         longest = max([len(i) for i in self.__dict__])
#         return '\n'.join(['%s : ' % i.rjust(longest) + str(self[i]) for i in self.__dict__])
# 
#     def __repr__(self):
#         return 'Struct( %s )' % str(self.__dict__)


# Path: scot/eegtopo/eegpos3d.py
from numpy import *
from scot.eegtopo import geo_spherical as geo
from .tools import Struct

# Released under The MIT License (MIT)
# http://opensource.org/licenses/MIT
# Copyright (c) 2013 Martin Billinger

"""Module to generate 3d EEG locations"""



Point = geo.Point
Line = geo.Line
Circle = geo.Circle
construct = geo.Construct


def intersection(a, b, expr=lambda c: c.vector.z >= 0):
    pts = construct.circle_intersect_circle(a, b)
    return [c for c in pts if expr(c)]


midpoint = construct.midpoint


#noinspection PyPep8Naming
def construct_1020_easycap(variant=0):

    p = Struct()