POV-Ray : Newsgroups : povray.beta-test : Confused about "waves" Server Time
31 Jul 2024 02:24:47 EDT (-0400)
  Confused about "waves" (Message 1 to 10 of 16)  
Goto Latest 10 Messages Next 6 Messages >>>
From: Tony[B]
Subject: Confused about "waves"
Date: 13 Sep 2001 13:41:36
Message: <3ba0efd0@news.povray.org>
AMD Athlon-C 1.33GHz, 768MB of SDRAM, 133MHz bus, Win2K w/SP2, POV-Ray 3.5
Beta.1

I'm trying to make a heightfield, with waves emanating at the center.

height_field
{
 function 300,300
 {
  pigment
  {waves color_map {[0 rgb 0][1 rgb 1]} scale 0.05 translate <1,0,2*clock>/2
noise_generator 2}
  }
 }
 translate -<1,0,1>/2 scale <200,20,200>
 pigment {rgb 1}
}

I tried as you can see to place the ripples which appear at the back of the
heightfield in the center. I did two animations, one translating -2*clock
and another translating 2*clock. The result of both was identical. The
emanation point went further back. Am I missing something or is there a bug
here?


Post a reply to this message

From: Ken
Subject: Re: Confused about "waves"
Date: 14 Sep 2001 01:44:49
Message: <3BA19A4E.AE72845@pacbell.net>
"Tony[B]" wrote:

> Am I missing something or is there a bug here?

It doesn't make much sense to me either but I don't know enough
about functions to really say for sure.

-- 
Ken Tyler - POV-Ray Technical Assistance Group


Post a reply to this message

From: Mike Williams
Subject: Re: Confused about "waves"
Date: 14 Sep 2001 02:45:44
Message: <RouPXCAedao7EwVQ@econym.demon.co.uk>
Wasn't it Tony[B] who wrote:
>AMD Athlon-C 1.33GHz, 768MB of SDRAM, 133MHz bus, Win2K w/SP2, POV-Ray 3.5
>Beta.1
>
>I'm trying to make a heightfield, with waves emanating at the center.
>
>height_field
>{
> function 300,300
> {
>  pigment
>  {waves color_map {[0 rgb 0][1 rgb 1]} scale 0.05 translate <1,0,2*clock>/2
>noise_generator 2}
>  }
> }
> translate -<1,0,1>/2 scale <200,20,200>
> pigment {rgb 1}
>}
>
>I tried as you can see to place the ripples which appear at the back of the
>heightfield in the center. I did two animations, one translating -2*clock
>and another translating 2*clock. The result of both was identical. The
>emanation point went further back. Am I missing something or is there a bug
>here?


The thing that's strange is that a function's two dimensions are coded
as x and y, but the object is oriented in the x,z plane.

To move the waves forward in the z direction of the scene you have to
perform a translation in the y direction of the pigment.

I'm not sure what you're trying to do with the clock, but 
translate <1,1,0>/2 produces a static image with the ripples centred,
whereas you seem to be expecting translate <1,0,1>/2 to do that.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Dave Dunn
Subject: Re: Confused about "waves"
Date: 14 Sep 2001 08:19:35
Message: <3BA1F5F9.53C34A9C@aol.com>
Mike Williams wrote:

> The thing that's strange is that a function's two dimensions are coded
> as x and y, but the object is oriented in the x,z plane.

I guess this is just one of the prices for using functions absolutely everywhere
in the program. The x/y orientation works great for a pigment, but for a height
field,the need fr an additional transform is not intuitive. I had the same
problem using trace with a function-generated h/f. I had assumed it was a bug.
Thanks for the info.


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Confused about "waves"
Date: 14 Sep 2001 10:11:36
Message: <3ba21018$1@news.povray.org>
In article <3BA1F5F9.53C34A9C@aol.com> , Dave Dunn <poi### [at] aolcom>  
wrote:

>> The thing that's strange is that a function's two dimensions are coded as x
>> and y, but the object is oriented in the x,z plane.
>
> I guess this is just one of the prices for using functions absolutely
> everywhere in the program. The x/y orientation works great for a pigment

It also works great for functions that use u/v instead of x/y.  This allows
reusing of parametric functions.


    Thorsten


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Confused about "waves"
Date: 14 Sep 2001 10:12:38
Message: <3ba21056$1@news.povray.org>
In article <3ba0efd0@news.povray.org> , "Tony[B]" <ben### [at] catholicorg> 
wrote:

> height_field
> {
>  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...


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

Goto Latest 10 Messages Next 6 Messages >>>

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