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
10 Oct 2024 04:47:16 EDT (-0400)
  Re: Can anyone show me the proper syntax for this...  
From: Warp
Date: 8 Nov 2002 09:59:20
Message: <3dcbd147@news.povray.org>
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.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

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