Some casual bibliophile, dataphile, sinophile, logophile, pluviophile, cartophile, mycophile, tea connoisseur, urban farmer, and amateur naturalist topics ...

RSS:
English blog:http://meng6.net/pages/blog/index.rss, feedburner, subscribe by email
Chinese bloghttp://meng6.net/pages/zh/blog/index.rss

Drawing polyhedra with textured faces in Mathematica

In Mathematica and Wolfram Language, with the feature called Texture it's easy to draw 3D solids such as polyhedra with image textures on the surface such as the faces of polyhedra. When playing with this, I drew a rhombic hexecontahedron (properties), the logo of Wolfram|Alpha with national flags on its faces:

[[!img Error: Can't use string ("everything") as an ARRAY ref while "strict refs" in use at /opt/pkg/lib/perl5/vendor_perl/5.40.0/IkiWiki/Plugin/img.pm line 39.]]

☝ Rhombic hexecontahedron wrapped with the 60 most populous countries' national flags, one different flag drawn on each of the 60 rhombic faces. (It's somewhat odd that the most populous countries happen to have a lot of red and green colors in their national flags.)

The code is in my Git repository.

Remarks:

  • It was a bit tricky to understand what the option VertexTextureCoordinates is and does, and how to set it up for what I'm trying to draw. It turns out for putting the national flags on the faces of a rhombic hexecontahedron, since both are (usually) isomorphic to a square, VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}} is would work as it aligns the four vertices of a rectangular flag to the four vertices of a rhombic face.

Something left to be improved:

  • Avoid flags that's not isomorphic to the face of the given polyhedron;

  • Compute the suitable values of VertexTextureCoordinates to reduce or even avoid distortion of the flags;

  • Find a reasonable way to align national flags of shapes not isomorphic to the shape of a face of a given polyhedron, such that the main feature of the national flag wrapped on a polyhedron face is well recognizable.

Older posts:

Hello world!
Posted
Information Metabolism of Society
Posted
Installing CheckStyle plugin for Eclipse
Posted
Log statistics for revision control systems
Posted
NHK 纪录片《圆的战争》
Posted
Steve Jobs Quotes
Posted
Taking online courses
Posted
Tweaking Mathematica command-line interface
Posted
backup mediawiki
Posted
graphlet
Posted
grep and backslash
Posted
installing and configuring java on mac
Posted
n-squared time complexity is really slow
Posted
note on setting up java projects using gradle
Posted
notes on running forms
Posted
principle of a single big jump
Posted
relearning p-value
Posted
removing newline characters
Posted
save kuvva wallpaper images automatically
Posted
switch emacs font theme
Posted
unicode review
Posted
wolfram-related twitter accounts
Posted
叠字
Posted
美国国债扫盲资料
Posted
钓鱼岛及其部分附属岛屿图
Posted
pi day.draft
Posted
compute sample variance of data stream
Posted
leveled-logging in bash
Posted
white space characters in wolfram language
Posted
wolfram-related twitter accounts and the alike
Posted
permission of .ssh files
Posted
blog comments powered by Disqus