In this video I explain how to generate a simple sphere. So here I didn't go over clustering of the cross sections towards the singularities to improve the geometry in case it is meant for a CFD study; if you are interested in that, hopefully I would already have a video out by the time you are reading this.
Hope you found the video useful, I am learning programming myself and doing these little videos as practice exercises.
Playlist: 3D OBJECTS in MATLAB
https://youtube.com/playlist?list=PLALdklvvx2NLIL-UrL3BymSRbZ4mC23hk
Playlist: FILE FORMATS in MATLAB
https://youtube.com/playlist?list=PLALdklvvx2NK2P7cVOBRPFmsPB3lFnXp_
Playlist: UTILITIES in MATLAB
https://youtube.com/playlist?list=PLALdklvvx2NLBmDmp693MDiAuB2ISYNYO
Link to surf2stl() download:
https://www.mathworks.com/matlabcentral/fileexchange/4512-surf2stl?s_tid=srchtitle_surf2stl_1
repmat() documentation:
https://www.mathworks.com/help/matlab/ref/repmat.html?s_tid=doc_ta
pol2cart() documentation:
https://www.mathworks.com/help/matlab/ref/pol2cart.html?s_tid=doc_ta
meshgrid() documentation:
https://www.mathworks.com/help/matlab/ref/meshgrid.html
Software: MATLAB 2020b