2

I have a confusion recently about the visualization of data with four dimension,like as {x,y,z,color}. This is my current solution.

data = Uncompress[FromCharacterCode[Flatten[ImageData[Import["https://i.stack.imgur.com/s1ZKU.png"],"Byte"]]]];
front = data[[All, 1 ;; 3]];
back = data[[All, 4]];
Graphics3D[Point[front, VertexColors -> Hue /@ Rescale[back]]]

the effect like the picture.

enter image description here

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]]

enter image description here

the shape is contented to me.But I cannot render it by what I want to.Can anybody help me?

yode
  • 26,686
  • 4
  • 62
  • 167
  • Something like: 19575? – Kuba Apr 25 '15 at 13:48
  • @Kuba,yeah,thk your concern this problem.I have read that some times,but there are two difference,first,the first solution's point is not a face.the scene is same to my first picture. the scond solution 's data isn't a coordinates.so i want to get a new method. – yode Apr 25 '15 at 14:01
  • and all my data is the surface of a cube. – yode Apr 26 '15 at 03:47

2 Answers2

4
Graphics3D[{EdgeForm[{}], 
GraphicsComplex[front, 
MeshCells[DelaunayMesh[front], 2], VertexColors -> Hue /@ back]}]

MeshCoordinates[DelaunayMesh[front]] == front

(*True*)

enter image description here

HyperGroups
  • 8,619
  • 1
  • 26
  • 63
2

After version 10.2, we can directly plot it:

ListDensityPlot3D[data, Boxed -> False, AxesOrigin -> {0, 0, 0}]

enter image description here

yode
  • 26,686
  • 4
  • 62
  • 167