POV-Ray : Newsgroups : povray.documentation.inbuilt : Errors in light attenuation and height field documentation : Re: Errors in light attenuation and height field documentation Server Time
26 Jan 2022 13:19:17 EST (-0500)
  Re: Errors in light attenuation and height field documentation  
From: Kenneth
Date: 25 Mar 2013 13:00:00
Message: <web.5150824fe64ae1b6c2d977c20@news.povray.org>
James Holsenback <nom### [at] nonecom> wrote:
> On 03/24/2013 02:01 AM, Cousin Ricky wrote:

> >
> > In addition, the documentation does not explain height field functions.  I'm
> > having to figure out how it works by experimentation.
> >
> > The 3.6 documentation doesn't even describe the syntax of a height field
> > function.
>
> Maybe adding a link to http://wiki.povray.org/content/Reference:Function
> or one of it's sub-sections might do the trick ... maybe you have
> another section in mind.

The only reference I've ever seen in the docs to function use in heightfields is
in "Function Image" (which is section 3.5.11.16 in the v3.62 included
documentation.) Perhaps a link to that section would be helpful. It's kind of
bare-bones, though.

Most of my own knowledge of function HFs has come from sources on the 'net,
outside of POV-Ray. It would be nice to have it more thoroughly explained in the
docs, as it's such a powerful tool.

But there's a long-standing problem in HFs made from functions, that probably
needs a caveat of its own in the documentation: The resulting HF is
'flipped/mirrored' compared to the function; and the function itself is no
longer applied at the standard origin of <0,0,0> but at <0,0,1> (I don't
remember if isosurfaces have this problem or not.) Here are two examples, and
the various ways they can be corrected:

When using a *pre-declared* function...

height_field{
function{
my_function 100,100 (x,-y,z).gray // -Y corrects it
.....
}

When using a function that's constructed within the HF statement itself (like a
pigment or pattern function)...

height_field{
      function 100,100 {pattern{onion frequency 10 triangle_wave}}

      // both of these are needed to correct it...
      scale <1,1,-1> // yes, -Z
      translate 1*z
.....
   }


Post a reply to this message

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