Generic
This module implements a N-D tessellation and trimming algorithm in the TessellationGeneric class.
This module is part of the tessellation package and can be used for general orbit tessellation tasks.
It inherits from TessellationBase and includes methods for calculating simplex side lengths
and simplex volumes. The Normalization nested class includes normalization methods.
TessellationGeneric
¶
Bases: TessellationBase
A class for the tessellation and trimming algorithm applied in N dimensions.
Source code in commensurability/tessellation/generic.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | |
Normalization
¶
Bases: TessellationBase
A class providing various methods for normalization in N dimensions.
Methods:
| Name | Description |
|---|---|
nsphere_approx |
Compute the approximate volume of an n-sphere containing the points. |
convexhull |
Compute the volume of the convex hull of the points. |
convexhull_rot4 |
Compute the volume of the convex hull of the points including copied rotations by 90 degrees four times. |
default |
Default normalization method (convexhull_rot4). |
Source code in commensurability/tessellation/generic.py
convexhull()
¶
Compute the volume of the convex hull of the points.
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
Volume of the convex hull. |
Note
This method may not work correctly for co-rotation cases.
Source code in commensurability/tessellation/generic.py
convexhull_rot4()
¶
Compute the volume of the convex hull of the points including copied rotations by 90 degrees four times.
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
Volume of the convex hull. |
Note
This method involves rotations of the points using the first two axes.
Source code in commensurability/tessellation/generic.py
nsphere_approx()
¶
Compute an approximate volume of an n-sphere containing the points.
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
Approximate volume of the n-sphere. |
Note
This method uses Stirling's approximation, which may not be suitable for all cases.
Source code in commensurability/tessellation/generic.py
simplex_measure(*vertices)
staticmethod
¶
Compute the measure (volume) of a N-D simplex defined by its vertices.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
*vertices
|
ndarray
|
The vertices of the simplex. |
()
|
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The volume of the simplex. |
Note
This method calculates the general simplex volume, which may not be practical in most cases.
Source code in commensurability/tessellation/generic.py
simplex_sides(*vertices)
staticmethod
¶
Compute the side lengths of a N-D simplex defined by its vertices.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
*vertices
|
ndarray
|
The vertices of the simplex. |
()
|
Returns:
| Name | Type | Description |
|---|---|---|
list |
list
|
List of side lengths. |
Note
This method uses a combinatoric approach, which may not be practical in most cases.