I am a non-technical person in the imageProcessing side,so I don't have any idea how can I make polygon in the below shape...

enter image description here

the above polygon is a 3D Graphics ,if I click on any face of the polygon it will show some message. I am still working on it,but i didn't get which function is better out of this Cuboid and Polygon

can you give any suggestions on this?

  • 4
    $\begingroup$ You can't cut holes in a Cuboid[], so your best bet is using Polygons. It's not going to be easy, but it isn't all that difficult either — just some tedious geometry. You'll have to, of course, figure out the 3D points for the different faces and the roofs and then you can use Texture[] to tile the roof. However, I would strongly suggest against using Mathematica for this. It might be far simpler to create this in something like AutoCAD or even Google Sketchup Pro and then import it into Mathematica. $\endgroup$
    – rm -rf
    Oct 16, 2012 at 5:37
  • $\begingroup$ @rm-rf Thanks for your information.... $\endgroup$
    – subbu
    Oct 16, 2012 at 7:12
  • $\begingroup$ If this was created in 3DS Max - this suggests it might be - then suitable follow-up questions could include "How can I import 3DS files that retain surface textures?" or "How can I edit 3DS files in Mathematica?". $\endgroup$
    – cormullion
    Oct 17, 2012 at 8:25

1 Answer 1


This is a basic code to get textures and "click on any face to show message" features:


  {Texture[ExampleData[{"ColorTexture", "Metal4"}]],
    Polygon[{{-1, -1, 0}, {1, -1, 0}, {1, 1, 0}, {-1, 1, 0}}, 
     VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}}],
    Style["metallic floor", 18]]},

  {Texture[ExampleData[{"ColorTexture", "Roof"}]], EdgeForm[],
    Polygon[{{0, 0, 0}, {1, 0, 0}, {1, 1, 1}, {0, 1, 1}}, 
     VertexTextureCoordinates -> {{0, 0, 0}, {1, 0, 0}, {1, 1, 1}, {0,
         1, 1}}],
    Style["brick roof", 18]] }

  }, Lighting -> "Neutral"]

enter image description here

Now for sophisticated designs look at demonstrations:

enter image description here


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.