Code covered by the BSD License  

Highlights from
Meshing a spherical shell

Be the first to rate this file! 7 Downloads (last 30 days) File Size: 1.84 KB File ID: #38873

Meshing a spherical shell

by

 

This small function meshes a spherical shell and returns to unique vertices and proper faces matrix

| Watch this File

File Information
Description

% 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)

MATLAB release MATLAB 7.9 (R2009b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us