Skip to main content

Geodesic icosahedron

Creating geodesic icosahedron given subdivision frequency.

Installation

Install the module using pip install icosphere or clone the repository.

Use

from icosphere import icosphere
nu = 5  # or any other integer
vertices, faces = icosphere(nu)

Examples

Check the examples in icosphere github, python script uses matplotlib for visualization, and one of jupyter notebooks uses plotly. You can also open the notebooks in colab: Open In Colab - with ploty, Open In Colab - with matplotlib.

Why use subdivision frequency?

For a certain subdivision frequency nu, each edge of the icosahedron will be split into nu segments, and each face will be split into nu**2 faces. This is different than a more common approach which recursively applies a subdivision with nu = 2, for example as used in pytorch3d ico_sphere, pymeshlab sphere, trimesh icosphere, and PyMesh generate_icosphere.

The advantage of using the subdivision frequency, compared to the recursive subdivision, is in controlling the mesh resolution. Mesh resolution grows quadratically with subdivision frequencies while it grows exponentially with iterations of the recursive subdivision. To be precise, using the recursive subdivision, the number of vertices and faces in the resulting icosphere grows with iterations iter as nr_vertex = 12 + 10 * (4**iter -1) and nr_face = 10 * 4**iter which gives a sequence of mesh vertices

12, 42, 162, 642, 2562, 10242, 40962, 163842, 655362, 2621442, 10485762...

Notice for example there is no mesh having between 2562 and 10242 vertices. Using subdivision frequency, the number of vertices and faces grows with nu as Notice for example there is no mesh having between 2562 and 10242 vertices. Using subdivision frequency, the number of vertices and faces grows with nu as nr_vertex = 12 + 10 * (nu**2 -1) and nr_face = 20 * nu**2 which gives a sequence of mesh vertices

 12, 42, 92, 162, 252, 362, 492, 642, 812, 1002, 1212, 1442, 1692, 1962,
 2252, 2562, 2892, 3242, 3612, 4002, 4412, 4842, 5292, 5762, 6252, 6762,
 7292, 7842, 8412, 9002, 9612, 10242...

Now there is 15 meshes having between 2562 and 10242 vertices. The advantage is even more pronounced when using higher resolutions.

The code was originally developed for this work.

Reference this work

Dahl, V. A., Dahl, A. B., & Larsen, R. (2014). Surface Detection Using Round Cut. 2014 2nd International Conference on 3D Vision. https://doi.org/10.1109/3dv.2014.60

@inproceedings{Dahl_2014,
	doi = {10.1109/3dv.2014.60},
	url = {https://doi.org/10.1109%2F3dv.2014.60},
	year = 2014,
	month = {dec},
	publisher = {{IEEE}},
	author = {Vedrana A. Dahl and Anders B. Dahl and Rasmus Larsen},
	title = {Surface Detection Using Round Cut},
	booktitle = {2014 2nd International Conference on 3D Vision}
}

Metadata

Release files for qi-icosphere 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qi-icosphere 0.1.3
File Size Uploaded
qi_icosphere-0.1.3.tar.gz 14.7 kB Details

Release files / qi_icosphere-0.1.3.tar.gz

Download URL qi_icosphere-0.1.3.tar.gz
Size 14.7 kB
Tags Source
SHA-256 checksum
How to use checksums
81e9d19eafdd65ad055282a53bc4f4da70681102ac443b56e5d95f9e4a657de3
BLAKE2b-256 checksum
How to use checksums
2bf9f3b065ab3db2bf18c29df980c9724b7aaf33c7972c9f4f1170d6005d8cb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.21

Release history Release notifications | RSS feed

This release

0.1.3 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page