How to render a 3D object from 2D matrix?
Mostrar comentarios más antiguos
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 comentarios
Guillaume
el 20 de Dic. de 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
el 28 de Dic. de 2019
Respuestas (0)
Categorías
Más información sobre Lighting, Transparency, and Shading en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!