POV-Ray : Newsgroups : povray.unofficial.patches : Funniest error ever! Server Time
2 Sep 2024 16:15:22 EDT (-0400)
  Funniest error ever! (Message 1 to 10 of 10)  
From: TonyB
Subject: Funniest error ever!
Date: 4 Oct 1999 18:57:18
Message: <37f930ce@news.povray.org>
I was trying out the isosurface in the SuperPatch, when I added a torus to a
long series of formulas. What happened, to my surprise was something I never
expected. I got this error message:

error: Too long function - parser is bored

There must be some of Ken's AI resident within it... I knew it!

So people, can this be solved, or will I just have to live with shorter
functions? BTW, here's the one I used:

{(x^4 + z^4 + y^4 + 2*x^2*z^2 + 2*x^2*y^2 + 2*z^2*y^2 - 2*(r0^2+r1^2)*x^2 +
2*(r0^2-r1^2)*z^2 - 2*(r0^2+r1^2)*y^2 + (r0^2-r1^2)^2)
*
(sqrt(x^2+z^2)-.6)
*
(sqrt(y^2+z^2)-.6)
*
((x-x1)*(x-x2) & (z-z1)*(z-z2) & (y-y1)*(y-y2) + (sqrt(x^2+(y-3)^2+z^2)-1))
*
((x-i1)*(x-i2) & (z-k1)*(z-k2) & (y-j1)*(y-j2) + (sqrt((x-3)^2+y^2+z^2)-1))
*
((x-l1)*(x-l2) & (z-n1)*(z-n2) & (y-m1)*(y-m2) + (sqrt((x+3)^2+y^2+z^2)-1))
*
((x-u1)*(x-u2) & (z-w1)*(z-w2) & (y-v1)*(y-v2) + (sqrt(x^2+(y+3)^2+z^2)-1))}


Post a reply to this message

From: Ron Parker
Subject: Re: Funniest error ever!
Date: 4 Oct 1999 19:05:26
Message: <slrn7vhrjg.4pm.parkerr@linux.parkerr.fwi.com>
On Mon, 4 Oct 1999 17:50:59 -0400, TonyB <ben### [at] panamaphoenixnet> wrote:
>I was trying out the isosurface in the SuperPatch, when I added a torus to a
>long series of formulas. What happened, to my surprise was something I never
>expected. I got this error message:
>
>error: Too long function - parser is bored
>
>There must be some of Ken's AI resident within it... I knew it!
>
>So people, can this be solved, or will I just have to live with shorter
>functions? BTW, here's the one I used:

You might be able to break it up like this, though I haven't tested it.

#declare torus=function {(x^4 + z^4 + y^4 + 2*x^2*z^2 + 2*x^2*y^2 + 2*z^2*y^2 - 
2*(r0^2+r1^2)*x^2 + 2*(r0^2-r1^2)*z^2 - 2*(r0^2+r1^2)*y^2 + (r0^2-r1^2)^2)}

#declare box1=function{((x-x1)*(x-x2) & (z-z1)*(z-z2) & (y-y1)*(y-y2) + 
     (sqrt(x^2+(y-3)^2+z^2)-1))}

#declare box2=function{((x-i1)*(x-i2) & (z-k1)*(z-k2) & (y-j1)*(y-j2) + 
     (sqrt((x-3)^2+y^2+z^2)-1))}

#declare box3=function{((x-l1)*(x-l2) & (z-n1)*(z-n2) & (y-m1)*(y-m2) + 
     (sqrt((x+3)^2+y^2+z^2)-1))}

#declare box4=function{((x-u1)*(x-u2) & (z-w1)*(z-w2) & (y-v1)*(y-v2) + 
     (sqrt(x^2+(y+3)^2+z^2)-1))}

function {torus(x,y,z)*box1(x,y,z)*box2(x,y,z)*box3(x,y,z)*box4(x,y,z)*
     (sqrt(x^2+z^2)-.6) * (sqrt(y^2+z^2)-.6)}


Post a reply to this message

From: Ron Parker
Subject: Re: Funniest error ever!
Date: 4 Oct 1999 19:06:58
Message: <slrn7vhrmc.4pm.parkerr@linux.parkerr.fwi.com>
On 4 Oct 1999 19:05:26 -0400, Ron Parker <par### [at] fwicom> wrote:
>#declare torus=function 

Ron, you moron, you can't use the word torus.  It's reserved.


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Funniest error ever!
Date: 4 Oct 1999 21:36:29
Message: <37f9561d@news.povray.org>
In article <37f930ce@news.povray.org> , "TonyB" 
<ben### [at] panamaphoenixnet> wrote:

> error: Too long function - parser is bored

I was wondering when someone would find this limit. In isofunct.c change the
define of FUNCT_MAX_STACK_LEN 256 at the top to some larger value, but be
aware that it may never have been tested with a higher limit - 256
instructions on the function stack is not that much for a default.


    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: TonyB
Subject: Re: Funniest error ever!
Date: 4 Oct 1999 22:01:41
Message: <37f95c05@news.povray.org>
>I was wondering when someone would find this limit.

You mean you knew and didn't say anything?! :O

>In isofunct.c change the
>define of FUNCT_MAX_STACK_LEN 256 at the top to some larger value, but be
>aware that it may never have been tested with a higher limit -

It must have been set at that size for a reason. Perhaps to save memory?

>256 instructions on the function stack is not that much for a default.


You mean that they used a low number and that regular programmers would have
used a larger number to begin with? Bastards! >%O

Oh, well, thanks for the suggestion on recompiling, but I don't have
anything but DJGPP and I don't want to run POV in DOS. :|


PS: Please take all smileys/emoticons as     ;)


Post a reply to this message

From: TonyB
Subject: Re: Funniest error ever!
Date: 4 Oct 1999 22:06:35
Message: <37f95d2b@news.povray.org>
>You might be able to break it up like this, though I haven't tested it.


No, that doesn't work. I've tried it before. It refuses to render correctly.
It has to be expressed as one continous formula. Might be another bug. If
so, then I have 2 notches on my gun. =)

Thanks anyway for your help, Ron.


Post a reply to this message

From: Ron Parker
Subject: Re: Funniest error ever!
Date: 4 Oct 1999 22:10:56
Message: <slrn7vi6fc.4tf.parkerr@linux.parkerr.fwi.com>
On Mon, 4 Oct 1999 20:55:21 -0400, TonyB <ben### [at] panamaphoenixnet> wrote:
>>I was wondering when someone would find this limit.
>
>You mean you knew and didn't say anything?! :O

I knew about it too. :)


Post a reply to this message

From: Ron Parker
Subject: Re: Funniest error ever!
Date: 4 Oct 1999 22:11:45
Message: <slrn7vi6gu.4tf.parkerr@linux.parkerr.fwi.com>
On Mon, 4 Oct 1999 21:00:14 -0400, TonyB <ben### [at] panamaphoenixnet> wrote:
>>You might be able to break it up like this, though I haven't tested it.
>
>
>No, that doesn't work. I've tried it before. It refuses to render correctly.
>It has to be expressed as one continous formula. Might be another bug. If
>so, then I have 2 notches on my gun. =)

I've seen a bug with functions inside macros, but I haven't seen this one.
I'd be interested in any small examples you might have.


Post a reply to this message

From: SamuelT 
Subject: Re: Funniest error ever!
Date: 4 Oct 1999 22:14:18
Message: <37F96024.A5AA0C26@aol.com>
Lol! I forgot about that error message. I ran into it when I was experimenting
with making pigments out of functions. I know of no fix to the problem, however.

TonyB wrote:

> I was trying out the isosurface in the SuperPatch, when I added a torus to a
> long series of formulas. What happened, to my surprise was something I never
> expected. I got this error message:
>
> error: Too long function - parser is bored
>
> There must be some of Ken's AI resident within it... I knew it!
>
> So people, can this be solved, or will I just have to live with shorter
> functions? BTW, here's the one I used: <snip!>

Samuel Benge

E-Mail: STB### [at] aolcom
Website: http://members.aol.com/stbenge


Post a reply to this message

From: Ken
Subject: Re: Funniest error ever!
Date: 5 Oct 1999 02:53:28
Message: <37F9A063.5F20874A@pacbell.net>
TonyB wrote:
> 
> I was trying out the isosurface in the SuperPatch, when I added a torus to a
> long series of formulas. What happened, to my surprise was something I never
> expected. I got this error message:
> 
> error: Too long function - parser is bored
> 
> There must be some of Ken's AI resident within it... I knew it!

It looks pretty boring to me :)
 
> So people, can this be solved, or will I just have to live with shorter
> functions? BTW, here's the one I used:

Can you not pre-solve some of the equations yourself to reduce the size
of the string ? Calculators are pretty handy devices.

-- 
Ken Tyler
1100+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html


Post a reply to this message

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