Finding a matrix representing points of sphere
Ältere Kommentare anzeigen
I want try to use active contour algorithm in 3D.
For that I need initial boundary. I want to select initial boundary as sphere or ellipsoid.I can not use sphere function since it is in graphic format.
I need a matrix [Ax3] representing points on sphere. Where A is no of points
Antworten (1)
Alan Stevens
am 28 Aug. 2020
Why can't you use sphere? You can get your matrix as follows:
N = 19; A = (N+1)^2; R = 2; % Example data with R as sphere radius
[X,Y,Z] = sphere(N);
S = R*[X(:), Y(:), Z(:)]; % This is your Ax3 matrix
To see the result:
plot3(S(:,1),S(:,2),S(:,3),'.')
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!