icoSphereMesh(n)

バージョン 1.1.0.0 (3.19 KB) 作成者: Matthew Kelly
Compute the triangle mesh for a sphere, using an icosphere mesh.
ダウンロード: 302
更新 2015/12/12

ライセンスの表示

% mesh = icoSphereMesh(n)
%
% This code returns a triangle mesh for the unit icosphere in 3 dimensions
%
% INPUTS:
% n = recursion level: (default = 1)
% n == 0 returns 12 verticies
% n == 1 returns 42 verticies
% n == 2 returns 162 verticies
% n == 3 returns 642 verticies
% n == 4 returns 2562 verticies
% n == 5 returns 10242 verticies
% n > 5 set n == 5 to avoid huge mesh.
%
% OUTPUTS:
% mesh = struct with fields:
% mesh.face = [M x 3] array of indicies for each triangle
% mesh.x = the x-coordinate of each vertex
% mesh.y = the y-coordinate of each vertex
% mesh.z = the z-coordinate of each vertex
%
% NOTES:
% 1) Plot using: trimesh(mesh.face, mesh.x, mesh.y, mesh.z);
%
% 2) My code is based on code from two online sources:
% http://blog.andreaskahler.com/2009/06/creating-icosphere-mesh-in-code.html
% http://eeg.sourceforge.net/doc_m2html/bioelectromagnetism/mesh_refine_tri4.html
%

引用

Matthew Kelly (2024). icoSphereMesh(n) (https://www.mathworks.com/matlabcentral/fileexchange/54434-icospheremesh-n), MATLAB Central File Exchange. に取得済み.

MATLAB リリースの互換性
作成: R2012a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersTriangulation Representation についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
バージョン 公開済み リリース ノート
1.1.0.0

Added photo. Made file name more clear. Improved description.

1.0.0.0