POV-Ray : Newsgroups : povray.unofficial.patches : Idea for functions Server Time
2 Sep 2024 10:16:26 EDT (-0400)
  Idea for functions (Message 11 to 17 of 17)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Ron Parker
Subject: Re: Idea for functions
Date: 8 May 2000 09:51:27
Message: <slrn8hdifc.9pe.ron.parker@linux.parkerr.fwi.com>
On Sat, 06 May 2000 11:11:24 -0500, Chris Huff 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.

IMHO, cross-platform is the least of your worries if you do this.  It'd be
horribly slow to spawn a new process for each evaluation of the function,
and those functions get evaluated many, many, many times for each ray that
hits the object.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
These are my opinions.  I do NOT speak for the POV-Team.


Post a reply to this message

From: pk
Subject: Re: Idea for functions
Date: 9 May 2000 18:59:39
Message: <39189867.694EAC7F@videotron.ca>
Well...
there's at least one working free soft basic interpreter(gwbasic,
though); it's called bywater basic, and it's in C...
SO, you don't need to write one
Warp wrote:
> 
> pk <thi### [at] videotronca> 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 -*/

--
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

From: Chris Huff
Subject: Re: Idea for functions
Date: 9 May 2000 22:55:19
Message: <chrishuff_99-A80DCC.21583909052000@news.povray.org>
In article <39189867.694EAC7F@videotron.ca>, pk <thi### [at] videotronca> 
wrote:

> Well...
> there's at least one working free soft basic interpreter(gwbasic,
> though); it's called bywater basic, and it's in C...
> SO, you don't need to write one

Actually, it would have to be rewritten. You can't just take code from 
something else and slap it into POV-Ray, even if the code is free, you 
have to make sure it is compatible with the POV license. And even if the 
code was given to the POV-Team, it would still have to be adapted to 
work within POV and a syntax developed for it.
And BASIC isn't the best design choice in my opinion...why add another 
completely different language into the POV syntax? It would mostly 
accomplish adding program bloat, slow the execution of those functions, 
and make it harder to learn. And you couldn't base any of it on current 
work, so it would be harder to write the actual code for it.

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/


Post a reply to this message

From: pk
Subject: Re: Idea for functions
Date: 10 May 2000 19:54:10
Message: <3919F6B0.CDCCAAE3@videotron.ca>
Yes, probably...
Chris Huff wrote:
> 
> In article <39189867.694EAC7F@videotron.ca>, pk <thi### [at] videotronca>
> wrote:
> 
> > Well...
> > there's at least one working free soft basic interpreter(gwbasic,
> > though); it's called bywater basic, and it's in C...
> > SO, you don't need to write one
> 
> Actually, it would have to be rewritten. You can't just take code from
> something else and slap it into POV-Ray, even if the code is free, you
> have to make sure it is compatible with the POV license. And even if the
> code was given to the POV-Team, it would still have to be adapted to
> work within POV and a syntax developed for it.
> And BASIC isn't the best design choice in my opinion...why add another
> completely different language into the POV syntax? It would mostly
> accomplish adding program bloat, slow the execution of those functions,
> and make it harder to learn. And you couldn't base any of it on current
> work, so it would be harder to write the actual code for it.
Yeah, i suppose so... but,the function language could become a complete
mess with time, as people add more and more functions to it, if you're
not careful :^)
--
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

From: pk
Subject: Re: Idea for functions
Date: 10 May 2000 19:55:53
Message: <3919F717.59DB2A0E@videotron.ca>
Yes, probably...
Chris Huff wrote:
> 
> In article <39189867.694EAC7F@videotron.ca>, pk <thi### [at] videotronca>
> wrote:
> 
> > Well...
> > there's at least one working free soft basic interpreter(gwbasic,
> > though); it's called bywater basic, and it's in C...
> > SO, you don't need to write one
> 
> Actually, it would have to be rewritten. You can't just take code from
> something else and slap it into POV-Ray, even if the code is free, you
> have to make sure it is compatible with the POV license. And even if the
> code was given to the POV-Team, it would still have to be adapted to
> work within POV and a syntax developed for it.
> And BASIC isn't the best design choice in my opinion...why add another
> completely different language into the POV syntax? It would mostly
> accomplish adding program bloat, slow the execution of those functions,
> and make it harder to learn. And you couldn't base any of it on current
> work, so it would be harder to write the actual code for it.
Yeah, i suppose so... but,the function language could become a complete
mess with time, as people add more and more functions to it, if you're
not careful :^)
--
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

From: Warp
Subject: Re: Idea for functions
Date: 11 May 2000 04:35:46
Message: <391a70e2@news.povray.org>
pk <thi### [at] videotronca> wrote:
: Yeah, i suppose so... but,the function language could become a complete
: mess with time, as people add more and more functions to it, if you're
: not careful :^)

  Variable definitions, conditionals and loops should be enough.

-- 
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

From: Chris Huff
Subject: Re: Idea for functions
Date: 11 May 2000 16:21:00
Message: <chrishuff_99-F21C2C.15242211052000@news.povray.org>
In article <3919F6B0.CDCCAAE3@videotron.ca>, pk <thi### [at] videotronca> 
wrote:

> Yeah, i suppose so... but,the function language could become a complete
> mess with time, as people add more and more functions to it, if you're
> not careful :^)

Adding functions won't make it a mess, they would all use the same 
syntax. And for the other "programming" features, only variables, 
if-else, and while are really necessary, although for, do-while, and 
switch-case would be useful. Embedding BASIC into the POV language would 
be much more of a mess, especially if other data types(vector, color) 
are supported and if variables declared outside the function are to be 
used.

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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