POV-Ray : Newsgroups : povray.newusers : pattern as function Server Time
31 Jul 2024 14:26:37 EDT (-0400)
  pattern as function (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: Dennis Miller
Subject: pattern as function
Date: 4 Nov 2002 08:49:38
Message: <3dc67af2$1@news.povray.org>
When you use a pattern as a function, as in:

function {f_marble{x,y,z}}

is there any way to control the turbulence or other properties of the
pattern? And why isn't the function "f_marble" (or f_otherpatterns) in the
documentation?

Thanks much,
Dennis


Post a reply to this message

From: Christoph Hormann
Subject: Re: pattern as function
Date: 4 Nov 2002 08:54:22
Message: <3DC67C0D.5028FBAA@gmx.de>
Dennis Miller wrote:
> 
> When you use a pattern as a function, as in:
> 
> function {f_marble{x,y,z}}
> 
> is there any way to control the turbulence or other properties of the
> pattern? And why isn't the function "f_marble" (or f_otherpatterns) in the
> documentation?

f_marble() etc. are defined in 'functions.inc', therefore you find the
documentation in section 7.7.  A pattern function can contain a complete
pattern definition including transformations, warps etc.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 02 Nov. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Dennis Miller
Subject: Re: pattern as function
Date: 4 Nov 2002 09:30:24
Message: <3dc68480$1@news.povray.org>
Thanks Chris, but looking in functions.inc, I don't see what the syntax
would be to specify say, the turbulence using an isosurface pattern
function. There is a comment in the file that says "some of these ...require
special parameters..." So does that mean that you can't specify all the
parameters of a pattern when using it as an isosurface? Or if you can, can
you give me an example? F_marble isn;t included in the 7.7 section and the
turbulence parameter isn't mentioned either.
Best,
D.

"Christoph Hormann" <chr### [at] gmxde> wrote in message
news:3DC67C0D.5028FBAA@gmx.de...
>
>
> Dennis Miller wrote:
> >
> > When you use a pattern as a function, as in:
> >
> > function {f_marble{x,y,z}}
> >
> > is there any way to control the turbulence or other properties of the
> > pattern? And why isn't the function "f_marble" (or f_otherpatterns) in
the
> > documentation?
>
> f_marble() etc. are defined in 'functions.inc', therefore you find the
> documentation in section 7.7.  A pattern function can contain a complete
> pattern definition including transformations, warps etc.
>
> Christoph
>
> --
> POV-Ray tutorials, include files, Sim-POV,
> HCR-Edit and more: http://www.tu-bs.de/~y0013390/
> Last updated 02 Nov. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Christoph Hormann
Subject: Re: pattern as function
Date: 4 Nov 2002 09:44:02
Message: <3DC687B2.16CE4C5@gmx.de>
Dennis Miller wrote:
> 
> Thanks Chris, but looking in functions.inc, I don't see what the syntax
> would be to specify say, the turbulence using an isosurface pattern
> function. There is a comment in the file that says "some of these ...require
> special parameters..." So does that mean that you can't specify all the
> parameters of a pattern when using it as an isosurface? Or if you can, can
> you give me an example? F_marble isn;t included in the 7.7 section and the
> turbulence parameter isn't mentioned either.

fumctions.inc, line 661:

#declare f_marble = function {pattern {marble}}

with turbulence warp:

#declare f_marble_turb = 
  function {
    pattern {
      marble
      warp { turbulence 0.5 }
    }
  }

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 02 Nov. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Dennis Miller
Subject: Re: pattern as function
Date: 4 Nov 2002 10:03:43
Message: <3dc68c4f$1@news.povray.org>
Now that's interesting as my line 661 is:

#declare f_marble = function {pattern {marble}}

(in context)
//the other fractal patterns are not implemented.
#declare f_mandel = function {pattern {mandel 25}}
#declare f_marble = function {pattern {marble}}
// object not implemented


I have the 3.5 final build installed; how come we have different .inc files?
Is yours dated 6/17/02?
Anyway, thanks for the syntax..
d.



"Christoph Hormann" <chr### [at] gmxde> wrote in message
news:3DC### [at] gmxde...
>
>
> Dennis Miller wrote:
> >
> > Thanks Chris, but looking in functions.inc, I don't see what the syntax
> > would be to specify say, the turbulence using an isosurface pattern
> > function. There is a comment in the file that says "some of these
...require
> > special parameters..." So does that mean that you can't specify all the
> > parameters of a pattern when using it as an isosurface? Or if you can,
can
> > you give me an example? F_marble isn;t included in the 7.7 section and
the
> > turbulence parameter isn't mentioned either.
>
> fumctions.inc, line 661:
>
> #declare f_marble = function {pattern {marble}}
>
> with turbulence warp:
>
> #declare f_marble_turb =
>   function {
>     pattern {
>       marble
>       warp { turbulence 0.5 }
>     }
>   }
>
> Christoph
>
> --
> POV-Ray tutorials, include files, Sim-POV,
> HCR-Edit and more: http://www.tu-bs.de/~y0013390/
> Last updated 02 Nov. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Tom Melly
Subject: Re: pattern as function
Date: 4 Nov 2002 11:19:45
Message: <3dc69e21$1@news.povray.org>
"Dennis Miller" <dhm### [at] attbicom> wrote in message
news:3dc68c4f$1@news.povray.org...
> Now that's interesting as my line 661 is:
>

<snip>

I *think* Chris means that you can intuit how to apply warps to patterns in
functions from examining the syntax used in functions.inc:

#declare f_marble = function {pattern {marble}}

and then just adding the warp statement to that (as found under the general
pattern modifiers 6.7.12).

IMHO it would be impracticle for functions.inc to carry all the possible
variants you might want in pattern functions.


Post a reply to this message

From: Dennis Miller
Subject: Re: pattern as function
Date: 4 Nov 2002 13:43:51
Message: <3dc6bfe7$1@news.povray.org>
I see it now. Thanks again. I'm still not clear how to alter the turbulence
parameter once it is declared in a scene, For example, how would I pop it
directly here:
#declare Sphere = function {f_marble_turb{x,y,z}}


but I understand how to change the entire declaration in the functions.inc
file so I can always just declare the whole f_marble_turb directly in the
scene and change the warp value there.

Thanks again,
D.


"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3dc69e21$1@news.povray.org...
> "Dennis Miller" <dhm### [at] attbicom> wrote in message
> news:3dc68c4f$1@news.povray.org...
> > Now that's interesting as my line 661 is:
> >
>
> <snip>
>
> I *think* Chris means that you can intuit how to apply warps to patterns
in
> functions from examining the syntax used in functions.inc:
>
> #declare f_marble = function {pattern {marble}}
>
> and then just adding the warp statement to that (as found under the
general
> pattern modifiers 6.7.12).
>
> IMHO it would be impracticle for functions.inc to carry all the possible
> variants you might want in pattern functions.
>
>


Post a reply to this message

From: Warp
Subject: Re: pattern as function
Date: 4 Nov 2002 15:09:01
Message: <3dc6d3dd@news.povray.org>
Dennis Miller <dhm### [at] attbicom> wrote:
> I see it now. Thanks again. I'm still not clear how to alter the turbulence
> parameter once it is declared in a scene, For example, how would I pop it
> directly here:
> #declare Sphere = function {f_marble_turb{x,y,z}}

  If you *really* want to do it, then there's a way. I don't know how
much overhead it adds, though:

function { pattern { function { f_marble(x,y,z) } turbulence 1 } }

(Untested, but should work.)

  I would say that creating it directly as:

function { pattern { marble turbulence 1 } }

is better.

-- 
#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

From: Dennis Miller
Subject: Re: pattern as function
Date: 4 Nov 2002 15:52:37
Message: <3dc6de15$1@news.povray.org>
That certainly looks cleaner. Thanks much for your help.
D.

"Warp" <war### [at] tagpovrayorg> wrote in message
news:3dc6d3dd@news.povray.org...
> Dennis Miller <dhm### [at] attbicom> wrote:
> > I see it now. Thanks again. I'm still not clear how to alter the
turbulence
> > parameter once it is declared in a scene, For example, how would I pop
it
> > directly here:
> > #declare Sphere = function {f_marble_turb{x,y,z}}
>
>   If you *really* want to do it, then there's a way. I don't know how
> much overhead it adds, though:
>
> function { pattern { function { f_marble(x,y,z) } turbulence 1 } }
>
> (Untested, but should work.)
>
>   I would say that creating it directly as:
>
> function { pattern { marble turbulence 1 } }
>
> is better.
>
> --
> #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

From: Thorsten Froehlich
Subject: Re: pattern as function
Date: 4 Nov 2002 19:14:26
Message: <3dc70d62@news.povray.org>
In article <3dc6de15$1@news.povray.org> , "Dennis Miller" 
<dhm### [at] attbicom> wrote:

> That certainly looks cleaner. Thanks much for your help.

You mean "function { pattern { marble turbulence 1 } }", right?  The other
solution is just plain clumsy.  No need to use f_marble at any cost.  Just
declaring a new pattern function is the way to go.  Not by modifying
functions.inc, of course, but by just declaring a new pattern function in
your scene.  Just using f_marble for the sake of using f_marble does not
make sense.

    Thorsten

____________________________________________________
Thorsten Froehlich
e-mail: mac### [at] povrayorg

I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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