platonic_sphere
版本 1.3 (130.6 KB) 作者:
David Monteverde
Builds class-1 geodesic polyhedra (based on Platonic solids).
The main purpose of this function is to generate points on the surface of a unit sphere that have an optimized uniformity of distribution. A secondary purpose is to facilitate exploration of geodesic polyhedra.
The functional form is:
[polyhedron,properties] = platonic_sphere(symmetry,freq,style)
where inputs are:
symmetry: 'icosahedral', 'octahedral' or 'tetrahedral'
freq: subdivision frequency (natural number)
style: subdivision style ('planar' or 'spherical
The most uniform spherical distribution is produced using icosahedral symmetry. If no input parameters are given, default is icosahedral symmetry with a subdivision frequency of 3 (each face divided as a tetractys) and a planar subdivision style.
Example:
[polyhedron,properties] = platonic_sphere('icosahedral',3)
where output is:
- polyhedron: triangulation object
- properties: structure with fields describing properties of the polyhedron
practicalities:
- visualize: trisurf(polyhedron); axis equal
- make an stl file: stlwrite(polyhedron,'my_psphere')
- make a movie: psphere_movie('octahedral',25)
AUTHOR: David Monteverde
RELEASED: 2024-11-10
UPDATED: 2024-11-29
REV: 1.3
NOTES
1) Surface density of the "platonic sphere" (number of vertices of the subdivided polyhedron) increases quadratically with subdivision frequency:
nvp = (nfb/2)*freq^2 + (neb-3*nfb/2)*freq +( nvb-neb+nfb)
where,
nvp : number of vertices of the subdivided polyhedron
freq : subdivision frequency
nvb : number of vertices of the basis polyhedron
neb : number of edges of the basis polyhedron
nfb : number of faces of the basis polyhedron (platonic solid)
Parenthetically, the above expression is derived from:
nvp = nvb + neb*(freq-1) + nfb*Trinum(freq-2)
where Trinum(n) is the triangular number of n.
For instance, the surface densities for a platonic sphere with icosahedral basis are as follows:
freq: 1 2 3 4 5 6 7 8 9 10 ...
vertices: 12 42 92 162 252 362 492 642 812 1002 ...
2) Additional useful information:
https://en.wikipedia.org/wiki/Geodesic_polyhedron
Pugh, Antony. Polyhedra: a visual approach. University of California Press, 1976
引用格式
David Monteverde (2025). platonic_sphere (https://ww2.mathworks.cn/matlabcentral/fileexchange/175453-platonic_sphere), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
创建方式
R2024b
与 R2024a 及更高版本兼容
平台兼容性
Windows macOS Linux标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!| 版本 | 已发布 | 发行说明 | |
|---|---|---|---|
| 1.3 | streamlined functions, and implemented spherical style subdivision |
|
|
| 1.2 | implemented tetrahedral symmetry, added movie creation function |
||
| 1.1.2 | updated description |
||
| 1.1.1 | modified description |
||
| 1.1 | reverted to planar subdivision |
||
| 1.0.1 | added image to description page |
||
| 1.0.0 |
