POV-Ray : Newsgroups : povray.newusers : hf_square Server Time
31 Jul 2024 02:21:35 EDT (-0400)
  hf_square (Message 1 to 3 of 3)  
From: J Tellings
Subject: hf_square
Date: 6 Apr 2003 09:48:11
Message: <3E903019.9070001@chello.nl>
Hi,

I have a question about the hf_square macro. Can anyone give an example 
of the "function"-paramater? I don't know what sort of function I have 
to give.

Thanks a lot!

J T


Post a reply to this message

From: Hughes, B 
Subject: Re: hf_square
Date: 6 Apr 2003 13:59:57
Message: <3e906b1d@news.povray.org>
"J Tellings" <jte### [at] chellonl> wrote in message
news:3E9### [at] chellonl...
>
> I have a question about the hf_square macro. Can anyone give an example
> of the "function"-paramater? I don't know what sort of function I have
> to give.

Anything that can be a function elsewhere in POV-Ray, such as an equation
like (2+sin(x*3))*(1+cos(z*2))/5. Or a predeclared function, such as those
found in functions.inc.

object {
    HF_Square(
        function {f_noise3d(x,y,z)}, // example
        0,0,<100,100>,0,"",<-10,-1,-10>,<10,0,10>
    )
pigment {rgb<1,0,0>}
}


Bob H.


Post a reply to this message

From: Warp
Subject: Re: hf_square
Date: 6 Apr 2003 16:53:06
Message: <3e9093b1@news.povray.org>
J Tellings <jte### [at] chellonl> wrote:
> I have a question about the hf_square macro. Can anyone give an example 
> of the "function"-paramater? I don't know what sort of function I have 
> to give.

  Hughes answered the question, but I have the strong feeling that what
you are doing in your code is giving it a color function, although it
expects a float function.
  If you have a color function, you need to create a float function from
it, for example like this:

#declare MyFunctionGray = function { MyFunction(x,y,z).gray }

  Then you can give MyFunctionGray as parameter to the macro.

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

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