https://github.com/stla/pyhyperbolic3d
Python stuff for drawing 3D hyperbolic polyhedra.
https://github.com/stla/pyhyperbolic3d
hyperbolic-geometry mesh pyvista
Last synced: 11 months ago
JSON representation
Python stuff for drawing 3D hyperbolic polyhedra.
- Host: GitHub
- URL: https://github.com/stla/pyhyperbolic3d
- Owner: stla
- License: gpl-3.0
- Created: 2021-10-11T09:12:15.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-12T16:41:55.000Z (about 3 years ago)
- Last Synced: 2025-04-08T23:29:18.225Z (about 1 year ago)
- Topics: hyperbolic-geometry, mesh, pyvista
- Language: Python
- Homepage: https://pyhyperbolic3d.readthedocs.io/en/latest/index.html
- Size: 39.2 MB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PyHyperbolic3D
[](http://pyhyperbolic3d.readthedocs.io)
Python stuff for drawing 3D hyperbolic polyhedra with 'PyVista'.
```
pip install pyhyperbolic3d
```








#### `gyrotube(A, B, s, r, npoints=300):`
Tubular hyperbolic segment.
##### Parameters
- **`A,B`** points (lists or arrays)
The two endpoints of the segment.
- **`s`** positive float
Curvature parameter.
- **`r`** positive float
Radius of the tube.
- **`npoints`** integer
Number of points along the segment. The default is 300.
##### Returns
A PyVista mesh ready for inclusion in a plotting region.
___
#### `gyrotriangle(A, B, C, s, depth=5, tol=1e-6):`
Hyperbolic triangle.
##### Parameters
- **`A,B,C`** points (lists or arrays)
The vertices of the triangle.
- **`s`** positive float
Curvature parameter.
- **`depth`** integer
The number of recursive subdivions. The default is 5.
- **`tol`** small positive float
The tolerance used to merge duplicated points in the mesh.
The default is 1e-6.
##### Returns
A PyVista mesh ready for inclusion in a plotting region.