How to render a 3D object from 2D matrix?
이전 댓글 표시
I have 3D data in 3 matrix columns (1000000x3 for columns x, y, z) and would like to render the object. I've tried plot3 and it works, but as there are many datapoints the result is just a mess (see attachment). I thought about binning the data into bins of size e.g. 100x100x10; each bin would then become a 4D point - x,y,z,# of counts. Could you recommend a function for that? I've looked through hist3 and bar3 but they seem to only 3D visualise 2D data.
Thanks in advance, any help would be greatly appreciated.
댓글 수: 2
Guillaume
2019년 12월 20일
Are your points supposed to represent something? The answer to your question entirely depends on what you're trying to see out of that data.
Certainly, the envelope (the convex hull) or your points doesn't look like much.
Points = readmatrix('data_part');
T = convhulln(Points);
plot3(Points(:, 1), Points(:, 2), Points(:, 3), '.');
hold('on')
trisurf(T, Points(:, 1), Points(:, 2), Points(:, 3), 'FaceColor', 'b', 'FaceAlpha', 0.3);
view([-80 5]);
Zuzana Kvicalova
2019년 12월 28일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!