Meshing a spherical shell
% mesh_sph meshes the given spherical shell which is defined bu rho the
% radius theta the azimuth angle and phi the polar angle. For more info
% type doc sph2cart. Theta is 0<theta<2*pi and pi/2<phi<pi/2
% rho is always positive double. In order to determine the mesh size
% choose an increment for each angle as shown in the examples
% Returns to vertices matrix `vert` and faces matrix `faces`
%Examples:
% Meshing a full sphere with radius 1, 8 faces along theta and 4 faces
%along phi
%[v f] = mesh_sph(1,0:pi/4:2*pi, -pi/2:pi/8:pi/2)
%
% Meshing an upper hemi-sphere with 4 faces along theta and 8 faces along
% phi
%[v f] = mesh_sph(1,0:pi/2:2*pi, 0:pi/16:pi/2)
Cite As
Bilen Oytun Peksel (2025). Meshing a spherical shell (https://www.mathworks.com/matlabcentral/fileexchange/38873-meshing-a-spherical-shell), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |