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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Island Generator

271 点作者 exupero超过 8 年前

14 条评论

Lerc超过 8 年前
A somewhat obscure piece of trivia.<p>There&#x27;s code similar to this seen on a computer screen in digimon. <a href="http:&#x2F;&#x2F;i.imgur.com&#x2F;gh3dK.jpg" rel="nofollow">http:&#x2F;&#x2F;i.imgur.com&#x2F;gh3dK.jpg</a><p>A translation from the Basic dialect into Javascript <a href="http:&#x2F;&#x2F;fingswotidun.com&#x2F;code&#x2F;index.php&#x2F;Digimon" rel="nofollow">http:&#x2F;&#x2F;fingswotidun.com&#x2F;code&#x2F;index.php&#x2F;Digimon</a><p>Press the play button to get it trying a series of random seeds.
GuiA超过 8 年前
Great writeup!<p><i>Notice that range stops just shy of 2π. Floating point math sometimes produces a final angle indistinguishably close to 2π, adding one extra vertex to our n-gon. To see for yourself, change (- tau 0.000001) to tau and set the number of sides to 6. You’ll see an extra point in the output very close to the starting point.</i><p>This is a &quot;trick&quot; that you find everywhere in graphics programming, and I can&#x27;t believe we&#x27;ve been programming for over half a century and still have to deal with crap like that in our tooling. It leads to code that, while readable to the initiated programmer, is not what it <i>should be</i>.
评论 #12928329 未加载
评论 #12927742 未加载
评论 #12935349 未加载
cossatot超过 8 年前
This is cool, thanks for posting. I especially like how there are several styles of coastlines.<p>I&#x27;m really interested in algorithmic generation of topography, probably by first creating fractal stream networks (either from the coast&#x2F; low elevation boundary or from watersheds&#x2F;drainage divides). I&#x27;m a geologist so most game-oriented topography generators look super unrealistic to me, but making stream networks and working from there would be helpful with quantitative landscape analysis and simulations. Anyone heard of anything like this? If nothing else, then some way of filling in a polygon with branch-like fractals?
评论 #12927552 未加载
评论 #12927017 未加载
评论 #12928244 未加载
david-given超过 8 年前
See also the venerable xmountains (possibly already installed on your workstation).<p>Screenshot: <a href="https:&#x2F;&#x2F;osde8info.files.wordpress.com&#x2F;2007&#x2F;02&#x2F;6a00d4141b9517685e00d09e56ce08be2b.jpg" rel="nofollow">https:&#x2F;&#x2F;osde8info.files.wordpress.com&#x2F;2007&#x2F;02&#x2F;6a00d4141b9517...</a><p>There&#x27;s a writeup on how it works:<p><a href="http:&#x2F;&#x2F;www2.epcc.ed.ac.uk&#x2F;~spb&#x2F;xmountains&#x2F;about_xmountains.html" rel="nofollow">http:&#x2F;&#x2F;www2.epcc.ed.ac.uk&#x2F;~spb&#x2F;xmountains&#x2F;about_xmountains.h...</a><p>I don&#x27;t know how old it is, but the timestamp at the bottom of the HTML file above is 1997.
beeswax超过 8 年前
Nice. For those interested in the topic Amit Patel has a great article on polygonal map generation. Also discusses features like elevation, moisture, rivers etc:<p><a href="http:&#x2F;&#x2F;www-cs-students.stanford.edu&#x2F;~amitp&#x2F;game-programming&#x2F;polygon-map-generation&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www-cs-students.stanford.edu&#x2F;~amitp&#x2F;game-programming&#x2F;...</a>
jimktrains2超过 8 年前
Really cool! beyond the generation, I learned about <a href="https:&#x2F;&#x2F;github.com&#x2F;viebel&#x2F;klipse" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;viebel&#x2F;klipse</a> which looks pretty cool. The whole post also makes me want to look more into clojure.<p>Aside: Is it OK to not have a &lt;head&gt; element?
评论 #12931902 未加载
tzakrajs超过 8 年前
Crashes safari on iPad Air 2
评论 #12926874 未加载
评论 #12927029 未加载
pavel_lishin超过 8 年前
Neat! I got a very marshy one on my third generation: <a href="http:&#x2F;&#x2F;imgur.com&#x2F;doRJskF" rel="nofollow">http:&#x2F;&#x2F;imgur.com&#x2F;doRJskF</a>
pmyjavec超过 8 年前
Very cool! I&#x27;m a keen surfer, and the imagination runs wild seeing each newly generated island.
tunnuz超过 8 年前
It&#x27;s broken. I just used it, and it randomly generated Australia (<a href="https:&#x2F;&#x2F;www.dropbox.com&#x2F;s&#x2F;3aa5mr7gvbbmpc5&#x2F;australia.png?dl=0" rel="nofollow">https:&#x2F;&#x2F;www.dropbox.com&#x2F;s&#x2F;3aa5mr7gvbbmpc5&#x2F;australia.png?dl=0</a>).
tuned超过 8 年前
If you like this stuff, check <a href="https:&#x2F;&#x2F;github.com&#x2F;Mindwerks&#x2F;worldengine" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Mindwerks&#x2F;worldengine</a>
niix超过 8 年前
This really great, brings me back to my childhood - I used to love to draw islands.
charlesetc超过 8 年前
This is so awesome! I now am a lover of islands :D
callesgg超过 8 年前
Some islands look a bit unrealistic.<p>With swamp areas sticking out i the sea.<p>Waves would remove such things in a short timespan.
评论 #12928194 未加载