MaxScript——Point3的三维噪音函数
例子程序:
b_width = 320 b_height = 320 size = 10. z = 0. phase = 0.5 frequency = 10. fract_interval = 0.5 lacunarity = 2 octaves = 5 whichfunc = 2 b = bitmap b_width b_height for h = 0 to (b_height-1) do ( h_norm = (h as float/(b_height-1))*size row = for w=0 to (b_width-1) collect ( w_norm = (w as float/(b_width-1)) *size noise_val = case whichfunc of ( 1: noise3 [w_norm,h_norm,z] 2: noise4 [w_norm,h_norm,z] phase 3: turbulence [w_norm,h_norm,z] frequency 4: fractalNoise [w_norm,h_norm,z] fract_interval lacunarity octaves ) noise_val = 0.5 * (1.+noise_val) white*noise_val ) setpixels b [0,h] row ) display b
运行效果:
文章来源: blog.csdn.net,作者:fengda2870,版权归原作者所有,如需转载,请联系作者。
原文链接:blog.csdn.net/fengda2870/article/details/5499363
- 点赞
- 收藏
- 关注作者
评论(0)