How to plot equally distributed points on 1/8th part of Spherical surface?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
x=0:1 y=0:1 z=0:1
2 comentarios
Walter Roberson
el 1 de Nov. de 2018
Equally distributed with respect to what? Surface area or angle?
Respuestas (1)
John D'Errico
el 1 de Nov. de 2018
Editada: John D'Errico
el 1 de Nov. de 2018
Your rather confusing question PROBABLY implies you want to plot points that are equally distributed on the surface of a unit sphere, but only in the first quadrant in R^3. In fact, the phrase equally distributed is mathematically meaningless. So I can only presume that you meant uniformly distributed.
The trivial solution is just
X = abs(randn(1000,3));
X = X./sqrt(sum(X.^2,2));
Each row of X is one point. Plot as:
plot3(X(:,1),X(:,2),X(:,3),'.')
box on
grid on
This is my best guess as to what you wanted to do.
Note that it will fail if your MATLAB release is older than R2016b. You can fix that using baxfun in the second line.
Ver también
Categorías
Más información sobre Surface and Mesh Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!