POV-Ray : Newsgroups : povray.advanced-users : height field generation : Re: height field generation Server Time
3 Jul 2024 05:42:35 EDT (-0400)
  Re: height field generation  
From: Christian Froeschlin
Date: 30 Sep 2008 09:02:14
Message: <48e22356$1@news.povray.org>
> 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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.