2
$\begingroup$

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.

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?

$\endgroup$
  • $\begingroup$ Something like: 19575? $\endgroup$ – Kuba Apr 25 '15 at 13:48
  • $\begingroup$ @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. $\endgroup$ – yode Apr 25 '15 at 14:01
  • $\begingroup$ and all my data is the surface of a cube. $\endgroup$ – yode Apr 26 '15 at 3:47
3
$\begingroup$
Graphics3D[{EdgeForm[{}], 
GraphicsComplex[front, 
MeshCells[DelaunayMesh[front], 2], VertexColors -> Hue /@ back]}]

MeshCoordinates[DelaunayMesh[front]] == front

(*True*)

enter image description here

$\endgroup$
  • $\begingroup$ MeshCoordinates[front][[1]] is equivalent to front. $\endgroup$ – LLlAMnYP Apr 27 '15 at 12:45
  • $\begingroup$ @LLlAMnYP Hi, thanks for pointing out that, that might be a typo here though the same to front, my first try is MeshCoordinates[DelaunayMesh[front]] $\endgroup$ – HyperGroups Apr 27 '15 at 13:14
  • $\begingroup$ Also with some fiddling it seems that VertexColors->Hue/@(Rescale@back)yield a more meaningful picture. $\endgroup$ – LLlAMnYP Apr 27 '15 at 13:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.