Filling in between x,y,z coodinates
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi,
I am trying to fill in the regions for x, y and z in scatter3. My goal is to show all the filled contour (with colormap jet) with each indivual axis. This will be used in a terrain mapping situation.
I have tried both fill and patch function but haven't been able to achieve any display. (apologize for the messy diagram).
Any help with be highly appreciated

My code is
x = DistanceX .* sin(AngleX) .* cos (pi);
y = DistanceY .* sin(AngleY) .* sin(pi);
z = DistanceZ .* cos(AngleZ);
figure;
hold on;
scatter3 (x,y,z);
line(x ,y,z, 'LineStyle', '-');
댓글 수: 3
Walter Roberson
2020년 9월 26일
It is an important concern for your purposes. The distance along one axes is noise compared to the other axes. Consider if you use traditional Euclidean sum-of-squares then 1e-13 squared is about 1e-26 which is well below eps of the x coordinates. Any attempt to find boundaries by triangular decomposition is doomed unless the calculation is very careful. The hypot() function call does take steps to correct for that but has its limits.
Note that the hold on before the 3d line call freezes the view so we only see 2d. You should view(3) and show us that.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Contour Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!