How do I plot a colored disk on a globe?
조회 수: 1 (최근 30일)
이전 댓글 표시
I would like to plot a diskoid on the surface of a globe. The diskoid would colored to represent distance from the center.
ie green in the center fading to blue fading red at the edge and red everywhere outside the diskoid.
I would like to be able to both choose the radius on the diskoid and where the center point of the diskoid lies on the surface of the globe.
Here is what I have so far...not sure if I am on the right track or not.
baseLat = 53; baseLon = -60; %This is where i would like the diskoid centered
figure
axesm('globe','galt',0)
axesm ('globe','Grid', 'on');
camposm(baseLat,baseLon,1)
disk=zeros(180,360);
for i=1:180
for ii = 1:360
if (ii-300)^2+(i-143)^2>15^2
disk(i,ii)=20;
end
end
end
meshm(disk, [1 90 0])
load coast
plotm(lat, long)
axis off
set(gcf,'Color',[0 0 0]);
set(gca,'CameraViewAngle',70)
The diskoid is really distorted and if it goes over the north pole then all bets are completely off.
Thanks
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Mapping Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!