mySphere(N)

MATLAB function for generating equidistant points on the surface of a unit sphere.
524 Downloads
Updated 30 Jun 2016

View License

Input: the target number of points or nodes on the surface of a unit sphere (N).
Output: position column vectors X, Y, and Z of length equal to or close to N.
Points are distributed by choosing circles of constant latitudes separated by d_theta, and on these circles placing points separated by d_phi, such that d_theta ~ d_phi. The area per point (d_theta)*(d_phi) therefore remains constant across the sphere surface.

Cite As

Brian Z Bentz (2024). mySphere(N) (https://www.mathworks.com/matlabcentral/fileexchange/57877-mysphere-n), MATLAB Central File Exchange. Retrieved .

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

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0

6/20/2016: added an example script to plot the unit sphere and demonstrate scaling the radius and displacement.