POV-Ray : Newsgroups : povray.programming : POV-Ray 3.1 to other file formats - a possible solution : Re: POV-Ray 3.1 to other file formats - a possible solution Server Time
28 Jul 2024 14:21:30 EDT (-0400)
  Re: POV-Ray 3.1 to other file formats - a possible solution  
From: Neil Freebairn
Date: 11 Aug 2000 05:59:33
Message: <3993ce85@news.povray.org>
Chris Huff <chr### [at] maccom> wrote in message
news:chrishuff-E4C9B8.09352610082000@news.povray.org...
> In article <3992a1a5@news.povray.org>, "Neil Freebairn"
> <nei### [at] lineonenet> wrote:
>
> > My solution is coded entirely in POV 3.1 scene language, because it's
> > quick to prototype, I hoped I might get all the way, and I don't know
> > any C++.
>
> You seem to be under the impression that POV is written in C++...it is
> written in plain old C, though a rewrite in C++ is planned for 4.0. And
> adding a function is usually quite easy...one of the easiest things to
> do.

Great, and apologies for C / C++ mistake. (D'Oh.)


> > Many of the features new to POV 3.1 (and perhaps some to the
> > soon-to-be-released v3.5) bring the scene language closer to a
> > language proper, say a 4GL.
>
> Uhh, "4GL"?

4th generation language, which here is my shorthand for words I'm not
familiar with to describe the kinds of features one sees in C, Pascal, etc,
and which weren't in POV3.0, but have started to appear in 3.1, such as
macros.

> > A function that would be useful in this regard, independent of my
> > requirement, is this 'makestr(ANY_IDENTIFIER)' function that works
> > like str(FLOAT_IDENTIFIER).
>
> The str() function converts a float to a string...how would you convert
> a shape to a string? Would you just have it return POV-Script
> representing the object? Or return the code that generated the object in
> the first place?

All I need is a function that returns the 'value' of an identifier as a
string that could be used to create a variable of identical value through a
declarative  statement, #declare, #local, $ or % - the text string used in
the original declarative should be perfect. :-) So the string will be
something like
"1.4"
"hello world"
"object { ... }"
"texture { ... }"
"pigment { ... }"

depending on variable type.

If this text is already (or could be) held in memory against the identifier,
the function should be straightforward to code - just write it out, no need
to even worry about types. I suggested it was a conversion function, but
that's incorrect.

> > Are you familiar with the POV source and C++, by any chance?
>
> I am familiar with both, not that they have much to do with each other
> at this point. :-)

Ok. (D'oh!)
If it wouldn't take too long, I think it might anyway be a valuable addition
to POV's functionality for debugging as the scene language gets more and
more sophisticated.

:-)

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


Post a reply to this message

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