POV-Ray : Newsgroups : povray.advanced-users : HF_ macro question. : Re: HF_ macro question. Server Time
29 Jul 2024 06:16:47 EDT (-0400)
  Re: HF_ macro question.  
From: Marc-Hendrik Bremer
Date: 8 Nov 2002 03:05:12
Message: <3dcb7038@news.povray.org>
"normdoering" <nor### [at] yahoocom> schrieb im Newsbeitrag
news:web.3dcb3c88902ebc51ccdab82b0@news.povray.org...
> //==============================
>
> #declare MyFunction = function{pattern {bumps scale 0.2}}
>  // MyFunction above works...
>

As a pattern, this function returns a float value.

> #declare MyTest = function
>  { pigment
>    { image_map
>      {png "testHF.png"
>       map_type 0 interpolate 2
>      }
>     }
>   } // <- this replacement produces an error.
>     // shapes.inc pops up and marks the bit of code named above
>

As a pigment, this function returns a vector. Pov can handle
vector-functions only in special cases, therefor you have to convert the
output to a float value.

Try:

#declare MyTest=function{MyTest(x,y,z).hf}

(it's difficult to find but the dot-operators are explained in the docs
somewhere)

Hth,

Marc-Hendrik


Post a reply to this message

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