我如何制作柏林噪音? [英] How do I make perlin noise?

查看:112
本文介绍了我如何制作柏林噪音?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Codeproject,



我正在开发一款游戏,这个游戏是基于Minecraft的
,我遇到了问题

产生perlin噪音。基本上,我想要做的就是创造一个可以产生的perlin噪音

因为几个因素(也许是一个班级)



Hello Codeproject,

I am currently developing a game, this game is
based on Minecraft, I am having a problem with
generating perlin noise. Basically, what I want
to do is create a perlin noise that can be generated
by the few factors(Perhaps a class even)

public double X {get;set;}
public double Y{get;set;}

public double[,] Noise {get;set;}

public class PerlinNoise()
{
 Noise = new int[Map.Width, Map.Height];
}





基本上,这样一个简单的课程可以让我相当多的b $ ba很多,我需要X和Y来改变所以我有足够的支持

将它添加到我的游戏中。 X,Y也代表了应该生成噪音的地方

,就像Chunks一样。





有没有人有任何想法?



Basically, a simple class like this allows me to quite
a lot, I need the X and Y to change so I have the abillity
to add this to my game. The X,Y also represent the place
where the noise should be generated, just like Chunks really.


Does anyone have any ideas?

推荐答案

我假设这是你想要的:

http://devmag.org.za/2009/04/25/perlin-noise/ [ ^ ]



这只是一个快速搜索: - )
Im assuming that this is what you want:
http://devmag.org.za/2009/04/25/perlin-noise/[^]

It was just a quick search away :-)


你也可以在这里找到一些实现: http://en.wikipedia.org/wiki/Perlin_noise [ ^ ]。



即使Ken Perlin的原始代码也可以很容易地翻译成C#。



-SA
You can also find some implementations here: http://en.wikipedia.org/wiki/Perlin_noise[^].

Even the original code by Ken Perlin can be easily translated to C#.

—SA


这篇关于我如何制作柏林噪音?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆