Plot part of sphere by binary map.

조회 수: 3 (최근 30일)
sarel aharoni
sarel aharoni 2021년 9월 18일
댓글: sarel aharoni 2021년 9월 20일
Hey i had binary map of aphere's net The map (180x360 matrix for az,el) cover 24% of the sphere and Represents Camera field of view. I want plot the sphere, only where the binary map are true. And where ita false to make no sphere (or sphere with transparency 100%, II add pic of the camera field of view (before make it binary map)

답변 (1개)

darova
darova 2021년 9월 19일
What about plot3?
[x,y,z] = sphere(20);
[az,el] = meshgrid(200:5:250,0:5:20);
[x1,y1,z1] = sph2cart(az*pi/180,el*pi/180,1);
plot3(x1,y1,z1,'.r')
surface(x,y,z,'facecolor','none','edgecolor',[1 1 1]/2)
axis equal
  댓글 수: 3
darova
darova 2021년 9월 20일
DId you try to replace black pixels with NaN?
sarel aharoni
sarel aharoni 2021년 9월 20일
Hey Yes, i tried... It still plot the nan as black

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by