|
![](/i/fill.gif) |
Hi everybody!
I wonder if anyone has thought about doing a better way to do large scripts
in povray?
I've been thinking about it a lot lately, getting pretty bored with #macro's
where 90% of the code is diffrent #declare statements.
There realy should be a light C++ interpeter in povray. Nothing fancy, just
the basic statements, for(;;), while(), do..while() and so on. And when you
actualy want to create something you write something like:
cout << " sphere { <0,0,0>,1 } " << endl;
to output it to the temporary scene source file. This could also be used for
messages:
cout << debug << "X position: " << x << endl;
to output a debug message.
A snip from a small scene could look something like this:
#script
float x = 0;
for (int i = 0;i < 10;i++) {
cout << "sphere {<" << x << ",0,0>,1" << endl;
cout << debug << "Output sphere nr." i << " at <" << x << ",0,0>" <<
endl;
x += 3;
}
#end
An implementation with procedures would be nice to.
Well, food for thought anyway.
/Anders
Post a reply to this message
|
![](/i/fill.gif) |