POV-Ray : Newsgroups : povray.text.tutorials : Can anyone show me the proper syntax for this... : Re: Can anyone show me the proper syntax for this... Server Time
1 Mar 2024 15:01:47 EST (-0500)
  Re: Can anyone show me the proper syntax for this...  
From: normdoering
Date: 9 Nov 2002 04:20:06
Message: <web.3dccd2aecac9f97b5c65a5ba0@news.povray.org>
Warp wrote:
>normdoering <nor### [at] yahoocom> wrote:
>> #declare MyFunction = function{pattern {bumps scale 0.2}}
>>  // MyFunction above works...
>> #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
>  The macros take functions which return scalars. You are trying to give
>it a function which returns colors, so it won't work.
>  What you need to do is to make a temporary function which will convert
>the color returned by MyTest() to a scalar. For example:
>#declare MyTestHeight = function { MyTest(x,y,z).hf }
>  Then you can give 'MyTestHeight' as parameter to the macro.

And ".hf" isn't the only dot operator. The others are listed in the
isosurface area. A little re-writting and you could submit two functions to
HF_ macros, one that gives the height information and one for cutting off
unused areas of the square. Maybe the .red, .green and .blue operators
could be used for coding undercuts.


Post a reply to this message

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