File Exchange

image thumbnail

N-level geoid

version 2.1 (54.7 KB) by Nicolas Douillet
A function to build a N-level geoid from sampling and projecting the icosahedron triangles on the unit sphere.

4 Downloads

Updated 28 Nov 2019

View License

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.

See also : SPHERE, CYLINDER

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 :

https://fr.mathworks.com/matlabcentral/fileexchange/64395-sample_triangle?s_tid=prof_contriblnk

Cite As

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

Comments and Ratings (0)

Updates

2.1

All in two files only

2.0

+ See also section links, improved doc, help, description, summary, typo.

1.2

+ dependancy function links !

1.1

+ doc

MATLAB Release Compatibility
Created with R2019b
Compatible with any release
Platform Compatibility
Windows macOS Linux