File Exchange

## N-level geoid

version 2.1 (54.7 KB) by Nicolas Douillet

### Nicolas Douillet (view profile)

A function to build a N-level geoid from sampling and projecting the icosahedron triangles on the unit sphere.

Updated 28 Nov 2019

n_level_geoid : function to generate a n-level geoid shape, defined by its
vertices set and the corresponding triangulation. Vertices belong to the unit sphere.
Algorithm principle is based on sampling the 20 triangles of the icosahedron.

Author & support : nicolas.douillet (at) free.fr, 2017-2019.

Syntax
[V, T] = n_level_geoid(n)
[V, T] = n_level_geoid(n, option_display)

Description
[V, T] = n_level_geoid(n) computes n-level geoid vertices coordinates V
and its corresponding triangulation T.

[V, T] = n_level_geoid(n, option_display) display the resulting geoid if
the boolean option_display is is either logical or numeric true.

Input arguments

- n : positive integer (n > 0), the level and corresponds to the
number of steps to sample the initial triangles.
- option_display : either logical *false/true or numeric 0*/1.

Output arguments

| | |
- V = [Vx Vy Vz] ; numeric matrix of the geoid vertices X, Y, Z coordinates.
| | |

Size < (20*(n+1)*(n+2)/2.

| | |
- T = [i0 i1 i2] ; positive integer numeric matrix of the triangles
| | |

vertices indices. Size < 20*n^2.

Example #1

Basic icosahedron (level = 1)
n = 1;
option_display = true;
[V, T] = n_level_geoid(n, option_display);

Example #2

6th level geoid of radius equals 3
n = 6;
option_display = true;
[V, T] = n_level_geoid(n, option_display);
V = 3*V;

NB : function sample_triangle is included, but may also be found independently here :

### Cite As

Nicolas Douillet (2019). N-level geoid (https://www.mathworks.com/matlabcentral/fileexchange/69212-n-level-geoid), MATLAB Central File Exchange. Retrieved .