POV-Ray : Newsgroups : povray.unofficial.patches : Superpatch built-in functions Server Time
2 Sep 2024 16:20:05 EDT (-0400)
  Superpatch built-in functions (Message 1 to 9 of 9)  
From: David Wilkinson
Subject: Superpatch built-in functions
Date: 15 Jul 1999 16:12:30
Message: <378e3c6d.6326610@news.povray.org>
I have been trying out SP and cannot get it to recognise any of the built-in
function names - Sphere, rounded_box, Torus, Superellipsoid, helix1, helix2.

Have I got the syntax wrong?

eg.

isosurface {  function { Sphere 1 }  pigment { Red}}

This seems to be correct according to the docs, but SP is looking for a float
factor after function and says Sphere is an undeclared identifier.
I have tried many other syntactical combinations without success.

David
------------
dav### [at] cwcomnet
http://www.hamiltonite.mcmail.com
------------


Post a reply to this message

From: Ron Parker
Subject: Re: Superpatch built-in functions
Date: 15 Jul 1999 16:21:25
Message: <378e42c5@news.povray.org>
On Thu, 15 Jul 1999 20:13:22 GMT, David Wilkinson wrote:
>I have been trying out SP and cannot get it to recognise any of the built-in
>function names - Sphere, rounded_box, Torus, Superellipsoid, helix1, helix2.
>
>Have I got the syntax wrong?
>
>eg.
>
>isosurface {  function { Sphere 1 }  pigment { Red}}
>
>This seems to be correct according to the docs, but SP is looking for a float
>factor after function and says Sphere is an undeclared identifier.
>I have tried many other syntactical combinations without success.

The quotes in the docs are significant:

isosurface {  function { "Sphere" 1 }  pigment { Red}}


Post a reply to this message

From: David Wilkinson
Subject: Re: Superpatch built-in functions
Date: 15 Jul 1999 18:35:26
Message: <37905d30.14714648@news.povray.org>
On 15 Jul 1999 16:21:25 -0400, par### [at] fwicom (Ron Parker) wrote:

>
>The quotes in the docs are significant:
>
>isosurface {  function { "Sphere" 1 }  pigment { Red}}

Thanks for the prompt response Ron, but this doesn't work either, the diagnostic
is "missing right brace in function".
I tried;
isosurface {  function  { "Sphere, 1" }  pigment { Red}}
which gave the diagnostic "cannot load function"

Incidently I can't find any reference to quotes in the docs.
David
------------
dav### [at] cwcomnet
http://www.hamiltonite.mcmail.com
------------


Post a reply to this message

From: Ron Parker
Subject: Re: Superpatch built-in functions
Date: 16 Jul 1999 09:05:49
Message: <378f2e2d@news.povray.org>
On Thu, 15 Jul 1999 22:36:18 GMT, David Wilkinson wrote:
>On 15 Jul 1999 16:21:25 -0400, par### [at] fwicom (Ron Parker) wrote:
>
>>
>>The quotes in the docs are significant:
>>
>>isosurface {  function { "Sphere" 1 }  pigment { Red}}
>
>Thanks for the prompt response Ron, but this doesn't work either, the diagnostic
>is "missing right brace in function".
>I tried;
>isosurface {  function  { "Sphere, 1" }  pigment { Red}}
>which gave the diagnostic "cannot load function"
>
>Incidently I can't find any reference to quotes in the docs.

Hm, you're right.  They must have somehow gotten lost in the 
translation.  Here's the syntax that works for me:

isosurface {  function { "Sphere" <1> }  pigment { color red 1}}


Post a reply to this message

From: David Wilkinson
Subject: Re: Superpatch built-in functions
Date: 16 Jul 1999 14:34:51
Message: <379057ef.580831@news.povray.org>
On 16 Jul 1999 09:05:49 -0400, par### [at] fwicom (Ron Parker) wrote:

>On Thu, 15 Jul 1999 22:36:18 GMT, David Wilkinson wrote:
>>On 15 Jul 1999 16:21:25 -0400, par### [at] fwicom (Ron Parker) wrote:
>>
>>>
>>>The quotes in the docs are significant:
>>>
>>>isosurface {  function { "Sphere" 1 }  pigment { Red}}
>>
>>Thanks for the prompt response Ron, but this doesn't work either, the diagnostic
>>is "missing right brace in function".
>>I tried;
>>isosurface {  function  { "Sphere, 1" }  pigment { Red}}
>>which gave the diagnostic "cannot load function"
>>
>>Incidently I can't find any reference to quotes in the docs.
>
>Hm, you're right.  They must have somehow gotten lost in the 
>translation.  Here's the syntax that works for me:
>
>isosurface {  function { "Sphere" <1> }  pigment { color red 1}}

Thanks Ron, thats it!  It's the angle brackets wot done it.  I've got too used
to the easy going syntax of POV-Ray :-)
David
------------
dav### [at] cwcomnet
http://www.hamiltonite.mcmail.com
------------


Post a reply to this message

From: Nieminen Mika
Subject: Re: Superpatch built-in functions
Date: 19 Jul 1999 05:42:22
Message: <3792f2fe@news.povray.org>
David Wilkinson <dav### [at] cwcomnet> wrote:
:>isosurface {  function { "Sphere" <1> }  pigment { color red 1}}

: Thanks Ron, thats it!  It's the angle brackets wot done it.  I've got too used
: to the easy going syntax of POV-Ray :-)

  Why there have to be angle brackets? It breaks the ideology of povray that
you can specify a vector with just a float value.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: J  Grimbert
Subject: Re: Superpatch built-in functions
Date: 19 Jul 1999 07:14:43
Message: <3793089B.F8DC100@atos-group.com>
Nieminen Mika wrote:
> 
> David Wilkinson <dav### [at] cwcomnet> wrote:
> :>isosurface {  function { "Sphere" <1> }  pigment { color red 1}}
> 
> : Thanks Ron, thats it!  It's the angle brackets wot done it.  I've got too used
> : to the easy going syntax of POV-Ray :-)
> 
>   Why there have to be angle brackets? It breaks the ideology of povray that
> you can specify a vector with just a float value.
> 
Which ideology ?
It rather breaks the lazyness...
A vector should within bracket... always. 
Of course, you're allowed things like "3*x" but then x is a shortcut for
<1,0,0>.

the only examples I'm not satisfied with the <vector> approach
is for "scale" and "rotate" where it is rather an array of float than a
true vector.
but they were there before the array, so that's an historical reason.
(and scale <0,0,0> is not so terrible, whereas rotate sometime gives me
headache).

Now, I do not understand a nut out of isosurface/function syntax.


Post a reply to this message

From: Bob Hughes
Subject: Re: Superpatch built-in functions
Date: 19 Jul 1999 08:39:16
Message: <37931C51.4C0E036C@aol.com>
"scale <0,0,0>" eh? Okay, I know you meant that as a example vector for
this discussion but still... :)
'rotate <0,0,0>' would not be the headache-causing item in that case.


"J. Grimbert" wrote:
> 
> A vector should within bracket... always.
> Of course, you're allowed things like "3*x" but then x is a shortcut for
> <1,0,0>.
> 
> the only examples I'm not satisfied with the <vector> approach
> is for "scale" and "rotate" where it is rather an array of float than a
> true vector.
> but they were there before the array, so that's an historical reason.
> (and scale <0,0,0> is not so terrible, whereas rotate sometime gives me
> headache).


Post a reply to this message

From: Ron Parker
Subject: Re: Superpatch built-in functions
Date: 19 Jul 1999 09:35:37
Message: <379329a9@news.povray.org>
On 19 Jul 1999 05:42:22 -0400, Nieminen Mika wrote:
>David Wilkinson <dav### [at] cwcomnet> wrote:
>:>isosurface {  function { "Sphere" <1> }  pigment { color red 1}}
>
>: Thanks Ron, thats it!  It's the angle brackets wot done it.  I've got too used
>: to the easy going syntax of POV-Ray :-)
>
>  Why there have to be angle brackets? It breaks the ideology of povray that
>you can specify a vector with just a float value.

Not my syntax, so I'm not 100% sure of why, but I suspect it's because that
argument isn't the same kind of vector we're used to.  For one thing, it's 
a vector of functions, not of floats.  For another, I don't think it's 
limited to five or fewer components.  So it doesn't get parsed by the 
same code that parses normal vector arguments.  I expect one could still 
make the angle-brackets optional, but that apparently just wasn't done.


Post a reply to this message

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