POV-Ray : Newsgroups : povray.beta-test : Confused about "waves" Server Time
31 Jul 2024 08:21:49 EDT (-0400)
  Confused about "waves" (Message 7 to 16 of 16)  
<<< Previous 6 Messages Goto Initial 10 Messages
From: Warp
Subject: Re: Confused about "waves"
Date: 14 Sep 2001 10:17:14
Message: <3ba2116a@news.povray.org>
Thorsten Froehlich <tho### [at] trfde> wrote:
:>  function 300,300
:>  {
:>   pigment

: Unrelated to your problem, I am wondering why you are using a pigment here.
: A pattern would be much easier to control...

  Also unrelated, but this made me remember one thing:

  Can image functions be declared? I remember trying it once but not
succeeding (IIRC it issued an error at the first number).

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Confused about "waves"
Date: 14 Sep 2001 11:14:04
Message: <3ba21ebc$1@news.povray.org>
In article <3ba2116a@news.povray.org> , Warp <war### [at] tagpovrayorg>  wrote:

>   Can image functions be declared? I remember trying it once but not
> succeeding (IIRC it issued an error at the first number).

You should be able to write a function and call it just the same way as you
call functions in isosurfaces:  function { foo(x,y,z) }

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Warp
Subject: Re: Confused about "waves"
Date: 14 Sep 2001 11:41:24
Message: <3ba22523@news.povray.org>
Thorsten Froehlich <tho### [at] trfde> wrote:
: You should be able to write a function and call it just the same way as you
: call functions in isosurfaces:  function { foo(x,y,z) }

  What I mean is that if I write something like this:

#declare MyImageFunction = function 256,256 { pattern { ... } }

I get an error at the first '256' (if I remember correctly; I can't confirm
this right now as I'm not at home).

  PS: It might be that it works and that I just typoed somewhere (eg. forgot
the comma or something), and if this is so, just ignore this... :)
  I'll get home soon and test it again.

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Confused about "waves"
Date: 14 Sep 2001 12:02:40
Message: <3ba22a20@news.povray.org>
In article <3ba22523@news.povray.org> , Warp <war### [at] tagpovrayorg>  wrote:

>
>   What I mean is that if I write something like this:
>
> #declare MyImageFunction = function 256,256 { pattern { ... } }
>
> I get an error at the first '256' (if I remember correctly; I can't confirm
> this right now as I'm not at home).
>
>   PS: It might be that it works and that I just typoed somewhere (eg. forgot
> the comma or something), and if this is so, just ignore this... :)
>   I'll get home soon and test it again.

Well, you write

 #declare MyImageFunction = function { pattern { ... } }
 height_field
 {
  ...
  function 256, 256 { MyImageFunction(x,y,z) }
 }

which is exactly what the syntax description in the docs says.

I don't see why one would declare an image and be surprised that is doesn't
work (as that is what your example tries to do) - it isn't possible at all
with any image map type and never has been...


    Thorsten


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Tony[B]
Subject: Re: Confused about "waves"
Date: 14 Sep 2001 12:56:04
Message: <3ba236a4@news.povray.org>
> Unrelated to your problem, I am wondering why you are using a pigment
here.
> A pattern would be much easier to control...

Something which I do not see in the docs is an explanation about how to
properly use 'pattern' in a 'function'. You don't say whether or not it will
be grayscale. Or maybe I just totally missed it.


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Confused about "waves"
Date: 14 Sep 2001 14:18:27
Message: <3ba249f3@news.povray.org>
In article <3ba236a4@news.povray.org> , "Tony[B]" <ben### [at] catholicorg> 
wrote:

> Something which I do not see in the docs is an explanation about how to
> properly use 'pattern' in a 'function'. You don't say whether or not it will
> be grayscale. Or maybe I just totally missed it.

Oh, good point.  The documentation kind of assumes you know that the pattern
functions are return a scalar, not a vector, and thus a pattern is
grayscale.  Maybe the docs should explain the difference between pigment and
pattern functions better, in particular for the image-map-function ... Ingo,
are you reading this?


    Thorsten


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: ingo
Subject: Re: Confused about "waves"
Date: 14 Sep 2001 14:34:27
Message: <Xns911CD14ACA15Aseed7@povray.org>
in news:3ba249f3@news.povray.org Thorsten Froehlich wrote:

> Ingo,
> are you reading this?
> 

Yes

Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Confused about "waves"
Date: 14 Sep 2001 14:52:04
Message: <3ba251d4@news.povray.org>
In article <Xns### [at] povrayorg> , ingo <ing### [at] homenl>  
wrote:

>> Ingo,
>> are you reading this?
>>
>
> Yes

Could you add a scentence or two in the function-image-type section that
explains that a pattern function will be easier to use for a function-image
compared to a pigment function which generates an unnecessary color
information that is useless when the function-image is used for a
height_field.

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Confused about "waves"
Date: 14 Sep 2001 14:52:13
Message: <3ba251dd$1@news.povray.org>
In article <Xns### [at] povrayorg> , ingo <ing### [at] homenl>  
wrote:

>> Ingo,
>> are you reading this?
>>
>
> Yes

Could you add a scentence or two in the function-image-type section that
explains that a pattern function will be easier to use for a function-image
compared to a pigment function which generates an unnecessary color
information that is useless when the function-image is used for a
height_field.

And maybe try to make it a bit more clear that a pattern function returns a
scalar and a pigment function returns a color vector (I am not sure how and
where to add this though).

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: ingo
Subject: Re: Confused about "waves"
Date: 14 Sep 2001 16:37:46
Message: <Xns911CE63267467seed7@povray.org>
in news:3ba251dd$1@news.povray.org Thorsten Froehlich wrote:

> And maybe try to make it a bit more clear that a pattern function
> returns a scalar and a pigment function returns a color vector (I
> am not sure how and where to add this though).
> 

I'll figure out something.

Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

<<< Previous 6 Messages Goto Initial 10 Messages

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