How can I plot a sphere when I know [x,y,z] coordinates of points belonging to the sphere?

8 visualizaciones (últimos 30 días)
Dear mathworks users, I have a serie of point coordinates (matrix size Nx3) which belong to the sphere. How can I plot it with maltab? I am not able to find any surf and meshgrid combination for use.
And finally, my data are a spherical function and each point has its own intensity value. So I need to add color based on intensity value to each point. The intensity outside the points should be interpolated based on control points.
Thanks for help. Rene

Respuestas (1)

Walter Roberson
Walter Roberson el 18 de Sept. de 2015
pointsize = 20;
scatter3(x(:), y(:), z(:), pointsize, intensity(:))
  1 comentario
Rene Labounek
Rene Labounek el 18 de Sept. de 2015
I was looking on scatter3 function too. But it is not exactly what I want and need.
pointsize = 500;
scatter3(G(:,1), G(:,2), G(:,3), pointsize, DW_int_ban(:))
Result:
The visualization should like something like this:
I am afraid I will have to define faces for points in triangular net and then use trisurf. But I still bealive that easier way exists.
If somebody would be interested. Points (G) and intensity values (I) are attached in file data.mat.

Iniciar sesión para comentar.

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by