unity3d 柏林噪声 PerlinNoise 规律 算法
测试 每个小数值取100次
print(0.1);
LaTest3(0.1f, 0.1f);
print("Max:" + La.Max() + "|Min:" + La.Min() + "|AVG:" + La.Average()+ "|Between:"+ (La.Max()-La.Min()));
print(0.3);
LaTest3(0.3f, 0.3f);
print("Max:" + La.Max() + "|Min:" + La.Min() + "|AVG:" + La.Average() + "|Between:" + (La.Max() - La.Min()));
print(0.5);
LaTest3(0.5f, 0.5f);
print("Max:" + La.Max() + "|Min:" + La.Min() + "|AVG:" + La.Average() + "|Between:" + (La.Max() - La.Min()));
print(0.7);
LaTest3(0.7f, 0.7f);
print("Max:" + La.Max() + "|Min:" + La.Min() + "|AVG:" + La.Average() + "|Between:" + (La.Max() - La.Min()));
print(0.9);
LaTest3(0.9f, 0.9f);
print("Max:" + La.Max() + "|Min:" + La.Min() + "|AVG:" + La.Average() + "|Between:" + (La.Max() - La.Min()));
print("X:" + 0.1 + "Y" + 0.3);
LaTest3(0.1f, 0.3f);
print("Max:" + La.Max() + "|Min:" + La.Min() + "|AVG:" + La.Average() + "|Between:" + (La.Max() - La.Min()));
print("X:"+0.1+"Y"+0.5);
LaTest3(0.1f, 0.5f);
print("Max:" + La.Max() + "|Min:" + La.Min() + "|AVG:" + La.Average() + "|Between:" + (La.Max() - La.Min()));
print("X:" + 0.1 + "Y" + 0.9);
LaTest3(0.1F, 0.9F);
print("Max:" + La.Max() + "|Min:" + La.Min() + "|AVG:" + La.Average() + "|Between:" + (La.Max() - La.Min()));
print("X:" + 0.3 + "Y" + 0.1);
LaTest3(0.3f, 0.1f);
print("Max:" + La.Max() + "|Min:" + La.Min() + "|AVG:" + La.Average() + "|Between:" + (La.Max() - La.Min()));
print("X:" + 0.5 + "Y" + 0.1);
LaTest3(0.5F, 0.1F);
print("Max:" + La.Max() + "|Min:" + La.Min() + "|AVG:" + La.Average() + "|Between:" + (La.Max() - La.Min())); ;
print("X:" + 0.9 + "Y" + 0.1);
LaTest3(0.9F, 0.1F);
print("Max:" + La.Max() + "|Min:" + La.Min() + "|AVG:" + La.Average() + "|Between:" + (La.Max() - La.Min()));
LaTest3函数
1 2 3 4 5 6 7 8 9 10 | List< float > La; float [] LaTest3( float x, float y) { La = new List< float >(); for ( int i = 0; i < 100; i++) { La.Add(Mathf.PerlinNoise(x+(i), y + (i))); } return La.ToArray(); } |
越接近0.5幅度越大,两边则越平缓
与整数无关,小数决定幅度。
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· .NET Core GC压缩(compact_phase)底层原理浅谈
· 现代计算机视觉入门之:什么是图片特征编码
· .NET 9 new features-C#13新的锁类型和语义
· Linux系统下SQL Server数据库镜像配置全流程详解
· 现代计算机视觉入门之:什么是视频
· 【译】我们最喜欢的2024年的 Visual Studio 新功能
· 个人数据保全计划:从印象笔记迁移到joplin
· Vue3.5常用特性整理
· 重拾 SSH:从基础到安全加固
· 为什么UNIX使用init进程启动其他进程?