POV-Ray : Newsgroups : povray.advanced-users : Problem concerning the use of array indices inside functions : Re: Problem concerning the use of array indices inside functions Server Time
29 Jul 2024 06:20:08 EDT (-0400)
  Re: Problem concerning the use of array indices inside functions  
From: Thorsten Froehlich
Date: 5 May 2003 14:50:41
Message: <3eb6b281@news.povray.org>
In article <3eb6acc2$1@news.povray.org> , "Jaap Frank" <jjf### [at] xs4allnl> 
wrote:

> No offence Thorsten, but there are things that may be obviously for you or
> the other programmers, but were not for me. I couldn't know that during the
> render the array references are gone. If you think that the array references
> are still there, then it seems not too difficult to reach them during
rendering.
> I suppose that one of the reasons is, is to free up memory for other tasks.

Well, that is not the problem I had with your direction.  The problem is
that you first made an observation that something didn't work as you
expected.  So you asked.  You got several answers.  Without any obvious
reason you then jumped to conclusions about some low level details that
where not even mentioned or suggested to exist by anybody.  This in turn
resulted in a long discussion about, well, nothing.  This doesn't really
help in finding out what you really want or need, which would be essential
to help you.  So, after reading this long thread, I still don't know what
you want to do, but only what conclusions you jumped to that are either
absolutely random or you simply didn't think before writing.  I find that
rather annoying in an advanced users group ;-)

Anyway, enough of that and back to the point:

> 1. If a function(x,y,z) {} is used for a media inside a media_container,
>    are the x,y and z then relative to the container or absolute in the scene?
>    I have the impression that they are relative to the container that you
>    declare. Is that correct? I can't find any hint about this in the manual.

Of course.  It wouldn't make any sense otherwise because it would make
applying existing transformations to patterns impossible, wouldn't it?

> 2. If you 'undefine' a function or variable, is the memory then available
>    for new functions or variables. (This could be handy if you reach your
>    memory limit.) I suppose it is, but is it?

Of course.  Just like with any other thing you undefine.  Nevertheless, if
you use the function anywhere, it has to be kept in memory even if you
undefine it for obvious reasons.

> 3. If more people would like to have arrays inside functions, then I've
>    thought about the following function:

The problem with array is not about a syntax.  It it simply that arrays are
a parse-time structure nobody ever anticipated a need for to stay around
after parsing prior to 3.5.  So it is simply a feature request, not
something about finding a good syntax for accessing arrays or any other
problem.

>    I hope that this can be made with the function building system of
>    POV-ray. If so, I hope that someone is willing to implement this.
>    I can't do it myself.

It is not about willing to implement it.  It is about doing so being
pointless in POV-Ray 3.5 as it is too much work to be worthwhile.

    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.