|
![](/i/fill.gif) |
> I found the Perl::GD module convenient for generating a height field.
If you have a function to generate the height
field, you can also use it in SDL directly:
#declare npoints = 512;
#declare f = function {0.1+0.1*sin(x*20)};
#declare fmax = 0.2;
height_field
{
function npoints, npoints {f(x,0,y)/fmax}
}
Post a reply to this message
|
![](/i/fill.gif) |