POV-Ray : Newsgroups : povray.beta-test : Functions more than 65535 Server Time
10 Oct 2026 23:20:21 EDT (-0400)
  Functions more than 65535 (Message 1 to 34 of 34)  
From: R  Suzuki
Subject: Functions more than 65535
Date: 12 May 2002 11:00:09
Message: <3cde8379@news.povray.org>
I think the limit of functions per scene in POV3.5 is 65535.

I've tried to test the behavior when the number of functions is
more than 65535.  The below is the test code.
I expected an error message something like ""Maximum number of 
functions per scene reached." but the current RC crashes.

Win2000, 256M,  both Intel and VC++ compile

R. Suzuki

------------------------------------------------------
#version 3.5;
#include "functions.inc" 

#declare F1=65600;

camera { location  <0, 0, -6.5>  direction z }
light_source { <-0,10,-40>  color rgb 2}

#macro SPHERE11(P1,P2)
  sphere {0,1  
     texture{ pigment{ 
       function{(cos(f_th(x,0,z)*P1+f_r(x,0,z)*4)*f_r(x,0,z)+1.5)/2.5
                *f_r(x,0,z)}
       color_map{[0 rgb <0.5,0.25,0.1>] 
                 [.25 rgb <0.85,0.7,0.5>][.5 rgb 1][1 rgb 1]}}
       finish{ambient 0.35}
     }
     scale <1,0.12,1> *0.5
  }
#end

#declare R1 = seed(1);

#declare N1=0;

#while (N1<F1) 
   #declare P1=rand(R1);
   object{
     SPHERE11(5+int(rand(R1)*10), rand(R1)) 
     translate <rand(R1)*100-50, rand(R1)*100-50,rand(R1)*20> 
   }          
   #declare N1=N1+1;
   #if (mod(N1, 5000)=0)
     #debug  concat("N1:",str(N1,3,0),"\n")
   #end
#end


Post a reply to this message

From: Christoph Hormann
Subject: Re: Functions more than 65535
Date: 12 May 2002 11:40:09
Message: <3CDE8CD9.AC34C5E1@gmx.de>
"R. Suzuki" wrote:
> 
> I think the limit of functions per scene in POV3.5 is 65535.
> 
> I've tried to test the behavior when the number of functions is
> more than 65535.  The below is the test code.
> I expected an error message something like ""Maximum number of
> functions per scene reached." but the current RC crashes.
> 
> Win2000, 256M,  both Intel and VC++ compile

Confirmed for Linux RC4 (segmentation fault)

BTW, in the list of limits in docs section 6.1.6.2 am missing something
about the limit of nesting functions, i quite frequently get the error:
'Maximum function evaluation recursion level reached.'

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 05 May. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Functions more than 65535
Date: 12 May 2002 13:06:13
Message: <3cdea105@news.povray.org>
In article <3CDE8CD9.AC34C5E1@gmx.de> , Christoph Hormann 
<chr### [at] gmxde>  wrote:

> BTW, in the list of limits in docs section 6.1.6.2 am missing something
> about the limit of nesting functions, i quite frequently get the error:
> 'Maximum function evaluation recursion level reached.'

It is 128.

What the hell are you doing with such complex function? ;-)

    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: Functions more than 65535
Date: 12 May 2002 13:13:32
Message: <3cdea2bc@news.povray.org>
Thorsten Froehlich <tho### [at] trfde> wrote:
> It is 128.

> What the hell are you doing with such complex function? ;-)

  65535 functions and 128 recursion levels should be enough for anyone.
As well as 640 kilobytes of memory. ;)

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Functions more than 65535
Date: 12 May 2002 14:50:25
Message: <3cdeb971@news.povray.org>
In article <3cdea2bc@news.povray.org> , Warp <war### [at] tagpovrayorg>  wrote:

>> What the hell are you doing with such complex function? ;-)
>
>   65535 functions and 128 recursion levels should be enough for anyone.

Long, long ago the limit was a sufficient 256 operations per function... :-)

> As well as 640 kilobytes of memory. ;)

No, the VM won't be too happy with such a small amount of memory - with 2^16
functions and 2^16 instructions per function and the instructions usually
taking 4 bytes each you end up with 16 GB...

But who needs 64 bit address space? ;-)


    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: Christoph Hormann
Subject: Re: Functions more than 65535
Date: 12 May 2002 14:54:19
Message: <3CDEBA5B.A6AA7104@gmx.de>
Thorsten Froehlich wrote:
> 
> > BTW, in the list of limits in docs section 6.1.6.2 am missing something
> > about the limit of nesting functions, i quite frequently get the error:
> > 'Maximum function evaluation recursion level reached.'
> 
> It is 128.

Ingo: I would suggest something like the following in '6.1.6.2  Declaring
User-Defined Float Functions':

Limits: 

- The maximum recursion depth for nesting functions is 128. 

> 
> What the hell are you doing with such complex function? ;-)
> 

Oh come on, povers are commonly not known for their temperance...  

Constructions like the following are very useful, but regularly exceed
this limit.

#while (...)  

  ...
  
  #local fn_new1 = function { fn_1(x, y, z) + fn_foo(x, y, z)
}              
  #undef fn_1                    
  #local fn_1 = function { fn_new1(x, y, z) } 
  #undef fn_new1 

  ...

#end


Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 05 May. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: ingo
Subject: Re: Functions more than 65535
Date: 12 May 2002 15:04:41
Message: <Xns920CD6E78133Aseed7@povray.org>
in news:3CDEBA5B.A6AA7104@gmx.de Christoph Hormann wrote:

> Ingo: I would suggest something like the following in
> '6.1.6.2ÿÿDeclaring User-Defined Float Functions':
> 
> Limits: 
> 
> - The maximum recursion depth for nesting functions is 128. 
> 

Unless it changes the meaning completely, I think I'll leave out the word 
"recursion", to prevent the idea that recursive functions are possible.

Ingo


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Functions more than 65535
Date: 12 May 2002 15:06:01
Message: <3cdebd19@news.povray.org>
In article <3CDEBA5B.A6AA7104@gmx.de> , Christoph Hormann 
<chr### [at] gmxde>  wrote:

> Ingo: I would suggest something like the following in '6.1.6.2  Declaring
> User-Defined Float Functions':
>
> Limits:
>
> - The maximum recursion depth for nesting functions is 128.

In the docs this should be 1024 sand not 128.  Guess why! ;-)

BTW, the parameter limit is 56 and not 40 anymore.  This changed some time
ago. So the entry should be "The maximum number of allowed parameters per
function is 56"

    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: Thorsten Froehlich
Subject: Re: Functions more than 65535
Date: 12 May 2002 16:50:58
Message: <3cded5b2$1@news.povray.org>
In article <3CDEBA5B.A6AA7104@gmx.de> , Christoph Hormann 
<chr### [at] gmxde>  wrote:

> Constructions like the following are very useful, but regularly exceed
> this limit.
>
> #while (...)
>
>   ...
>
>   #local fn_new1 = function { fn_1(x, y, z) + fn_foo(x, y, z)
> }
>   #undef fn_1
>   #local fn_1 = function { fn_new1(x, y, z) }
>   #undef fn_new1
>
>   ...
>
> #end

So essentially what you want is a "sum" function?

    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: Christoph Hormann
Subject: Re: Functions more than 65535
Date: 12 May 2002 17:10:05
Message: <3CDEDA2C.8504C17C@gmx.de>
Thorsten Froehlich wrote:
> 
> [...]
> 
> So essentially what you want is a "sum" function?
> 

I'm not sure what you mean by 'sum' function, but of course this example
was very simple, usually there are a lot of '#if's etc. too.

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 05 May. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Functions more than 65535
Date: 12 May 2002 17:32:45
Message: <3cdedf7d$1@news.povray.org>
In article <3CDEDA2C.8504C17C@gmx.de> , Christoph Hormann 
<chr### [at] gmxde>  wrote:

> I'm not sure what you mean by 'sum' function

For example allowing functions equivalent to

10
---
\
 >  i*2+4
/
---
i=1

inside functions, would that help?

    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: Christoph Hormann
Subject: Re: Functions more than 65535
Date: 12 May 2002 17:58:24
Message: <3CDEE57F.29ECF6D5@gmx.de>
Thorsten Froehlich wrote:
> 
> In article <3CDEDA2C.8504C17C@gmx.de> , Christoph Hormann
> <chr### [at] gmxde>  wrote:
> 
> > I'm not sure what you mean by 'sum' function
> 
> For example allowing functions equivalent to
> 
> 10
> ---
> \
>  >  i*2+4
> /
> ---
> i=1
> 
> inside functions, would that help?
> 

That would be nice but it would not help much in this particular case and
is in fact not necessary since this can already be done using #while
inside functions.  In the example i gave i could have put a 'function {}'
around the while loop, leave out the #declare's and just sum up things
with the loop, this would avoid the recursion problem, but this does not
work if you build several functions in the while loop and don't want to
split into separate loops for speed reasons.

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 05 May. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Christoph Hormann
Subject: Re: Functions more than 65535
Date: 12 May 2002 18:00:58
Message: <3CDEE617.73DE8699@gmx.de>
ingo wrote:
> 
> [...]
> 
> Unless it changes the meaning completely, I think I'll leave out the word
> "recursion", to prevent the idea that recursive functions are possible.
> 

All right.

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 05 May. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Functions more than 65535
Date: 13 May 2002 02:19:37
Message: <3cdf5af9@news.povray.org>
In article <3CDEE57F.29ECF6D5@gmx.de> , Christoph Hormann 
<chr### [at] gmxde>  wrote:

> That would be nice but it would not help much in this particular case and
> is in fact not necessary since this can already be done using #while
> inside functions.

Keep in mind that the "1" and "10" could be expressions and it is also
faster...  ;-)

    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: Christoph Hormann
Subject: Re: Functions more than 65535
Date: 13 May 2002 02:38:54
Message: <3CDF5F7D.CA29C09C@gmx.de>
Thorsten Froehlich wrote:
> 
> [...]
> 
> Keep in mind that the "1" and "10" could be expressions and it is also
> faster...  ;-)

I would not mind if you implement this, it certainly has it's uses.  While
you are on it, how about custom vector functions, something like:

function { <x^2, sin(z), z> }

;-)

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 05 May. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Functions more than 65535
Date: 13 May 2002 07:15:41
Message: <3cdfa05d@news.povray.org>
In article <3CDF5F7D.CA29C09C@gmx.de> , Christoph Hormann 
<chr### [at] gmxde>  wrote:

> it certainly has it's uses.

I am sure some crazy person will figure out some even more crazy applications
for it.  Warp?  W這dzimierz?  ;-)

> I would not mind if you implement this,

Who knows, maybe it already exists somewhere on my and a few other harddisks.

> While you are on it, how about custom vector functions, something like:
>
> function { <x^2, sin(z), z> }
>
> ;-)

Users!  You give them one feature and they start crying for the next! ;-)

Unfortunately, vectors are more difficult to implement :-(

    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:
Subject: Re: Functions more than 65535
Date: 13 May 2002 07:24:09
Message: <6f8vdugobfjnf3s055aqfpftva33mgbutt@4ax.com>
On Mon, 13 May 2002 13:15:38 +0200, "Thorsten Froehlich" <tho### [at] trfde>
wrote:
> I am sure some crazy person will figure out some even more crazy applications
> for it.  Warp?  W?odzimierz?  ;-)

Question marks. That's what makes people crazy. ;-)

> Unfortunately, vectors are more difficult to implement :-(

Don't give up. :-)

ABX


Post a reply to this message

From: Warp
Subject: Re: Functions more than 65535
Date: 13 May 2002 09:14:30
Message: <3cdfbc36@news.povray.org>
Thorsten Froehlich <tho### [at] trfde> wrote:
> I am sure some crazy person will figure out some even more crazy applications
> for it.  Warp?  W這dzimierz?  ;-)

  It would be really useful if you could also specify the operation which
is performed.
  That is, as a sum it is something like:

result = 0;
for(n=initial_value; n<=final_value; ++n) result = result + expression(n);

  This would be much more useful if it were more generic, that is:

result = 0;
for(n=initial_value; n<=final_value; ++n) result = expression(result, n);

if you understand what I mean.
  You could implement a sum, a multiplication or whatever you want.

> Unfortunately, vectors are more difficult to implement :-(

  It would be nice if the parameters to a function could be vectors as well
as floats. This would be useful in some situations.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Christoph Hormann
Subject: Re: Functions more than 65535
Date: 13 May 2002 13:57:53
Message: <3CDFFEA1.EFD098F3@gmx.de>
Thorsten Froehlich wrote:
> 
> [...]
> 
> Users!  You give them one feature and they start crying for the next! ;-)

What did you expect? ;-)

> Unfortunately, vectors are more difficult to implement :-(
> 

There are already vector functions in form of spline functions, but i
suppose this is something different.

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 05 May. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From:
Subject: Re: Functions more than 65535
Date: 14 May 2002 01:41:46
Message: <nm81euck3idbv37nb7erl57ilgn3ig8lnt@4ax.com>
On Mon, 13 May 2002 13:15:38 +0200, "Thorsten Froehlich" <tho### [at] trfde>
wrote:
> Users!  You give them one feature and they start crying for the next! ;-)

Btw such conclusion, have you noticed my hidden request posted somewhere about
gate between functions and polynomial solver ? I told I would try to implement
it in the future but perhaps it already exists on some of your drives... :-)

ABX


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Functions more than 65535
Date: 14 May 2002 04:29:58
Message: <3ce0cb06@news.povray.org>
In article <nm81euck3idbv37nb7erl57ilgn3ig8lnt@4ax.com> , W„odzimierz ABX 
Skiba <abx### [at] babilonorg>  wrote:

> Btw such conclusion, have you noticed my hidden request posted somewhere about
> gate between functions and polynomial solver ? I told I would try to implement
> it in the future but perhaps it already exists on some of your drives... :-)

It would have to return multiple results in some cases, which is not really
possible right now...

Once there is a full programming language available in 4.0 I suppose many of
the interesting internal functions can be made available.

    Thorsten

____________________________________________________
Thorsten Froehlich
e-mail: mac### [at] povrayorg

I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From:
Subject: Re: Functions more than 65535
Date: 14 May 2002 04:37:42
Message: <7vi1eu8k1r551rrg53o48arjtonfnkv6r5@4ax.com>
On Tue, 14 May 2002 10:29:54 +0200, "Thorsten Froehlich" <tho### [at] trfde>
wrote:
> It would have to return multiple results in some cases, which is not really
> possible right now...

But knowing max order of polynomial I know max number of roots so can ask for
n-th root. Additional function could return number of roots to check if there
is any.

ABX


Post a reply to this message

From:
Subject: Re: Functions more than 65535
Date: 14 May 2002 04:47:58
Message: <bkj1eu4k0ei3hqo426i06t0jnm3gb3t7od@4ax.com>
On Tue, 14 May 2002 10:29:54 +0200, "Thorsten Froehlich" <tho### [at] trfde>
wrote:
> Once there is a full programming language available in 4.0 I suppose many of
> the interesting internal functions can be made available.

shader ? raytracer in function VM in SDL ?

ABX


Post a reply to this message

From: Michael Goldshteyn
Subject: Re: Functions more than 65535
Date: 14 May 2002 09:07:03
Message: <3ce10bf7@news.povray.org>
Why not just call out to Perl and be done. All these hacky quick developed
new languages are a real pain, when Perl already does just about everything
you can want from a proramming language. I think you guys should be spending
time on improving realism/adding features instead of a new programming
language.

Mike

"Thorsten Froehlich" <tho### [at] trfde> wrote in message
news:3ce0cb06@news.povray.org...
> Once there is a full programming language available in 4.0 I suppose many
of
> the interesting internal functions can be made available.


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Functions more than 65535
Date: 14 May 2002 11:14:30
Message: <3ce129d6@news.povray.org>
In article <3ce10bf7@news.povray.org> , "Michael Goldshteyn" <mik### [at] wwacom>
wrote:

> Why not just call out to Perl and be done.

I won't even try to explain what nonsense such a suggestion is.

    Thorsten


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Functions more than 65535
Date: 14 May 2002 13:57:58
Message: <3CE14F6A.541E31CD@hotmail.com>
"W這dzimierz ABX Skiba" wrote:
> 
> On Tue, 14 May 2002 10:29:54 +0200, "Thorsten Froehlich" <tho### [at] trfde>
> wrote:
> > It would have to return multiple results in some cases, which is not really
> > possible right now...
> 
> But knowing max order of polynomial I know max number of roots so can ask for
> n-th root. Additional function could return number of roots to check if there
> is any.

Funny that you should mention this now.

Since a few months after I started to use POV-Ray,
I have tried to make some macros that would do
matrix and polynomial calculations.

But the "Dangling pointer bug" made this work very
difficult.

But now that it is soon all gone, I have managed to
take these macros some further.

The code below shows how some of the polynomial
macros works as they are now.

If there is enough interest in these macros, then
maybe I'll take the time to make some documentation
or examples on how to use them.


Tor Olav



#declare RR = array[5] { -3, 4, 0, 5, 1/3 }
PrintRoots(RR, "x")
// ((x + 3)*(x - 4)*x*(x - 5)*(x - 0.333333))


// Assemble a polynomial from roots:

// ((x + 3)*(x - 4)*x*(x - 5)*(x - 0.333333))
#declare P0 = P_FromRoots(RR)
Print_P(P0, "x")
// (0 -20*x +62.333333*x^2 -5*x^3 -6.333333*x^4 +x^5)


// Find real roots of a polynomial:

// (0 -20*x +187/3*x^2 -5*x^3 -19/3*x^4 +x^5)
PrintRoots(R_RootsOf_P(array[6] { 0, -20, 187/3, -5, -19/3, 1 }), "x")
// (x*(x - 0.333333)*(x - 5)*(x - 4)*(x + 3))


// Multiply two polynomials:

// (x - 4)*(x - 1/3) 
#declare P1 = P_Mult(P_FromRoot(4), P_FromRoot(1/3))
Print_P(P1, "x")
// (1.333333 -4.333333*x +x^2)


// Divide one polynomial by another:

// (0 -20*x +187/3*x^2 -5*x^3 -19/3*x^4 +x^5)/(4/3 -13/3*x +x^2)
Print_P(P_Div(P0, P1), "x")
// (0 -15*x -2*x^2 + x^3)


// Differentiate a polynomial once:

// (2 -A +3*A^2 +A^3 +A^4)
#declare P2 = array[5] { 2, -1, 3, 1, 1 }
Print_P(P_Diff(P2, 1), "A")
// (-1 +6*A +3*A^2 +4*A^3)


// Integrate a polynomial twice:

// (-1 +6*A +3*A^2 +4*A^3)
#declare P3 = array[4] { -1, 6, 3, 4 }
Print_P(P_Int(P3, 2), "A")
// (0 -0.500000*A^2 +A^3 +0.250000*A^4 +0.200000*A^5)


// Assemble polynomial from a multiple root:

// (t - 2)*(t - 2)*(t - 2)*(t - 2)*(t - 2)
Print_P(P_FromRepeatedRoot(2, 5), "t")
// (-32 +80*t -80*t^2 +40*t^3 -10*t^4 +t^5)


// Make a Bernstein polynomial:

Print_P(P_Bernstein(1, 4), "y")
// ( 0 +4*y -12*y^2 +12*y^3 -4*y^4)


// Make a Fibonacci polynomial:

#declare PF = P_Fibonacci(7)
Print_P(PF, "u")
// (1 + 6*u^2 +5*u^4 +u^6)

#declare Fib7PolyFn = PolyFunction(PF)
#debug str(Fib7PolyFn(1), 0, 0)
// 13 // I.e. the 7th Fibonacci number


// And several other more or less useful polynomial macros
// together with a whole set of matrix calculation macros.


Post a reply to this message

From: Warp
Subject: Re: Functions more than 65535
Date: 14 May 2002 16:46:10
Message: <3ce17791@news.povray.org>
Using this as a math library would be really cool:
http://www.parigp-home.de/

  That library is just incredible.
  Besides supporting arbitrarily long integer, rational and floating point
numbers and almost any mathematical function and operation you could imagine,
it's amazingly fast.
  For example it calculated the factors of the number
1000000000000000000000000000000000000000000000000000000003
(2448952313317 * 113619994412549 * 3593891055967117960201170304091)
in less than 13 seconds in this computer (500MHz UltraSparc).

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Functions more than 65535
Date: 14 May 2002 16:56:40
Message: <3ce17a08@news.povray.org>
In article <3ce17791@news.povray.org> , Warp <war### [at] tagpovrayorg>  wrote:

>   Using this as a math library would be really cool:
> http://www.parigp-home.de/

Unfortunately it has the root of all evil attached to it (even worse it has
the 2.0 version attached) and it is not suitable for development of truly free
programs or any software that matters :-(

    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: Functions more than 65535
Date: 14 May 2002 17:29:18
Message: <3ce181ad@news.povray.org>
Thorsten Froehlich <tho### [at] trfde> wrote:
> Unfortunately it has the root of all evil attached to it (even worse it has
> the 2.0 version attached)

  What? Do you mean it's GPL?

> and it is not suitable for development of truly free
> programs or any software that matters :-(

  How so?

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Functions more than 65535
Date: 14 May 2002 17:37:32
Message: <3ce1839c@news.povray.org>
In article <3ce181ad@news.povray.org> , Warp <war### [at] tagpovrayorg>  wrote:

>> Unfortunately it has the root of all evil attached to it (even worse it has
>> the 2.0 version attached)
>
>   What? Do you mean it's GPL?

Yes, and it is the "real" GPL version 2.0, not LGPL :-(

>> and it is not suitable for development of truly free
>> programs or any software that matters :-(
>
>   How so?

All the nice new clauses in the 2.0 version of the GPL that allow the FSF (aka
RMS who forced these changed into version 2.0) to change the license as they
see fit against the original authors intent.  For all you know they could
decide to add a "may not be run on a non-GPL operating system" one day...

You know, RMS already decided to call Linux "GNU/Linux"...

    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: Functions more than 65535
Date: 14 May 2002 18:26:34
Message: <3ce18f1a@news.povray.org>
Thorsten Froehlich <tho### [at] trfde> wrote:
> All the nice new clauses in the 2.0 version of the GPL that allow the FSF (aka
> RMS who forced these changed into version 2.0) to change the license as they
> see fit against the original authors intent.  For all you know they could
> decide to add a "may not be run on a non-GPL operating system" one day...

  Hmm, the pari/gp-library says:

"PARI/GP is free software, covered by the GNU General Public License, and 
comes WITHOUT ANY WARRANTY WHATSOEVER."

  The GPL license on the other hand says:

"If the Program does not specify a version number of this License, you
may choose any version ever published by the Free Software Foundation."

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From:
Subject: Re: Functions more than 65535
Date: 15 May 2002 02:06:20
Message: <aju3eugahn1u89kknijs52f1eh2qvff24e@4ax.com>
On Tue, 14 May 2002 19:54:50 +0200, Tor Olav Kristensen
<tor### [at] hotmailcom> wrote:
> If there is enough interest in these macros, then
> maybe I'll take the time to make some documentation
> or examples on how to use them.

just rewrite it as functions, I need solver as function for iso_csg library

ABX


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Functions more than 65535
Date: 15 May 2002 04:07:40
Message: <3CE2167C.37235931@hotmail.com>
"W這dzimierz ABX Skiba" wrote:
> 
> On Tue, 14 May 2002 19:54:50 +0200, Tor Olav Kristensen
> <tor### [at] hotmailcom> wrote:
> > If there is enough interest in these macros, then
> > maybe I'll take the time to make some documentation
> > or examples on how to use them.
> 
> just rewrite it as functions, I need solver as function for iso_csg library

That would generate a somewhat ugly function !

And it would be limited too, because I think
that it is difficult to make functions that
are able to do polynomial divisions of arbitrary
degree polynomials as it goes along.

But maybe something can be done in the 3D case;

One function uses Newton/Raphson method to find a
root and then returns it. Three other functions
receives this root together with the coefficients
for the 3rd deg polynomial, which they use for
polynomial division and returns a single coefficient
each for the resulting 2dn deg polynomial. Then two
more functions receives these 3 coefficients and
calculates one root each of the 2nd deg polynomial.

#declare PolyFn = function(x) { a + b*x + c*x^2 + d*x^3 }
#declare DifferentiatedPolyFn = function(x) { b + 2*c*x + 3*d*x^2 }

// Uses PolyFn and DifferentiatedPolyFn
#declare Root1Fn = function(a, b, c, d) { ... }

// Uses Root1Fn
#declare D_2D_Fn = function(A, B, C, D, R) { ... }
#declare E_2D_Fn = function(A, B, C, D, R) { ... }
#declare F_2D_Fn = function(A, B, C, D, R) { ... }

// 2nd deg polynomial is now:
//  D_2D_Fn(a,b,c,d,Root1Fn(a,b,c,d))
// +E_2D_Fn(a,b,c,d,Root1Fn(a,b,c,d))*x
// +F_2D_Fn(a,b,c,d,Root1Fn(a,b,c,d))*x^2

// Uses D_2D_Fn, E_2D_Fn and F_2D_Fn
#declare Root2 = function(D, E, F) { ... }
#declare Root3 = function(D, E, F) { ... }


Tor Olav

Btw.: Congratulations !!!
I guess you'll have less time for POV-ing now ;)


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Functions more than 65535
Date: 15 May 2002 05:02:29
Message: <3ce22425@news.povray.org>
Tor Olav Kristensen wrote:
> "W這dzimierz ABX Skiba" wrote:
> <snip>
> Btw.: Congratulations !!!
> I guess you'll have less time for POV-ing now ;)

A good excuse for him to stay up all night.  So more time for POV-ing ;-)

Congratulations!

    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

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