How to render a 3D object from 2D matrix?
Afficher commentaires plus anciens
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 commentaires
Guillaume
le 20 Déc 2019
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
le 28 Déc 2019
Réponses (0)
Catégories
En savoir plus sur Lighting, Transparency, and Shading dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!