How to plot equally distributed points on 1/8th part of Spherical surface?

조회 수: 2 (최근 30일)
Mukund
Mukund 2018년 11월 1일
댓글: Mukund 2018년 11월 1일
x=0:1 y=0:1 z=0:1
  댓글 수: 2
Walter Roberson
Walter Roberson 2018년 11월 1일
Equally distributed with respect to what? Surface area or angle?
Mukund
Mukund 2018년 11월 1일
With respect to angle from origin

댓글을 달려면 로그인하십시오.

답변 (1개)

John D'Errico
John D'Errico 2018년 11월 1일
편집: John D'Errico 2018년 11월 1일
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.
  댓글 수: 1
Mukund
Mukund 2018년 11월 1일
Yes this is expected. However, Is it possible to get them equidistant w.r.t. uniform rays emanating from origin.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by