Filling in between x,y,z coodinates

2 次查看(过去 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 个评论
Kavish Ram
Kavish Ram 2020-9-26
Yeah, I was wondering that too. The distance and angle values are given to be by a LIDAR (scanner) and I have just used them with the equation to get xyz
Walter Roberson
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 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