How to plot 3D point clouds with color changes with respect to z?

I'm doing 3D face surface data visulization. The data is a N*3 matrix, of which the 1st column represents x of every point, 2nd represents y and 3rd represents z. I want to use point-based model. So I think the function "plot3" must be the choice. But how can I use plot3 to draw each points (x,y,z) with color determined by z so that color is propotional to surface height?
I know mesh can do that, but I dont want a mesh model. I need a point-based model so that I could do further manipulation like two point sets registration.
If any one could answer me, I would very appreciate!!

Antworten (2)

deus dionyssos
deus dionyssos am 17 Mai 2013

1 Stimme

plot3(x,y,z,'marker','.','markeredgecolor',z)
Andrew Newell
Andrew Newell am 19 Mai 2011

0 Stimmen

The easiest thing to do would be to plot pixels using imagesc.
Or you could use scatter3 (see this answer).
EDIT: If scatter3 is too slow for you, maybe fscatter3 from the FEX will help.

1 Kommentar

I can't use pixels, they are 3D points. I need them to to be realistic. Scatter seems reasonable but I've tried, it's very slow.

Melden Sie sich an, um zu kommentieren.

Gefragt:

am 19 Mai 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by