I have a confusion recently about the visualization of data.the data you can get here.The construction of data is four dimension,like as {x,y,z,color},this is my current solution.
data = ReadList["2.txt", {Real, Real, Real, Real}];
front = data[[All, 1 ;; 3]];
back = data[[All, 4]];
Graphics3D[Point[front, VertexColors -> Hue /@ Rescale[back]]]
the effect like the picture.
it is not my intention.i want get a cube whose color be determined by the fourth element of the list.
I have an another try like this.
Style[ConvexHullMesh[front]]
the shape is contented to me.But I cannot render it by what I want to.Can anybody help me?
Answer
Graphics3D[{EdgeForm[{}],
GraphicsComplex[front,
MeshCells[DelaunayMesh[front], 2], VertexColors -> Hue /@ back]}]
MeshCoordinates[DelaunayMesh[front]] == front
(*True*)
Comments
Post a Comment