Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
hypertiling
hypertiling
Commits
7826dab2
Commit
7826dab2
authored
Apr 22, 2022
by
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
hypertiling/hyperpolygon.py
View file @
7826dab2
...
...
@@ -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
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment