POV-Ray : Newsgroups : povray.general : Request for enhancement Server Time
8 Aug 2024 18:14:29 EDT (-0400)
  Request for enhancement (Message 5 to 14 of 14)  
<<< Previous 4 Messages Goto Initial 10 Messages
From: =Bob=
Subject: Re: Request for enhancement
Date: 3 Dec 2000 10:06:53
Message: <3a2a618d@news.povray.org>
Hi Christoph,

I just tried it and it works just like you said, that's
great! Do you know if this feature will be incorporated
into the next official release of PovRay?

Thanks again, have a great day!
=Bob=

"Christoph Hormann" <chr### [at] gmxde> wrote in message
news:3A2A0385.3E05A9FD@gmx.de...

[My previous post deleted]

: Chris Huff's Megapov Plus has a new #set directive that does exactly this
: (it produces an error if used with a not declared identifier)
:
: Christoph
:
: --
: Christoph Hormann <chr### [at] gmxde>
: IsoWood include, radiosity tutorial, TransSkin and other
: things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Christoph Hormann
Subject: Re: Request for enhancement
Date: 3 Dec 2000 11:22:16
Message: <3A2A7337.FDA1E19E@gmx.de>
=Bob= wrote:
> 
> Hi Christoph,
> 
> I just tried it and it works just like you said, that's
> great! Do you know if this feature will be incorporated
> into the next official release of PovRay?
> 
> Thanks again, have a great day!
> =Bob=
> 

I don't think so, it was developed quite lately (just like the displace
warp :-) and therefore won't make it to the official version AFAIK.

BTW the current list with new features in 3.5 is in povray.announce.f-a-q.
Subject: POV-Team Status Report - September 1, 2000

Christoph      

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Chris Huff
Subject: Re: Request for enhancement
Date: 4 Dec 2000 05:42:22
Message: <chrishuff-B26367.05430504122000@news.povray.org>
In article <3a29b642@news.povray.org>, "Chris Colefax" 
<chr### [at] tagpovrayorg> wrote:

> Why patch POV when you can do it with macros?:

Because you can't do this with macros? :-)
The #set directive works with both #declare and #local, and will be 
faster than calling a macro, not to mention looking better in the scene 
code...

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Chris Huff
Subject: Re: Request for enhancement
Date: 4 Dec 2000 05:46:36
Message: <chrishuff-DF6AD7.05471904122000@news.povray.org>
In article <3a2a618d@news.povray.org>, "=Bob=" <Bob### [at] threestrandscom> 
wrote:

> Do you know if this feature will be incorporated
> into the next official release of PovRay?

It won't be, it is too new. As Christoph Hormann mentioned, the feature 
list for 3.5 is in povray.announce.frequently-asked-questions.
It might make it into the next MegaPOV, whenever that comes out.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: =Bob=
Subject: Re: Request for enhancement
Date: 4 Dec 2000 09:03:14
Message: <3a2ba422@news.povray.org>
Thanks, Chris.

I checked out the list too. That's a feature that would
be rather nice to have. My only concern is making
something that can be used in all of the popular
versions. I guess that's not too easy.

Have a great day!
=Bob=

"Chris Huff" <chr### [at] maccom> wrote in message
news:chrishuff-DF6AD7.05471904122000@news.povray.org...
: In article <3a2a618d@news.povray.org>, "=Bob=" <Bob### [at] threestrandscom>
: wrote:
:
: > Do you know if this feature will be incorporated
: > into the next official release of PovRay?
:
: It won't be, it is too new. As Christoph Hormann mentioned, the feature
: list for 3.5 is in povray.announce.frequently-asked-questions.
: It might make it into the next MegaPOV, whenever that comes out.
:
: --
: Christopher James Huff
: Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
: TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
:
: <><


Post a reply to this message

From: Ken
Subject: Re: Request for enhancement
Date: 4 Dec 2000 09:11:42
Message: <3A2BA6E1.8E54FEF4@pacbell.net>
Chris Huff wrote:
> 
> In article <3a29b642@news.povray.org>, "Chris Colefax"
> <chr### [at] tagpovrayorg> wrote:
> 
> > Why patch POV when you can do it with macros?:
> 
> Because you can't do this with macros? :-)

Careful ! Everytime I think something is impossible to do with
POV-Ray Mr. Colefax or Mr. Parker comes along and show just how
possible it really is :)

-- 
Ken Tyler - 1400+ POV-Ray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Chris Huff
Subject: Re: Request for enhancement
Date: 4 Dec 2000 16:15:51
Message: <chrishuff-163A13.16163404122000@news.povray.org>
In article <3A2BA6E1.8E54FEF4@pacbell.net>, lin### [at] povrayorg 
wrote:

> Careful ! Everytime I think something is impossible to do with
> POV-Ray Mr. Colefax or Mr. Parker comes along and show just how
> possible it really is :)

Well, this *is* impossible without modifying the source, because there 
is no way to declare a #local variable for use in a macro calling a 
macro...

This macro:

#macro assignLocal(Var, Value) #local Var = Value; #end

will not do the job correctly, it will just define a variable that is 
local to the assignLocal macro.
Actually, #declare, as used in the original macro, *might* work, if 
there is a specific side-effect of the way POV handles modifying of 
parameters...if "#declare ParamName" doesn't do what "#declare VarName" 
does. I don't know if this side-effect exists, or even if it would be a 
bug or feature...something to try and see.

BTW, another problem with that assign() macro: it uses a semicolon, 
which will prevent you from using objects, textures, etc...you could 
remove that semicolon:
#macro assign(Var, Value) #declare Var = Value #end
but this will produce a warning whenever you use it with a vector, 
color, or float, which can slow parsing down and may not work at all in 
future versions(semicolons really should be used, or at least allowed, 
for all variable declarations!).

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Chris Colefax
Subject: Re: Request for enhancement
Date: 4 Dec 2000 18:35:37
Message: <3a2c2a49@news.povray.org>
Chris Huff <chr### [at] maccom> wrote:
> Because you can't do this with macros? :-)
> The #set directive works with both #declare and #local, and will be
> faster than calling a macro, not to mention looking better in the scene
> code...

#macro Macro()
   #local X = 6;
   #debug concat("X = ", str(X, 0, -1), "\n")

   assign (X, 5);
   #debug concat("X = ", str(X, 0, -1), "\n")
#end

#macro assign (Var, Value) #declare Var = Value #end

#declare X = 1;
#debug concat("X = ", str(X, 0, -1), "\n")

assign (X, 3);
#debug concat("X = ", str(X, 0, -1), "\n")

Macro()

#debug concat("X = ", str(X, 0, -1), "\n")

As expected, this returns X-values of 1 (declared), 3 (assigned), 6
(localed), 5 (assigned to local), and 3 again (globally assigned).  This
seems to work pretty well to me!  And it works fine with objects and other
variable types, and looks quite neat.  Speed shouldn't be a major issue, as
Bob seemed to want the function mostly as a debugging tool.  For final
distributable code, the assign's could easily be changed to #declare
statements.

It's not that I don't think POV-patches have their value - simply that one
of the real strengths of POV is its portability and accessibility, and doing
as much as possible to maintain this seems, to me at least,  preferable to
splintering POV-users into different groups based on
platforms/versions/whatever.


Post a reply to this message

From: Warp
Subject: Re: Request for enhancement
Date: 5 Dec 2000 05:48:32
Message: <3a2cc7ff@news.povray.org>
Chris Huff <chr### [at] maccom> wrote:
: Well, this *is* impossible without modifying the source

  You should believe Ken... As always :)

  Check this:

#macro assignLocal(Var)
  #local Var
#end

#declare ABC=1;

#macro TestLocal()
  #local ABC=2;
  assignLocal(ABC) = 5;
  #debug concat("Local 'ABC': ", str(ABC,0,0), "\n")
#end

TestLocal()
#debug concat("Global 'ABC': ", str(ABC,0,0), "\n")



: BTW, another problem with that assign() macro: it uses a semicolon, 
: which will prevent you from using objects, textures, etc...

  That solution I present above also solves the semicolon problem.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: =Bob=
Subject: Re: Request for enhancement
Date: 6 Dec 2000 00:14:49
Message: <3a2dcb49$1@news.povray.org>
Thanks everybody, and this last one did everything I
needed. The code doesn't look too bad either.
Of course, I still want a built-in version :^)

=Bob=

"Warp" <war### [at] tagpovrayorg> wrote in message
news:3a2cc7ff@news.povray.org...
[Deletions]


:   That solution I present above also solves the semicolon problem.
: main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
: ):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

<<< Previous 4 Messages Goto Initial 10 Messages

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