POV-Ray : Newsgroups : povray.beta-test : [doc] language basics in quick ref Server Time
29 Jul 2024 18:24:51 EDT (-0400)
  [doc] language basics in quick ref (Message 1 to 7 of 7)  
From:
Subject: [doc] language basics in quick ref
Date: 12 Mar 2002 07:22:59
Message: <mspr8uggk6rr2ifipn9r6o8dfgkp7emqi6@4ax.com>
POV 3.5 b 12 for Win

10.1.3.1  Floats

  says that NUMERIC_EXPRESSION can be VECTOR.DOT_ITEM
  where DOT_ITEM is x|y|z|t|u|v|red|green|blue|filter|transmit|gray|hf
  while #warning str(<1,2,3,4,5>.hf,0,-1) works for all dot items except hf
  (I suppose .hf is valid only inside user defined functions)

10.1.3.4  User defined Functions

  min(FLOAT, FLOAT), max( FLOAT, FLOAT )
  should be probably something like
  min(FLOAT, FLOAT ...), max( FLOAT, FLOAT ...)

10.1.3.4  User defined Functions

  going follow syntax identifiers I can't find how to prepare function
  with object pattern

10.1.3.4  User defined Functions

  going follow syntax idnetifiers I can't find combination to allow
  function { pattern { brick turbulence 1 } } or
  function{ pattern{ agate warp{repeat x } } } (afaik both are valid)

ABX


Post a reply to this message

From: Robert Chaffe
Subject: Re: [doc] language basics in quick ref
Date: 12 Mar 2002 21:14:23
Message: <3c8eb5ff@news.povray.org>
NOTE:  My changes are to the Quick Reference found at my web site,
http://www.donovansweb.com/~chaffe/quickref.html .
I believe someone with the moniker "ingo" is in charge of modifying the
distributed documentation.  ;-)


news:mspr8uggk6rr2ifipn9r6o8dfgkp7emqi6@4ax.com...
> POV 3.5 b 12 for Win
>
> 10.1.3.1  Floats
>
>   says that NUMERIC_EXPRESSION can be VECTOR.DOT_ITEM
>   where DOT_ITEM is x|y|z|t|u|v|red|green|blue|filter|transmit|gray|hf
>   while #warning str(<1,2,3,4,5>.hf,0,-1) works for all dot items except
hf
>   (I suppose .hf is valid only inside user defined functions)

I have added one of my peach colored notes below the DOT_ITEM syntax:
    The  hf  item may be used only in a user-defined function.

> 10.1.3.4  User defined Functions
>
>   min(FLOAT, FLOAT), max( FLOAT, FLOAT )
>   should be probably something like
>   min(FLOAT, FLOAT ...), max( FLOAT, FLOAT ...)

Tsk, tsk.  Copy-Paste error.  In the FN_FLOAT_FUNCTION list I now have:
    max (FN_FLOAT,FN_FLOAT[,FN_FLOAT]...) | min
(FN_FLOAT,FN_FLOAT[,FN_FLOAT]...)

Note that I use FN_FLOAT to distinguish it from the other FLOAT that is not
quite the same as the one for user-defined functions.

> 10.1.3.4  User defined Functions
>
>   going follow syntax identifiers I can't find how to prepare function
>   with object pattern

Didn't know we could use it.  See modifications below.

> 10.1.3.4  User defined Functions
>
>   going follow syntax idnetifiers I can't find combination to allow
>   function { pattern { brick turbulence 1 } } or
>   function{ pattern{ agate warp{repeat x } } } (afaik both are valid)

Well, I didn't know that either.  I have changed the FLOAT_USER_FUNCTION
syntax, the pattern part, to the following:
    function { pattern { PATTERN [PATTERN_MODIFIERS] } }

I have also modified the PATTERN syntax to look like this:
    MAP_PATTERN  |  brick [BRICK_ITEMS]  |  checker  |  hexagon  |  object
{ LIST_OBJECT }

The same change was made to the appropriate BITMAP_IMAGE items.  That would
be in section 10.1.10.8 Pattern Modifiers in the docu.

Thanks for finding these.  Let me know if anything else needs to be
corrected.

Robert Chaffe
http://www.donovansweb.com/~chaffe/


Post a reply to this message

From: ingo
Subject: Re: [doc] language basics in quick ref
Date: 13 Mar 2002 01:03:13
Message: <Xns91D0481C9FEFAseed7@povray.org>
in news:3c8eb5ff@news.povray.org Robert Chaffe wrote:

> NOTE:  My changes are to the Quick Reference found at my web site,
> http://www.donovansweb.com/~chaffe/quickref.html .

I'll pick them up from your site,

Thanks Robert,

Ingo


Post a reply to this message

From:
Subject: Re: [doc] language basics in quick ref
Date: 13 Mar 2002 05:08:25
Message: <vf8u8uon70doq2f87t8d259nv1ppmi9ng7@4ax.com>
On Tue, 12 Mar 2002 20:15:21 -0600, "Robert Chaffe"
<rob### [at] earthlinknet> wrote:
> I believe someone with the moniker "ingo" is in charge of modifying the
> distributed documentation.  ;-)

I believe this to :-)

> > 10.1.3.1  Floats
> >
> >   says that NUMERIC_EXPRESSION can be VECTOR.DOT_ITEM
> >   where DOT_ITEM is x|y|z|t|u|v|red|green|blue|filter|transmit|gray|hf
> >   while #warning str(<1,2,3,4,5>.hf,0,-1) works for all dot items except hf
> >   (I suppose .hf is valid only inside user defined functions)
>
> I have added one of my peach colored notes below the DOT_ITEM syntax:
>    The  hf  item may be used only in a user-defined function.

This is not end of the problem. AFAIK .x .y .z and rest of operators cannot be
used on typical vector expression inside user defined function. So my
proposition is something like this:

in Float Expressions:

NUMERIC_EXPRESSION: (....) | VECTOR.DOT_ITEM | (....)

DOT_ITEM: x|y|z|t|u|v|red|green|blue|filter|transmit|gray (hf excluded)

in User-Defined Functions:

EXPRESSION: (....) | VECTOR_FUNCTION_INVOCATION.FN_DOT_ITEM |
COLOR_FUNCTION_INVOCATION.FN_DOT_ITEM | (...)

FN_DOT_ITEM: DOT_ITEM | hf

To the team - is this corect ?

> > 10.1.3.4  User defined Functions
> >
> >   min(FLOAT, FLOAT), max( FLOAT, FLOAT )
> >   should be probably something like
> >   min(FLOAT, FLOAT ...), max( FLOAT, FLOAT ...)
>
> Note that I use FN_FLOAT to distinguish it from the other FLOAT that is not
> quite the same as the one for user-defined functions.

Yes, I noticed this, just typing mistake :-)

> > 10.1.3.4  User defined Functions
> Didn't know we could use it.  See modifications below.
> Well, I didn't know that either.  I have changed the FLOAT_USER_FUNCTION
> syntax, the pattern part, to the following:
>    function { pattern { PATTERN [PATTERN_MODIFIERS] } }

That is probably becouse conventional syntax frame is rather ascetic in this
matter.

>Thanks for finding these.  Let me know if anything else needs to be
> corrected.

I plan to validate one subchapter of your quick ref per day. For example
"language directives" issues will be send after moment.

ABX


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: [doc] language basics in quick ref
Date: 13 Mar 2002 06:34:43
Message: <3c8f3953@news.povray.org>

Skiba <abx### [at] babilonorg>  wrote:

> This is not end of the problem. AFAIK .x .y .z and rest of operators cannot be
> used on typical vector expression inside user defined function. So my
> proposition is something like this:
>
> in Float Expressions:
>
> NUMERIC_EXPRESSION: (....) | VECTOR.DOT_ITEM | (....)
>
> DOT_ITEM: x|y|z|t|u|v|red|green|blue|filter|transmit|gray (hf excluded)
>
> in User-Defined Functions:
>
> EXPRESSION: (....) | VECTOR_FUNCTION_INVOCATION.FN_DOT_ITEM |
> COLOR_FUNCTION_INVOCATION.FN_DOT_ITEM | (...)
>
> FN_DOT_ITEM: DOT_ITEM | hf
>
> To the team - is this corect ?

I think so.

    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: Robert Chaffe
Subject: Re: [doc] language basics in quick ref
Date: 13 Mar 2002 21:30:23
Message: <3c900b3f@news.povray.org>

>
> > > 10.1.3.1  Floats
> > >
> > >   says that NUMERIC_EXPRESSION can be VECTOR.DOT_ITEM
> > >   where DOT_ITEM is x|y|z|t|u|v|red|green|blue|filter|transmit|gray|hf
> > >   while #warning str(<1,2,3,4,5>.hf,0,-1) works for all dot items except hf
> > >   (I suppose .hf is valid only inside user defined functions)
> >
> > I have added one of my peach colored notes below the DOT_ITEM syntax:
> >    The  hf  item may be used only in a user-defined function.
>
> This is not end of the problem. AFAIK .x .y .z and rest of operators cannot be
> used on typical vector expression inside user defined function. So my
> proposition is something like this:
>
> in Float Expressions:
>
> NUMERIC_EXPRESSION: (....) | VECTOR.DOT_ITEM | (....)
>
> DOT_ITEM: x|y|z|t|u|v|red|green|blue|filter|transmit|gray (hf excluded)
>
> in User-Defined Functions:
>
> EXPRESSION: (....) | VECTOR_FUNCTION_INVOCATION.FN_DOT_ITEM |
> COLOR_FUNCTION_INVOCATION.FN_DOT_ITEM | (...)
>
> FN_DOT_ITEM: DOT_ITEM | hf
>
> To the team - is this corect ?

I like that better anyway.  In the Float Expressions section I have removed the  hf 
from DOT_ITEM and removed my item note.
The EXPRESSION in the User-Defined Functions section has been modified as suggested
above, and the new FN_DOT_ITEM has been
added as well.

Robert Chaffe
http://www.donovansweb.com/~chaffe/


Post a reply to this message

From:
Subject: Re: [doc] language basics in quick ref
Date: 14 Mar 2002 06:25:47
Message: <aev09us85o1i12dpi64gepufahnam6rd5q@4ax.com>
On Wed, 13 Mar 2002 20:31:21 -0600, "Robert Chaffe"
<rob### [at] earthlinknet> wrote:
> I like that better anyway.  In the Float Expressions section I have removed the  hf 
from DOT_ITEM and removed my item note.
> The EXPRESSION in the User-Defined Functions section has been modified as suggested
above, and the new FN_DOT_ITEM has been
> added as well.

I have verified this with script and it seems correct as Thorsten said.

#include "functions.inc"

#macro f()
  V #if(params) (a,a,a) #end
#end

#macro F(V,params)
  #local Fx        = function(a){ f() .x        };
  #local Fy        = function(a){ f() .y        };
  #local Fz        = function(a){ f() .z        };
  #local Ft        = function(a){ f() .t        };
  #local Fu        = function(a){ f() .u        };
  #local Fv        = function(a){ f() .v        };
  #local Fred      = function(a){ f() .red      };
  #local Fgreen    = function(a){ f() .green    };
  #local Fblue     = function(a){ f() .blue     };
  #local Ffilter   = function(a){ f() .filter   };
  #local Ftransmit = function(a){ f() .transmit };
  #local Fhf       = function(a){ f() .hf       };
#end

F(1,no)                             // float     - all returns parse error
F(x,no)                             // vector    - all returns parse error
F(red 1,no)                         // color     - all returns parse error
F(function{f_agate(x,y,z)},yes)     // fn_float  - all returns parse error
F(function{transform{scale 1}},yes) // fn_vector - all work fine
F(function{pigment{agate}},yes)     // fn_color  - all work fine

ABX
--
disc{z,-z 5#macro O()asc(substr("-+((1*(,1,/.-,*/(,&.323/'1"e,1))*.1-4#declare
e=e-1;#end#local e=26;pigment{#local g=function(_){ceil(_)-_}function#local//X
k=function{pattern{object{sphere_sweep{linear_spline 13#while(e>0)<O(),O()//AB
>.01#end}}}}{k(g(atan2(x,y)),g(ln((y+x)^2+1e-5)),0)}}finish{ambient 1}}//POV35


Post a reply to this message

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