|
![](/i/fill.gif) |
On Mon, 4 Oct 1999 17:50:59 -0400, TonyB <ben### [at] panama phoenix net> 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
|
![](/i/fill.gif) |