color the surface of each triangle considering the RGB value

3 vues (au cours des 30 derniers jours)
Alberto Acri
Alberto Acri le 18 Fév 2021
Commenté : Alberto Acri le 19 Fév 2021
Hi! I would like to color the surface of each triangle considering the RGB value applied to each node. Is it possible?
ANALYSIS(:,:)=load('file_color.txt');
figure(1)
x = ANALYSIS(:,1)
y = ANALYSIS(:,2)
z = ANALYSIS(:,3)
scatter3(x,y,z, 6, ANALYSIS(:,5:7)./255, 'filled');
grid on
axis equal
view([20,130,40])
  2 commentaires
darova
darova le 19 Fév 2021
What is file_mesh.txt? Is it some information about triangles?
Alberto Acri
Alberto Acri le 19 Fév 2021
yes, exactly. The distribution of triangles on the 3D object.

Connectez-vous pour commenter.

Réponses (1)

KSSV
KSSV le 18 Fév 2021

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by