|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 09 Mar 2000 11:10:38 -0800, Ken wrote:
>So the way I see it by adding this you would save yourself the effort
>of typing one character.
#declare MyArray[25*X+5*Y+Z][Colour.r] = MyArray[25*X+5*Y+Z][Colour.r] + 1;
--
These are my opinions. I do NOT speak for the POV-Team.
The superpatch: http://www2.fwi.com/~parkerr/superpatch/
My other stuff: http://www2.fwi.com/~parkerr/traces.html
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 9 Mar 2000 14:13:26 -0500, Ron Parker wrote:
>On Thu, 09 Mar 2000 11:10:38 -0800, Ken wrote:
>
>>So the way I see it by adding this you would save yourself the effort
>>of typing one character.
>
>#declare MyArray[25*X+5*Y+Z][Colour.r] = MyArray[25*X+5*Y+Z][Colour.r] + 1;
er, .red, that is. Grr..
--
These are my opinions. I do NOT speak for the POV-Team.
The superpatch: http://www2.fwi.com/~parkerr/superpatch/
My other stuff: http://www2.fwi.com/~parkerr/traces.html
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
This is what I'm looking for. I'm no programmer either, but if you ever publish
anyhting on it please post it here or let me know (yeah, that's asking a lot, I
realize) but this is exactly the kind of thing I would want POV-Ray to be able to
do.
Josh
Mikael Carneholm wrote:
> Ken,
>
> I feel the need to make a contribution to the debate here, as I have been
> involved in the discussion of changing the POV syntax and am about to submit a
> proposal to a new POV-Ray language (PRL?), as a part in the making of my
> Masters of Arts essay. My intention (and purpose with the research part) is to
> investigate if it is possible to keep backwards compatibility when re-defining
> a programming language (in this case: PRL or POV-Script as we know it). This
> will consequently be my mission - to develop a language that is powerful when
> you need it, yet easy to use if you're not a programming expert.
>
> The OO-approach comes somewhat naturally as I see it, as the world in POV-Ray
> consists of just that - objects. The spheres, cubes, cylinders, etc. that we
> describe are all representations of physical objects. We already have the
> object{[object identifier]}keyword, and the #declare MyThingy = sphere{..} is
> equivalent to a class description.
>
> I think I have mentioned this before, but I might as well say it again: The
> new POV-script I am thinking of is fully backwards compatible i.e. you should
> still be able to just describe a scene in no particular order, just as you
> always have. Some OO-features will hopefully be possible, but you will not
> have to write #declare MySphere1 = new sphere(<0,0,0>, new size(0.5), new
> texture(new pigment(color new vector(<1,1,1>))))); or something as
> (java-)horrible as that to create a white sphere. But, you should be able to
> access the attributes of the objects in the scene, for example: #declare
> camera.location = MySphere1.location - <0,0,5>;
>
> I'm very open for suggestions, as I'm merely a POV user and we (the POV users)
> should collaborate to keep POV as the best free raytracer available.
>
> - Mikael.
>
> ----------------------------------------------------
> Mikael Carneholm
> Dep. of Computer Science and Business Administration
>
> Personal homepage:
> http://www.studenter.hb.se/~arch
> E-mail:
> sa9### [at] idautbhbse
--
Josh English
eng### [at] spiritonecom
"May your hopes, dreams, and plans not be destroyed by a few zeros."
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Would you have difficulty re-learning POV-Ray if it's language format
> changed ?
>
> Would you resent it or maybe even quit using the program completely ?
>
No, I wouldn't have difficulty with re-learning POV-Ray, except that I
can be hard, if you have finally find out how to create something and
you have to do that research again.
I would never resent POV-Ray completly, because I like that it's free
and that texture are created by the program and that it are no photo's.
The only thing that I'm missing is advanced animation (like objects
bouncing automatically and complex movements).
Remco Poelstra
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi
But what if the loop control variable is a vector that is shared
between several nested loops? (See my example macro below.)
Would this be possible with nested for-loops?
Regards
Tor Olav
mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html
PoD wrote:
> Some aspects of the language which relate purely to programming could be
> changed or (probably better) extended without affecting those who don't
> use them.
>
> For a non-programmer or a programmer , macros, loops etc are a lot
> harder in POV than the equivalents in most programming languages.
>
> Surely replacing
> #declare I=1; #while(I<=5) ... #declare I=I+1;#end
> with either
> for I = 1 to 5 {...}
> ala Basic, or even for a non-programmer,
> for( I=1; I <= 5; I=I+1){...}
> would make life easier for all.
>
> PoD.
#macro ObjectSplit(Thing, Point1, Point2, nnv)
// Cuts an object into several "box"-parts
// Result is returned in an array of such parts
//#local nnv = <nx, ny, nz>;
#local ThingArray = array[nnv.x][nnv.y][nnv.z]
#local dPoint = (Point2 - Point1)/nnv;
#local Cntv = Nullv;
#while (Cntv.z < nnv.z)
#local Cntv = Cntv*z;
#while (Cntv.y < nnv.y)
#local Cntv = Cntv*(y+z);
#while (Cntv.x < nnv.x)
#local ThingArray[Cntv.x][Cntv.y][Cntv.z] =
intersection {
object { Thing }
box { Point1 + dPoint*Cntv, Point1 + dPoint*(Cntv+Unitv) }
}
#local Cntv = Cntv+x;
#end // while
#local Cntv = Cntv+y;
#end // while
#local Cntv = Cntv+z;
#end // while
ThingArray
#end // macro ObjectSplit
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi again
Tor Olav Kristensen wrote:
> Hi
>
> But what if the loop control variable is a vector that is shared
> between several nested loops? (See my example macro below.)
...
> #local Cntv = Nullv;
> ...
I forgot something: Nullv = <0, 0, 0>
So the above statement resets all 3 components of the counter vector.
I think that it sometimes is nice with a vectors as a counter variables,
because it makes it possible to write compact code where a needed
vector changes as a result of loop counts.
Tor Olav
mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Yeah, I like this idea a lot. You wouldn't have to re-learn anything if you don't
want to, yet it would have the power of a full featured object oriented language.
I particularly like the ideas posted above of adding the C-style FOR loops and
such. I would find these particularly helpful as I am just getting my feet wet
with C programming and I could work on my C coding with POV. Anyway, just my two
cents.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ron Parker wrote:
> On Thu, 09 Mar 2000 11:10:38 -0800, Ken wrote:
>
> >So the way I see it by adding this you would save yourself the effort
> >of typing one character.
>
> #declare MyArray[25*X+5*Y+Z][Colour.r] = MyArray[25*X+5*Y+Z][Colour.r] + 1;
How about making the editor do the re-typing for the lazy ones?
When you type
#declare something +=
and a function key, then the editor just auto-replaces the
+=
with
= something +
so the sentence becomes
#declare something = something +
Regards
Tor Olav
mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 09 Mar 2000 23:00:07 +0100, Tor Olav Kristensen wrote:
>
>Ron Parker wrote:
>> #declare MyArray[25*X+5*Y+Z][Colour.r] = MyArray[25*X+5*Y+Z][Colour.r] + 1;
>
>How about making the editor do the re-typing for the lazy ones?
Because that's just ugly (we don't ALL use the editor built-in to POV for
Windows, you know) and in any case it just puts off the problems inherent
in the line above until you come back to maintain it later.
--
These are my opinions. I do NOT speak for the POV-Team.
The superpatch: http://www2.fwi.com/~parkerr/superpatch/
My other stuff: http://www2.fwi.com/~parkerr/traces.html
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
If you use an editor with copy and paste features,
I would guess that the maximum number of extra
keystrokes you would have to do is about 7 or 8.
(Or even fewer if you use a mouse.)
So the problem isn't that big.
Tor Olav
mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html
Ron Parker wrote:
> On Thu, 09 Mar 2000 23:00:07 +0100, Tor Olav Kristensen wrote:
> >
> >Ron Parker wrote:
>
> >> #declare MyArray[25*X+5*Y+Z][Colour.r] = MyArray[25*X+5*Y+Z][Colour.r] + 1;
> >
> >How about making the editor do the re-typing for the lazy ones?
>
> Because that's just ugly (we don't ALL use the editor built-in to POV for
> Windows, you know) and in any case it just puts off the problems inherent
> in the line above until you come back to maintain it later.
>
> --
> These are my opinions. I do NOT speak for the POV-Team.
> The superpatch: http://www2.fwi.com/~parkerr/superpatch/
> My other stuff: http://www2.fwi.com/~parkerr/traces.html
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |