Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- t = ImageResize[ExampleData@#, {100, 100}] & /@
- ExampleData["ColorTexture"][[;; 6]];
- vtc = {{0, 0}, {1, 0}, {1, 1}, {0, 1}};
- coords = {{{0, 0, 0}, {0, 1, 0}, {1, 1, 0}, {1, 0, 0}}, {{0, 0,
- 0}, {1, 0, 0}, {1, 0, 1}, {0, 0, 1}}, {{1, 0, 0}, {1, 1, 0}, {1,
- 1, 1}, {1, 0, 1}}, {{1, 1, 0}, {0, 1, 0}, {0, 1, 1}, {1, 1,
- 1}}, {{0, 1, 0}, {0, 0, 0}, {0, 0, 1}, {0, 1, 1}}, {{1, 0,
- 1}, {1, 1, 1}, {0, 1, 1}, {0, 0, 1}}};
- Graphics3D[{Table[{Texture@t[[i]],
- Polygon[coords[[i]], VertexTextureCoordinates -> vtc]}, {i, 6}]}]
- cubemap = ImageResize[#, Scaled[0.5]] &@ Import@"http://i.stack.imgur.com/hSCfz.jpg";
- vtccm = {{##}, {# + 1, #2}, {# + 1, #2 + 1}, {#, #2 + 1}} & @@@ {{1,
- 1}, {0, 2}, {1, 2}, {2, 2}, {3, 2}, {1, 3}}/4;
- α = 0.;
- Graphics3D[{EdgeForm[], Texture[cubemap],
- Polygon[coords, VertexTextureCoordinates -> vtccm]},
- Lighting -> {{"Ambient", White}}, Boxed -> False, ViewAngle -> 1,
- ViewCenter -> {1, 1, 1}/2,
- ViewVector -> {1, 1, 1}/2 + {Cos[α], Sin[α], 0}/8,
- RotationAction -> "Clip", ImageSize -> 500,
- ViewVertical -> {0, 0, 1}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement