如何制作点对点“螺栓”?使用柏林噪声或其他算法的闪电?

发布于 2024-09-16 04:05:43 字数 163 浏览 3 评论 0原文

我遇到的柏林噪声生成的每个实现都是用于生成 2D 地形等。我在任何地方都找不到点对点闪电生成的合适示例。

还有许多其他形式的产生“闪电”吗?有人告诉我这就是我想要的。对于分叉闪电或二维树(我可能可以将其颠倒过来用于闪电)存在哪些算法

我使用多种语言工作,因此伪代码中的示例也可以。

Every implementation I've come across of perlin noise generation has been for the generation of 2D terrain, etc. I cannot find a decent example of point to point lightning generation anywhere.

Are there many other forms of generating 'lightning'? I was told this is what I want. What algorithms exist for forked lightning, or 2D trees (I could turn this upside down for lightning maybe)

I work in multiple languages so examples in pseudo-code are OK also.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谈场末日恋爱 2024-09-23 04:05:43

我的理解是,柏林噪声的设计使其所有图案都接近一个“尺寸”,但闪电是一种分形,每个“尺寸”都有图案。
可能有一种方法可以使用不同尺度的多个 Perlin 噪声系统来制造闪电,但也许其他方法之一会效果更好:

中点位移法是一种非常快的算法
用于生成看起来很像闪电的形状。
唉,它只在两点之间生成一条(非常锯齿状)线,而不是分叉。
有一些源代码和图片
http://www.krazydad.com/bestiary/bestiary_lightning.html

概率 L-系统可用于生成看起来像闪电的形状。
我看到至少有人放弃了 Perlin 噪声并改用 L 系统来模拟闪电。
http://www.grepart.com/showcase/content/lightning_paper.pdf

随机 Lichtenberg 算法运行速度稍慢,
但它是更真实的闪电模型,并且会产生大量分叉。
http://fisica.ciencias.uchile.cl/alejo/fractal_antenna/node7。 html

这是“最佳闪电生成\模拟算法”的重复吗?一个>问题?

My understanding is that Perlin noise is designed so all of its patterns are close to one single "size", but lightning is a fractal with patterns at every "size".
There may be a way to use several Perlin noise systems at different scales to make lightning, but perhaps one of these other methods would work better:

The midpoint displacement method is a very fast algorithm
for generating shapes that look a lot like lightning.
Alas, it only generates a (very jagged) lines between two points, never forks.
There's some source code and pictures at
http://www.krazydad.com/bestiary/bestiary_lightning.html

Probabilistic L-systems can be used to generate shapes that look like lightning.
I see that at least one person abandoned Perlin noise and switched to L-systems in order to simulate lightning.
http://www.grepart.com/showcase/content/lightning_paper.pdf

The stochastic Lichtenberg algorithm runs somewhat slower,
but it is more physically realistic model of lightning and generates lots of forks.
http://fisica.ciencias.uchile.cl/alejo/fractal_antenna/node7.html

Is this a dup of the "Best lightning generation\simulation algorithm?" question?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文