TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Herringbone Wang Tiles

153 点作者 speednoise将近 11 年前

7 条评论

Adaptive将近 11 年前
For sci-fi readers that dig aperiodic tiling, Greg Egan wrote a great short story in his book &#x27;Diaspora&#x27; about computational wang tiles. <a href="http://www.amazon.com/Diaspora-Greg-Egan-ebook/dp/B00E83YOEI" rel="nofollow">http:&#x2F;&#x2F;www.amazon.com&#x2F;Diaspora-Greg-Egan-ebook&#x2F;dp&#x2F;B00E83YOEI</a> (the short story is titled Wang&#x27;s Carpets, available separately as well, but the whole book is worth buying or checking out from the library).<p>I hope this is considered on topic. I find fiction, particular that which inspires interest in math&#x2F;code to always be particularly relevant.
评论 #8002224 未加载
moyix将近 11 年前
Neat! I wrote a post [1] a while back on the isomorphism between Wang Tilings and Turing machines, which lends itself nicely to visualizations.<p>Wang tilings have been used in other areas of computer graphics as well [2], as well as for DNA computing [3].<p>[1] <a href="http://moyix.wordpress.com/2012/04/06/computing-with-tiles/" rel="nofollow">http:&#x2F;&#x2F;moyix.wordpress.com&#x2F;2012&#x2F;04&#x2F;06&#x2F;computing-with-tiles&#x2F;</a><p>[2] <a href="http://research.microsoft.com/en-us/um/people/cohen/WangFinal.pdf" rel="nofollow">http:&#x2F;&#x2F;research.microsoft.com&#x2F;en-us&#x2F;um&#x2F;people&#x2F;cohen&#x2F;WangFina...</a><p>[3] <a href="http://seemanlab4.chem.nyu.edu/XOR.html" rel="nofollow">http:&#x2F;&#x2F;seemanlab4.chem.nyu.edu&#x2F;XOR.html</a>
josephg将近 11 年前
I made a javascript implementation of one of the wang tile papers for exactly this sort of thing:<p><a href="https://github.com/josephg/wangjs" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;josephg&#x2F;wangjs</a><p>Unfortunately, when you render out a large square of them the results look very repetitive. Herringbone wang tiles work much better.
tgb将近 11 年前
&gt; It&#x27;s also possible to allow tile rotation or mirroring. However, this complicates the nature of the edge constraint; with 90-degree rotation, the edge constraints on horizontals must be the same as the edge constraints on verticals. If mirroring (or 180-degree rotation) is allowed, the edge constraints must be internally symmetric. The advantage is that if rotation or mirroring are allowed, the minimum number of tiles needed decreases. (I haven&#x27;t done the math to explore how far it goes down; somebody should.)<p>Unless I&#x27;m mistaken, counting the number of tiles needed for a complete set when allowing rotations and reflections comes down to the classic necklace counting problem [1]. In particular, we have exactly 4 &#x27;beads&#x27; (i.e. edges in this case) and n colors (conveniently called colors in both theories). (Well, wikipedia&#x27;s notation actually would call these &#x27;bracelets&#x27; unless you didn&#x27;t include mirroring.) Wolfram Alpha [2] gives an enumeration of these numbers for the first few, namely:<p>2 colors : 6 tiles, 6 w&#x2F; mirrors<p>3 colors: 24 tiles, 21 w&#x2F; mirrors<p>4 colors: 70 tiles, 55 w&#x2F; mirrors<p>5 colors: 165 tiles, 119 w&#x2F; mirrors<p>(Disclaimer: I might have messed up the &quot;with mirrors&quot; numbers.)<p>[1] <a href="http://en.wikipedia.org/wiki/Necklace_(combinatorics)" rel="nofollow">http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Necklace_(combinatorics)</a> [2] <a href="http://www.wolframalpha.com/input/?i=necklace+number" rel="nofollow">http:&#x2F;&#x2F;www.wolframalpha.com&#x2F;input&#x2F;?i=necklace+number</a>
Nickoladze将近 11 年前
This is one of those posts that makes me want to sit down and learn to make a game in my free time. Maybe I&#x27;ll get around to it some time.
taylorbuley将近 11 年前
I&#x27;m working on a canvas-based hexagonal grid system capable of implementing algos such as these. If you&#x27;re interested in developing the idea get in touch: username at gmail.
thisjepisje将近 11 年前
What would be some similar random-but-not-white noise algorithms? I only know of perlin noise and its variations.