In other languages, one can make a FeaturePlot3D-esque graphics where the inset images look realistically three dimensional. Meaning that they are smaller when farther away (and also hazier).

So how can we exactly recreate this clustering of mnist:

enter image description here

Is there a way to recreate this effect in Graphics3D or FeaturePlot3D? Even trying the naive example above actually makes the front-end hang:

FeatureSpacePlot3D[ResourceData["MNIST"][[All, 1]], Method -> "TSNE"]
  • 3
    $\begingroup$ You can get a better sense of geometrical perspective by adjusting the effective viewing distance, e.g., between Viewpoint -> {1,1,1} and {10,10,10}. Mathematica does not render lighting and shadows, so you'll never get the kind of realism of software designed for true computer graphics. $\endgroup$ – David G. Stork Aug 16 '18 at 18:31
  • $\begingroup$ Considering view point as a minor part, it looks like a duplicate: mathematica.stackexchange.com/q/55174/5478, do you agree? $\endgroup$ – Kuba Aug 20 '18 at 6:16
  • 1
    $\begingroup$ So you've found time to set a bounty but not to respond to my comment. Which is confusing because that would clarify what is a valid answer here. $\endgroup$ – Kuba Aug 30 '18 at 5:30
  • 1
    $\begingroup$ Is it about the performance? What is missing? $\endgroup$ – Johu Aug 30 '18 at 10:22
  • 1
    $\begingroup$ If you stack a Image3D instance with Graphics3D, it will emulate fog effect. It was asked before, I but forgot where. $\endgroup$ – kh40tika Sep 2 '18 at 11:35

The simple way is combination of some 3D objects by Show like following: 1. Lets make the 3D-shift functions defining the positions of objects in joint figure (+-0.25 in X-direction and 0.25 in Y-dir.):

shift = {#[[1]] + 0.25, #[[2]], #[[3]]} &;
shift2 = {#[[1]] - 0.25, #[[2]] + 0.25, #[[3]]} &;

Next, let's take the samples of 3D shapes from Wolfram:

sample1 = shift /@ ExampleData[{"Geometry3D", "StanfordBunny"},"VertexData"];
sample2 = shift2 /@ ExampleData[{"Geometry3D", "Cow"}, "VertexData"];

And draw them:

 ListSurfacePlot3D[sample1, MaxPlotPoints -> 50, PlotStyle -> Red],
 ListSurfacePlot3D[sample2, MaxPlotPoints -> 55]

enter image description here

Sorry, but cow looks ill :)

  • $\begingroup$ The cow looks less ill when you use the respective MeshRegions: Show[ MeshRegion[ Translate[ ExampleData[{"Geometry3D", "StanfordBunny"}, "MeshRegion"], {0.25, 0., 0.} ], MeshCellStyle -> {{2, All} -> Directive[FaceForm[ColorData[97][4]]]} ], MeshRegion[ Translate[ ExampleData[{"Geometry3D", "Cow"}, "MeshRegion"], {-0.25, 0.25, 0.} ], MeshCellStyle -> {{2, All} -> Directive[FaceForm[ColorData[97][1]]]} ] ]. But I doubt that this will answer OP's question. $\endgroup$ – Henrik Schumacher Aug 30 '18 at 6:05
  • $\begingroup$ Mathematica also has built in commands for coordinate transformations, like Translate. $\endgroup$ – Johu Aug 30 '18 at 10:23
  • $\begingroup$ @HenrikSchumacher, The perspective can be added directly clicking onto the plot. All rest looks like described in OP. $\endgroup$ – Rom38 Aug 30 '18 at 13:56
  • 2
    $\begingroup$ @Rom38 I guess, OP's question was more about the fog. That's funny because we all remember these 3D-games from the 90s where all this fog was necessary only because of poor hardware. ^^ $\endgroup$ – Henrik Schumacher Aug 30 '18 at 15:07

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.