geodesicdomes 1.3.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- geodesicdomes-1.3.3/CHANGELOG.md +109 -0
- geodesicdomes-1.3.3/CITATION.cff +35 -0
- geodesicdomes-1.3.3/CONTRIBUTING.md +40 -0
- geodesicdomes-1.3.3/LICENSE +661 -0
- geodesicdomes-1.3.3/MANIFEST.in +8 -0
- geodesicdomes-1.3.3/NOTICE +60 -0
- geodesicdomes-1.3.3/PKG-INFO +560 -0
- geodesicdomes-1.3.3/README.md +488 -0
- geodesicdomes-1.3.3/docs/index.md +419 -0
- geodesicdomes-1.3.3/examples/01_quickstart.py +67 -0
- geodesicdomes-1.3.3/examples/02_plot_dome_3d.py +45 -0
- geodesicdomes-1.3.3/examples/03_unfolded_net.py +74 -0
- geodesicdomes-1.3.3/examples/04_neighbours.py +88 -0
- geodesicdomes-1.3.3/examples/05_map_projections.py +61 -0
- geodesicdomes-1.3.3/examples/06_spherical_som.py +99 -0
- geodesicdomes-1.3.3/examples/07_export_mesh.py +51 -0
- geodesicdomes-1.3.3/examples/08_plane_grids.py +58 -0
- geodesicdomes-1.3.3/examples/09_interactive_projection.py +75 -0
- geodesicdomes-1.3.3/examples/10_base_polyhedra.py +79 -0
- geodesicdomes-1.3.3/examples/11_interactive_base_polyhedra.py +101 -0
- geodesicdomes-1.3.3/examples/README.md +17 -0
- geodesicdomes-1.3.3/examples/base_explorer.py +299 -0
- geodesicdomes-1.3.3/examples/dome_utils.py +67 -0
- geodesicdomes-1.3.3/examples/legacy/test_geodesicdome.py +52 -0
- geodesicdomes-1.3.3/examples/legacy/test_geodesicdome_off.py +109 -0
- geodesicdomes-1.3.3/examples/legacy/test_plane_off.py +28 -0
- geodesicdomes-1.3.3/examples/legacy/test_projection.py +107 -0
- geodesicdomes-1.3.3/examples/legacy/test_projection_2.py +94 -0
- geodesicdomes-1.3.3/examples/notebooks/README.md +38 -0
- geodesicdomes-1.3.3/examples/notebooks/nb_setup.py +108 -0
- geodesicdomes-1.3.3/pyproject.toml +79 -0
- geodesicdomes-1.3.3/setup.cfg +4 -0
- geodesicdomes-1.3.3/setup_env.sh +638 -0
- geodesicdomes-1.3.3/src/geodesicdomes.egg-info/PKG-INFO +560 -0
- geodesicdomes-1.3.3/src/geodesicdomes.egg-info/SOURCES.txt +63 -0
- geodesicdomes-1.3.3/src/geodesicdomes.egg-info/dependency_links.txt +1 -0
- geodesicdomes-1.3.3/src/geodesicdomes.egg-info/requires.txt +44 -0
- geodesicdomes-1.3.3/src/geodesicdomes.egg-info/top_level.txt +1 -0
- geodesicdomes-1.3.3/src/mt/geodesicdome/__init__.py +26 -0
- geodesicdomes-1.3.3/src/mt/geodesicdome/backend.py +580 -0
- geodesicdomes-1.3.3/src/mt/geodesicdome/compute.py +129 -0
- geodesicdomes-1.3.3/src/mt/geodesicdome/grid/__init__.py +3 -0
- geodesicdomes-1.3.3/src/mt/geodesicdome/grid/geodesicdome.py +773 -0
- geodesicdomes-1.3.3/src/mt/geodesicdome/grid/plane.py +276 -0
- geodesicdomes-1.3.3/src/mt/geodesicdome/grid/polyhedra.py +298 -0
- geodesicdomes-1.3.3/src/mt/geodesicdome/interactive/__init__.py +30 -0
- geodesicdomes-1.3.3/src/mt/geodesicdome/interactive/mesh.py +27 -0
- geodesicdomes-1.3.3/src/mt/geodesicdome/interactive/rotation.py +57 -0
- geodesicdomes-1.3.3/src/mt/geodesicdome/interactive/sphere_map.py +257 -0
- geodesicdomes-1.3.3/src/mt/geodesicdome/interactive/viewer.py +419 -0
- geodesicdomes-1.3.3/src/mt/geodesicdome/manifold.py +91 -0
- geodesicdomes-1.3.3/src/mt/geodesicdome/projection/__init__.py +0 -0
- geodesicdomes-1.3.3/src/mt/geodesicdome/projection/equal_earth.py +29 -0
- geodesicdomes-1.3.3/src/mt/geodesicdome/projection/kavrayskiy.py +17 -0
- geodesicdomes-1.3.3/src/mt/geodesicdome/projection/projection.py +78 -0
- geodesicdomes-1.3.3/src/mt/geodesicdome/projection/wagner.py +35 -0
- geodesicdomes-1.3.3/src/mt/geodesicdome/py.typed +0 -0
- geodesicdomes-1.3.3/src/mt/geodesicdome/util.py +88 -0
- geodesicdomes-1.3.3/src/mt/geodesicdome/vertex.py +30 -0
- geodesicdomes-1.3.3/tests/test_backend.py +103 -0
- geodesicdomes-1.3.3/tests/test_base_polyhedra.py +200 -0
- geodesicdomes-1.3.3/tests/test_examples.py +38 -0
- geodesicdomes-1.3.3/tests/test_geodesicdome.py +39 -0
- geodesicdomes-1.3.3/tests/test_interactive.py +150 -0
- geodesicdomes-1.3.3/tests/test_package.py +17 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes are recorded here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
4
|
+
and the project uses [Semantic Versioning](https://semver.org/).
|
|
5
|
+
|
|
6
|
+
## [Unreleased]
|
|
7
|
+
|
|
8
|
+
## [1.3.2] — 2026-10-03
|
|
9
|
+
|
|
10
|
+
### No major change
|
|
11
|
+
- just touched.
|
|
12
|
+
|
|
13
|
+
## [1.3.1] — 2026-10-02
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- **Base polyhedra.** `GeodesicDome(frequency, base=...)` builds the dome on the `'icosahedron'` (default,
|
|
17
|
+
unchanged), the `'tetrahedron'` or the `'dodecahedron'` (also `'icosa'`, `'tetra'`, `'dodeca'`). It returns an
|
|
18
|
+
`IcosahedronDome`, `TetrahedronDome` or `DodecahedronDome`, all subclasses of `GeodesicDome` with the same
|
|
19
|
+
API, index grid and six neighbour offsets.
|
|
20
|
+
- Tetrahedron: the 4HSOM orthogonal array of de Sousa & Oliveira (IJCNN 2012), `(f+1) × (2f+1)` cells,
|
|
21
|
+
2f²+2 points.
|
|
22
|
+
- Dodecahedron: pentakis dodecahedron (each pentagon cut into 5 triangles at its centre) subdivided on the
|
|
23
|
+
flat pentagons, 30f²+2 points, 12 five-neighbour pentagon centres.
|
|
24
|
+
- New module `mt.geodesicdome.grid.polyhedra` with the base solids and their nets (`base_net`,
|
|
25
|
+
`normalise_base`, `BASES`), and a generic grid engine `NetDome` for any such net.
|
|
26
|
+
- `ProjectionViewer(..., colors='base')` colours any dome by the faces of its own base solid
|
|
27
|
+
(`BaseNet.face_centres`).
|
|
28
|
+
- **Interactive example for every dome type**: `examples/11_interactive_base_polyhedra.py` and
|
|
29
|
+
`examples/base_explorer.py` -- the dome on the sphere, on its index grid and in a map centred on a vertex,
|
|
30
|
+
with the vertex's neighbour rings shown in all three (click the net or the map to move it), coloured by
|
|
31
|
+
base face, position or spherical cell area. Notebooks `10_base_polyhedra.ipynb` and
|
|
32
|
+
`11_interactive_base_polyhedra.ipynb` (three map viewers rotated together, the explorer with ipywidgets,
|
|
33
|
+
cell areas at matched size).
|
|
34
|
+
- `examples/10_base_polyhedra.py` and `tests/test_base_polyhedra.py` (index neighbours checked against the
|
|
35
|
+
mesh for every vertex, rings against breadth-first search, the 4HSOM array layout, and the generic engine
|
|
36
|
+
against the icosahedral dome).
|
|
37
|
+
- **Example notebooks** in `examples/notebooks/`: one Jupyter notebook per example script (01–09), split into
|
|
38
|
+
explained steps, each ending with ipywidgets controls to explore it (frequency, rings, centre vertex,
|
|
39
|
+
projection, SOM training schedule, export options, viewer rotation, ...). With `ipympl` the figures are live:
|
|
40
|
+
3D plots rotate with the mouse and the `ProjectionViewer` can be dragged. New `notebooks` extra
|
|
41
|
+
(`pip install -e ".[notebooks]"`); `setup_env.sh` installs it by default.
|
|
42
|
+
|
|
43
|
+
### Fixed
|
|
44
|
+
- `SphereMap` (and so `ProjectionViewer`) left thin gaps along the curved map border for coarse meshes
|
|
45
|
+
(e.g. frequency 1-2, or tetrahedral domes): long edges are now drawn through extra points (new
|
|
46
|
+
`max_edge` argument, default 0.2 rad). Faces, face indices and colours are unchanged.
|
|
47
|
+
|
|
48
|
+
## [1.3.0] — 2026-10-01
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
- **`mt.geodesicdome.backend`**: compute backends. `get_backend()` picks the best device automatically:
|
|
52
|
+
NVIDIA GPU through torch (CUDA) or CuPy, the Apple Silicon GPU through torch (MPS), otherwise NumPy on every
|
|
53
|
+
CPU core (work cut into blocks that run on a thread pool; BLAS is multi-threaded). Override with
|
|
54
|
+
`get_backend('cuda' | 'mps' | 'cupy' | 'cpu' | 'numpy' | 'torch:cpu')`, `set_default_backend()` or the
|
|
55
|
+
`MTGEODESIC_BACKEND` environment variable; `MTGEODESIC_NUM_THREADS`, `MTGEODESIC_DTYPE` and `MTGEODESIC_MEMORY`
|
|
56
|
+
tune it. `describe()` lists what is available. torch and CuPy stay optional (`pip install "mtgeodesicdome[gpu]"`).
|
|
57
|
+
- **`mt.geodesicdome.compute`**: `DomeArrays.from_dome()` (points, faces, edges, index map, ring length),
|
|
58
|
+
`angular_distance()`, `ring_distance()` and `nearest_vertex()` on the chosen backend, in memory-bounded blocks.
|
|
59
|
+
|
|
60
|
+
### Changed
|
|
61
|
+
- `Projection.build` projects all vertices in one vectorised call (same result, much faster on large domes).
|
|
62
|
+
|
|
63
|
+
## [1.2.0] — 2026-09-28
|
|
64
|
+
|
|
65
|
+
### Changed
|
|
66
|
+
- **New home.** Published as `mtgeodesicdome` (import `mt.geodesicdome`) from
|
|
67
|
+
[`takatsuka/GeodesicDome`](https://github.com/takatsuka/GeodesicDome).
|
|
68
|
+
- `src/` layout; tests in `tests/`; the old plotly/dash viewers moved to `examples/legacy/`.
|
|
69
|
+
- GitHub Actions workflows for tests (Linux, macOS, Windows; Python 3.10–3.14) and PyPI publishing.
|
|
70
|
+
- Code tidied to pass `ruff check` (type hints use built-in generics such as `list[int]`, unused
|
|
71
|
+
variables removed). No change in behaviour.
|
|
72
|
+
|
|
73
|
+
### Added
|
|
74
|
+
- `tests/test_geodesicdome.py`: sizes, `split` and neighbour-ring checks.
|
|
75
|
+
- User guide in `docs/index.md`.
|
|
76
|
+
|
|
77
|
+
### Fixed
|
|
78
|
+
- The abstract methods of `Manifold` and `Projection` raised `TypeError` (`raise NotImplemented()`);
|
|
79
|
+
they now raise `NotImplementedError`.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Earlier history
|
|
84
|
+
|
|
85
|
+
### 1.1.0 (first release since 1.0.11 on PyPI)
|
|
86
|
+
|
|
87
|
+
*Fixes*
|
|
88
|
+
* Fixed `GeodesicDome(frequency=n)` for n > 1. Previously it recorded frequency n² and building faces failed.
|
|
89
|
+
* Fixed seam linking along one edge of the net (v6–v7 / v10–v7). 2(f−1) vertices there returned only
|
|
90
|
+
4 of their 6 neighbours. Neighbour rings now match graph distance on the sphere for every vertex.
|
|
91
|
+
* `latlon_coord` is now stored as float (it was truncated to integers).
|
|
92
|
+
* `util.facing` no longer uses `np.cross` on 2D vectors, which is deprecated in NumPy 2.
|
|
93
|
+
* Removed debug `print`s from `split()`.
|
|
94
|
+
|
|
95
|
+
*New*
|
|
96
|
+
* Subpackage `interactive`: `ProjectionViewer` (drag to rotate the sphere in a map projection),
|
|
97
|
+
`SphereMap` (seam- and pole-correct projection of a rotated mesh), `unique_mesh` and rotation helpers.
|
|
98
|
+
* `Projection` gained vectorised `latlong_to_2d`, `xyz_to_2d_many` and `outline`. Existing methods are unchanged.
|
|
99
|
+
* `GeodesicDome.__repr__` and `__version__`.
|
|
100
|
+
* The `examples/` folder, this README, a test suite, and `setup_env.sh` for a complete development
|
|
101
|
+
environment.
|
|
102
|
+
|
|
103
|
+
*Packaging*
|
|
104
|
+
* Licensed under **AGPL-3.0-or-later** with an attribution term (see the [README](https://github.com/takatsuka/GeodesicDome#8-licence)).
|
|
105
|
+
* Built from `pyproject.toml`, which replaces `setup.py`. Correct requirements: Python ≥ 3.10 and NumPy,
|
|
106
|
+
plus optional extras.
|
|
107
|
+
* Test scripts are no longer shipped in the wheel.
|
|
108
|
+
|
|
109
|
+
### 1.0.7 – 1.0.11 (2024): earlier releases.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: >-
|
|
3
|
+
If you use this software, please cite the publication below
|
|
4
|
+
(preferred-citation) and, where appropriate, the software itself.
|
|
5
|
+
title: "GeodesicDome: geodesic domes for Python"
|
|
6
|
+
type: software
|
|
7
|
+
authors:
|
|
8
|
+
- family-names: Takatsuka
|
|
9
|
+
given-names: Masahiro
|
|
10
|
+
email: masa@takatsuka.org
|
|
11
|
+
version: 1.3.3
|
|
12
|
+
date-released: "2026-10-02"
|
|
13
|
+
license: AGPL-3.0-or-later
|
|
14
|
+
repository-code: "https://github.com/takatsuka/GeodesicDome"
|
|
15
|
+
url: "https://pypi.org/project/geodesicdomes/"
|
|
16
|
+
keywords:
|
|
17
|
+
- geodesic dome
|
|
18
|
+
- icosahedral grid
|
|
19
|
+
- spherical self-organizing map
|
|
20
|
+
preferred-citation:
|
|
21
|
+
type: article
|
|
22
|
+
authors:
|
|
23
|
+
- family-names: Wu
|
|
24
|
+
given-names: Yingxin
|
|
25
|
+
- family-names: Takatsuka
|
|
26
|
+
given-names: Masahiro
|
|
27
|
+
title: "Spherical self-organizing map using efficient indexed geodesic data structure"
|
|
28
|
+
journal: "Neural Networks"
|
|
29
|
+
volume: 19
|
|
30
|
+
issue: "6-7"
|
|
31
|
+
start: 900
|
|
32
|
+
end: 910
|
|
33
|
+
year: 2006
|
|
34
|
+
month: 7
|
|
35
|
+
doi: "10.1016/j.neunet.2006.05.021"
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Contributing to GeodesicDome
|
|
2
|
+
|
|
3
|
+
Thank you for considering a contribution! Bug reports, questions and pull requests are welcome on
|
|
4
|
+
[GitHub](https://github.com/takatsuka/GeodesicDome/issues).
|
|
5
|
+
|
|
6
|
+
## Development set-up
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
python -m venv .venv && source .venv/bin/activate
|
|
10
|
+
pip install -e ".[dev]" # editable install with test and lint tools
|
|
11
|
+
pytest # runs the test suite
|
|
12
|
+
ruff check . && ruff format . # lint and format
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Please add or update tests in `tests/`, add a line to `CHANGELOG.md` under *Unreleased*, and keep
|
|
16
|
+
the `SPDX-License-Identifier` and copyright header at the top of every source file.
|
|
17
|
+
|
|
18
|
+
## Licence of contributions (please read)
|
|
19
|
+
|
|
20
|
+
GeodesicDome is published under the GNU Affero GPL v3 or later (AGPL-3.0-or-later), with an additional attribution term (see
|
|
21
|
+
`LICENSE` and `NOTICE`). The copyright holder, Masahiro Takatsuka, also offers the software under other
|
|
22
|
+
licences, including commercial ones. To keep that possible, contributions are accepted only on the
|
|
23
|
+
following terms.
|
|
24
|
+
|
|
25
|
+
By submitting a contribution (a pull request, patch, or other material) you confirm that:
|
|
26
|
+
|
|
27
|
+
1. **You have the right to submit it.** The contribution is your original work, or you otherwise have the
|
|
28
|
+
right to submit it under these terms. If your employer has rights to your work, you have its permission.
|
|
29
|
+
2. **You keep your copyright,** and license the contribution to the public under the GNU AGPL v3 or later,
|
|
30
|
+
like the rest of the project.
|
|
31
|
+
3. **You also grant a broader licence to Masahiro Takatsuka.** This is a perpetual, worldwide,
|
|
32
|
+
non-exclusive, royalty-free, irrevocable licence, including under any patent claims you can license that
|
|
33
|
+
the contribution necessarily infringes. It covers using, reproducing, modifying, distributing and
|
|
34
|
+
sublicensing the contribution, and licensing it under any other terms, including proprietary or
|
|
35
|
+
commercial ones, alone or as part of GeodesicDome or any other work.
|
|
36
|
+
4. **You are not owed any payment or support,** and the contribution is provided "as is", without
|
|
37
|
+
warranty.
|
|
38
|
+
|
|
39
|
+
Please state in your pull request: *"I agree to the licence terms in CONTRIBUTING.md."* Pull requests
|
|
40
|
+
without that statement cannot be merged.
|