![](/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) |
How about adding support for variables, conditionals (if) and loops (while)
to functions (used in isosurfaces, pigments...)?
This would enhance a lot the possibilities of the functions. It would allow,
for example, making a Mandelbrot pattern function.
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- 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 <3912a80f@news.povray.org>, Warp <war### [at] tag povray org>
wrote:
> How about adding support for variables, conditionals (if) and loops
> (while) to functions (used in isosurfaces, pigments...)?
> This would enhance a lot the possibilities of the functions. It would
> allow, for example, making a Mandelbrot pattern function.
There is already an if() "statement", it is a function. As I remember,
the syntax is like this: if(CONDITION, IF_VAL, ELSE_VAL)
Support for variables and other flow control would be very useful, but I
suspect it would require rewriting a large portion of the function code.
I don't understand much of it though, I could be wrong.
--
Christopher James Huff - Personal e-mail: chr### [at] yahoo com
TAG(Technical Assistance Group) e-mail: chr### [at] tag povray org
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: 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) |
Chris Huff wrote:
>
> In article <3912a80f@news.povray.org>, Warp <war### [at] tag povray org>
> wrote:
>
> > How about adding support for variables, conditionals (if) and loops
> > (while) to functions (used in isosurfaces, pigments...)?
> > This would enhance a lot the possibilities of the functions. It would
> > allow, for example, making a Mandelbrot pattern function.
>
> There is already an if() "statement", it is a function. As I remember,
> the syntax is like this: if(CONDITION, IF_VAL, ELSE_VAL)
> Support for variables and other flow control would be very useful, but I
> suspect it would require rewriting a large portion of the function code.
> I don't understand much of it though, I could be wrong.
Oh, well... You could probably do a Basic interpreter(not gwbasic...
QBasic would be good...)... It's got fast results, is turing complete,
not hard to learn, and isn't too hard to interpret, if you drop all
unneeded functions...
Or, you could also allow system calls... (function(system("/[whatever]",
x))
Both would work, but a basic interpreter is completely portable...
--
AKA paul_virak_khuong at yahoo.com, pkhuong at deja.com, pkhuong at
crosswinds.net and pkhuong at technologist.com(list not complete)...
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 <391333B4.E567C11F@videotron.ca>, pk <thi### [at] videotron ca>
wrote:
> Oh, well... You could probably do a Basic interpreter(not gwbasic...
> QBasic would be good...)... It's got fast results, is turing complete,
> not hard to learn, and isn't too hard to interpret, if you drop all
> unneeded functions...
I have never seen BASIC referred to as "fast" before...and I fail to see
the point in supporting a language like BASIC when an extension of the
existing syntax would be sufficient.
> Or, you could also allow system calls... (function(system("/[whatever]",
> x))
How would that be useful for this application? Or are you talking about
something similar to the current "DLL" functions?
--
Christopher James Huff - Personal e-mail: chr### [at] yahoo com
TAG(Technical Assistance Group) e-mail: chr### [at] tag povray org
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: 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) |
Chris Huff wrote:
>
> In article <391333B4.E567C11F@videotron.ca>, pk <thi### [at] videotron ca>
> wrote:
>
> > Oh, well... You could probably do a Basic interpreter(not gwbasic...
> > QBasic would be good...)... It's got fast results, is turing complete,
> > not hard to learn, and isn't too hard to interpret, if you drop all
> > unneeded functions...
>
> I have never seen BASIC referred to as "fast" before...and I fail to see
> the point in supporting a language like BASIC when an extension of the
> existing syntax would be sufficient.
Well, first basic isn't slower than anything else when it's not
compiled, i think... compiled, it can often be faster(see PowerBasic:
dos version comparable to C compilers, windows version usually faster
than MSVC(and BCPP, i think))
> > Or, you could also allow system calls... (function(system("/[whatever]",
> > x))
>
> How would that be useful for this application? Or are you talking about
> something similar to the current "DLL" functions?
Nope, i'm talking about using external apps(.exe in wintel)... instead
of supporting a full blown language for function, just allow the user to
use the (compiled) language s/he wants to use to do the maths!
Instead of having to support everything you want POV's function language
to support, POV could just allow you to call an application, and take
the return value for result!!
--
AKA paul_virak_khuong at yahoo.com, pkhuong at deja.com, pkhuong at
crosswinds.net and pkhuong at technologist.com(list not complete)...
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 <3913646F.CAC6BCA2@videotron.ca>, pk <thi### [at] videotron ca>
wrote:
> Well, first basic isn't slower than anything else when it's not
> compiled, i think... compiled, it can often be faster(see PowerBasic:
> dos version comparable to C compilers, windows version usually faster
> than MSVC(and BCPP, i think))
Still, why support another language when extending the current one would
work? Compiling it isn't feasible, a different compiler would have to be
made for each platform, and someone would have to write the interpreter.
And then people would have to learn another language to use it, instead
of just learning the differences between it and normal POV syntax.
And BASIC just isn't the best kind of language for this sort of
thing...I personally would choose a highly simplified C- or Java-like
syntax.
> Nope, i'm talking about using external apps(.exe in wintel)... instead
> of supporting a full blown language for function, just allow the user to
> use the (compiled) language s/he wants to use to do the maths!
> Instead of having to support everything you want POV's function language
> to support, POV could just allow you to call an application, and take
> the return value for result!!
Well, I don't think there is cross-platform way of doing this. And the
lack of control over what the external program could do could cause
problems. And how useful would it really be? I can't think of any cases
where it would really help...
Also, this sounds a lot like the #system patch...which won't be included
in the official version or MegaPOV for these reasons.
--
Christopher James Huff - Personal e-mail: chr### [at] yahoo com
TAG(Technical Assistance Group) e-mail: chr### [at] tag povray org
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: 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) |
Chris Huff wrote:
>
> In article <3913646F.CAC6BCA2@videotron.ca>, pk <thi### [at] videotron ca>
> wrote:
> > Nope, i'm talking about using external apps(.exe in wintel)... instead
> > of supporting a full blown language for function, just allow the user to
> > use the (compiled) language s/he wants to use to do the maths!
> > Instead of having to support everything you want POV's function language
> > to support, POV could just allow you to call an application, and take
> > the return value for result!!
>
> Well, I don't think there is cross-platform way of doing this. And the
> lack of control over what the external program could do could cause
> problems. And how useful would it really be? I can't think of any cases
> where it would really help...
> Also, this sounds a lot like the #system patch...which won't be included
> in the official version or MegaPOV for these reasons.
Yup, that's exactly it...
Have i ever said that it would be cross-platform??
Heck, give the code if you want to, but maybe that you just want to do a
one-time time!
Well, it'd as useful as your idea of adding things to the language, one
time or another(we, humans, always want more ;-)
And, you don't have control to what moray plugins do, or over what
pov-ray patch do!
Has this ever stopped people using them?
--
AKA paul_virak_khuong at yahoo.com, pkhuong at deja.com, pkhuong at
crosswinds.net and pkhuong at technologist.com(list not complete)...
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 <3912a80f@news.povray.org> , Warp <war### [at] tag povray org> wrote:
> How about adding support for variables, conditionals (if) and loops (while)
> to functions (used in isosurfaces, pigments...)?
> This would enhance a lot the possibilities of the functions. It would allow,
> for example, making a Mandelbrot pattern function.
This is will surely come in the future, maybe with POV-Ray 4.0 or so.
Thorsten
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) |
<information tidbit absorbed> :)
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) |
pk <thi### [at] videotron ca> wrote:
: Oh, well... You could probably do a Basic interpreter
Just to add support for loops and variables? I don't think it's necessary,
nor worth the efforts.
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- 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) |