![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> Naturally if some type of iterative loop is implemented, then recursion
> will not be needed.
And you can't tell if these loops will terminate, if it's turing complete ...
so one could lock up the render, without knowing it ....
probably one have to include something like a "maxiteration" for loops (if they were
available) .. so to cancel an infinite loop
after, maybe, 10000 times going over a specified "label" .... (just an idea) ...
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <3c939dc5$1@news.povray.org>, jan### [at] lzer net says...
> And you can't tell if these loops will terminate, if it's turing complete ...
> so one could lock up the render, without knowing it ....
Whats the problem? A sufficienty complicated object (preferrably with a
glas material and filled with scattering media...) can do practically the
same.
Lutz-Peter
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Yeah ... but it WILL terminate ...
and even if recursion-depth will be 2^32 .... it WILL terminate ...
you can't tell this for every function if the "machine" is turing-complete
... or better the other way around:
If a function terminates, then: fine...
but if it is running, there's no algorithmic way, to determine if this function will
ever terminate or not ...
Your only chance is to wait and see ...
of course, there are trivial ones, but for every function you find, that is possible
to tell, there are infinite other functions,
where you can't tell ...
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Jan Walzer <jan### [at] lzer net> wrote:
> And you can't tell if these loops will terminate, if it's turing complete ...
> so one could lock up the render, without knowing it ....
So can a #while. So what?
That's not the problem here.
--
#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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Warp" <war### [at] tag povray org> wrote:
> Jan Walzer <jan### [at] lzer net> wrote:
> > And you can't tell if these loops will terminate, if it's turing complete ...
> > so one could lock up the render, without knowing it ....
>
> So can a #while. So what?
> That's not the problem here.
but it happens at parse-stage ... there's no image rendered yet, and you can debug it
by using the debug-stream ...
functions can get evaluated at rendertime ...
you can't debug them by writing some intermediate-values to some stream ...
you see my prob ?
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <3c93b4d6$1@news.povray.org>, jan### [at] lzer net says...
> and even if recursion-depth will be 2^32 .... it WILL terminate ...
But that's only relevant in theory because you won't wait that long
anyway.
Lutz-Peter
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Jan Walzer <jan### [at] lzer net> wrote:
> but it happens at parse-stage ... there's no image rendered yet, and you can debug
it by using the debug-stream ...
You can do the same thing with functions.
> functions can get evaluated at rendertime ...
> you can't debug them by writing some intermediate-values to some stream ...
Yes, you can.
> you see my prob ?
No.
--
#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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <3c93bfd9$1@news.povray.org>, "Jan Walzer" <jan### [at] lzer net>
wrote:
> but it happens at parse-stage ... there's no image rendered yet, and you can
> debug it by using the debug-stream ...
>
> functions can get evaluated at rendertime ...
> you can't debug them by writing some intermediate-values to some stream ...
Why not? Just make an equivalent to #debug that operates at function
evaluation time, whether while parsing or rendering.
If you set an arbitrary limit, it will either be too low and get in
people's way (like the recursion limit for macros), or be too high and
not be useful. Why bother?
--
Christopher James Huff <chr### [at] mac com>
POV-Ray TAG e-mail: chr### [at] tag povray org
TAG web site: http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> What you want is simple: Support for defining variables inside
functions.
Hmm, I suppose you're right. Is that difficult? I'd think you'd only need
some sort of array attached to the function internally, holding all the
values and their respective variable names.
- Slime
[ http://www.slimeland.com/ ]
[ http://www.slimeland.com/images/ ]
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On Sat, 16 Mar 2002 20:49:23 -0600, Christopher James Huff
<chr### [at] mac com> wrote:
>If you set an arbitrary limit, it will either be too low and get in
>people's way (like the recursion limit for macros), or be too high and
>not be useful. Why bother?
Only if you make it built-in. If you can change it in the scene or in
the ini file, there will not be such a problem.
Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vip bg
TAG e-mail : pet### [at] tag povray org
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |