Hyper@2016-03-16

Class=Mathematica 空间四边形

空间四边形

sampleImage = image;
pointPositionFront = Insert[#, 2, 1] & /@ (Tuples[Range[-1, 1], {2}])

空间四边形_1.png

pointPositionAll = 

  Table[pointPositionFront.RotationMatrix[-90 i Degree, {0, 0, 

      1}], {i, 0, 3}];
number := RandomInteger[{1, 9}, {4}]
numbers = Table[number, {10}]

空间四边形_2.png

line = Table[pointPositionAll[[i]][[number[[i]]]], {i, 4}]

空间四边形_3.png

Table[Graphics3D[{Texture[sampleImage], 

   Polygon[lines[[i]], 

    VertexTextureCoordinates -> Normalize /@ line]}, 

  Boxed -> False], {i, 10}]

空间四边形_4.png

data = Table[{r, g, b}, {r, 0, 1, 1/20}, {g, 0, 1, 1/20}, {b, 0, 1, 

    1/20}];
data = sampleImage;
Graphics3D[{Texture[data], EdgeForm[], 

  Table[With[{pts = 

      RotateRight[#, k] & /@ {{1/2, 0, 0}, {1/2, 1, 0}, {1/2, 1, 

         1}, {1/2, 0, 1}}}, 

    Polygon[pts, VertexTextureCoordinates -> pts]], {k, 3}]}, 

 Lighting -> "Neutral"]

空间四边形_5.png