Commit 7826dab2 authored by Florian Goth's avatar Florian Goth
Browse files

Merge branch 'master' into 23-flo-wants-to-play-with-poincare-arithmetic

parents 252dfe78 f833620c
Pipeline #14951 passed with stage
in 3 minutes and 51 seconds
......@@ -18,11 +18,12 @@ class HyperPolygon:
self.verticesW = np.zeros((3, self.p)) # vertices
self.idx = 1 # auxiliary scalar index; can be used, e.g, for easy identifaction inside a tessellation
self.layer = 1 # encodes in which layer of a tessellation this polygons is located
self.sector = 0 # index of the sector this polygons is located; can be used for finding neighbours more efficiently
self.angle = 0 # angle between self.centerP and the positive x-axis
self.val = 0 # assign a value (useful in any application)
self.idx = 1 # auxiliary scalar index; can be used, e.g, for easy identifaction inside a tessellation
self.layer = 1 # encodes in which layer of a tessellation this polygons is located
self.sector = 0 # index of the sector this polygons is located; can be used for finding neighbours more efficiently
self.angle = 0 # angle between self.centerP and the positive x-axis
self.val = 0 # assign a value (useful in any application)
self.orientation = 0 # the angle between the line defined by the center and vertices 0, and the abscissa
self.edges = [] # compare self.populate_edge_list
......@@ -136,4 +137,7 @@ class HyperPolygon:
self.verticesP[i] = complex(self.verticesP[i].real, (-1)*self.verticesP[i].imag)
self.verticesW = p2w(self.verticesP)
# returns value between -pi and pi
def find_orientation(self):
self.orientation = np.angle(self.verticesP[0]-self.centerP)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment