 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Greetings,
As we all know the language used by POV-Ray is not only easy to use
but offers a lot of flexibility. There are often many ways to describe
an object or attribute of an object because of the "looseness" of
it's language.
Now many in the past have argued that it is too primitive for thier
needs and suggest that it become more of an official programming
language. They also suggest it should become more object oriented
or stricter rules should be applied to the language from what it is
now. Some say the syntax is too loose for all practical purposes.
Some even suggest it should move to a binary format that needs to
be compiled before being parsed (heaven forbid).
I say the one thing that attracted me to POV-Ray was the fact that
it's text based input was both easy to learn, was intuitive from the
beginning, and I never had to learn a programmers language to use
the program. I like the way that you can describe something in several
ways to achieve the same results. In my opinion this loose and very
flexible language makes it a very powerful program to use.
What I do worry about though is the influence that the people who seek
a more programmer like language may have for the mass of people that have
no programming background but still enjoy using the program. It might
be good for them in some circumstances but would it be good for everyone
is not so cut and dried as it were.
So the questions I have are really for the non-programmer types out there.
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 ?
P.S. I am not suggesting that the POV-Team is even considering changing
the language at this time. I am mearly trying to find out what the
mainstream users of the program think about this and if they really
like the way the syntax is currently structured.
--
Ken Tyler - 1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I don't think I could explain the reason why pov-script is my favorite choice so
easily to begin with and that's why I've had little trouble continuing to use it
all this time. I used Polyray before ever seeing POV-Ray and I was just getting
used to using that, the text interfacing I mean. First time I had ever
"raytraced" via text was in Polyray.
And since the time I started in on POV-Ray I have tried BMRT and didn't even
begin to get accustomed to it. I think it should be kept in mind that POV has
changed considerably over the years and hasn't always been like it is now, yet
it still has a similar "language" over all that time.
Got to admit that Nathan's #$ keyword (or syntax) as a shortcut to #declare is
kind of what I think of when I hear this programmer versus 3D graphics
enthusiast debate or differing opinions.
The most certain fact to me is the understandability of the code(?). Less
meaningful keywords and syntax is less easy to follow obviously. Now I'm not
saying I always like writing out a whole bunch more than I might otherwise be
doing if the language were condensed further (I often use cryptic definition
names for things) but I always see this programming discussion to be about
losing sight of a followable format. Like if every current keyword were a
letter or two instead and the syntax glued together like pieces in other
programming languages (assuming I know anything about what I'm saying) then I'd
get lost without some serious roadmap mentality to get me through it okay.
That said, I know how some people can't see what the heck POV-Ray is at all with
it's curly braces and hash marks and parenthesis so they might shy away from
trying to learn it, that's what makes it a text interface anyhow. You almost
have to think of the visual appearance of a ASCII character-only language in
order to sort the parts out. That is of course the usual programming technique
too I suppose, to make what's typed a visual queue.
I'm rambling on here so to sum up I'm only trying to say POV-Ray has it's niche
with the form it is written in same as any other such language. It has always
seemed very straight-forward to me though. I just hope it doesn't ever become a
thing where the newcomer or accustomed user is stumbling through while building
a scene. Common sense, huh?
Bob
"Ken" <tyl### [at] pacbell net> wrote in message
news:38C7685C.5A4F3A68@pacbell.net...
|
|
| Greetings,
|
| As we all know the language used by POV-Ray is not only easy to use
| but offers a lot of flexibility. There are often many ways to describe
| an object or attribute of an object because of the "looseness" of
| it's language.
|
| Now many in the past have argued that it is too primitive for thier
| needs and suggest that it become more of an official programming
| language. They also suggest it should become more object oriented
| or stricter rules should be applied to the language from what it is
| now. Some say the syntax is too loose for all practical purposes.
| Some even suggest it should move to a binary format that needs to
| be compiled before being parsed (heaven forbid).
|
| I say the one thing that attracted me to POV-Ray was the fact that
| it's text based input was both easy to learn, was intuitive from the
| beginning, and I never had to learn a programmers language to use
| the program. I like the way that you can describe something in several
| ways to achieve the same results. In my opinion this loose and very
| flexible language makes it a very powerful program to use.
|
| What I do worry about though is the influence that the people who seek
| a more programmer like language may have for the mass of people that have
| no programming background but still enjoy using the program. It might
| be good for them in some circumstances but would it be good for everyone
| is not so cut and dried as it were.
|
|
| So the questions I have are really for the non-programmer types out there.
|
| 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 ?
|
|
|
| P.S. I am not suggesting that the POV-Team is even considering changing
| the language at this time. I am mearly trying to find out what the
| mainstream users of the program think about this and if they really
| like the way the syntax is currently structured.
|
|
| --
| Ken Tyler - 1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
| http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"PoD" <pod### [at] globalfreeway com au> wrote in message
news:38C7811B.96924C63@globalfreeway.com.au...
| for I = 1 to 5 {...}
This one isn't feasible since the increment isn't changeable, as written anyhow.
The second example was. This is what makes me wonder about the merging of
syntax into smaller parts, would it always have the same functionality as before
kind of question.
But I see your point, there could be good ways to rewrite things if done well.
Bob
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Hello,
As a programmer I have to say that the flexibility of PoV-Script is one
thing I like most in PoV. As Ken already mentioned, mostly you can write
your scene intuitively, without to be bound to strict and exact rules
for a description of an object an object or attribute of an object. This
is great! In (other) programming languages (Yes I think PoV-Script is
already a kind of programming language, however a very flexible) you are
often pressed use very strict, limited and exact rules to archive the
wanted effect, which in turn you sometimes doesn't know exactly enough
to code them without looking into any help. Another problem will be the
'dirty' programming for people without programming-knowledge. The
example given by PoD is one of them:
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.
No I think not that this would make life easier for all. Problem one:
what will be the value of the variables outside the for-loop? Problem
two: What if you want to increment the variable in non deterministic
steps, e.g. different steps width in each loop or you didn't want to
increment in each loop. Than you will need the old while-construct, and
why blowing up Pov-Script with higly specialised commands if you already
have flexibler and more general commends for them? As a more skilled
programmer you can always write macros for specialised problems. Problem
three: What if somebody changes the variable explicitly inside the
loop-body. I think these problems complicates the life of PoV-people
without programming-knowledge, especially if some of these persons want
to understand code from other people with more skilled
programming-knowledge (especially if those people used 'dirty' and
mostly undocumented programming constructs).
Yours,
Axel Baune
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Ken" <tyl### [at] pacbell net> wrote in message
news:38C7685C.5A4F3A68@pacbell.net...
>
<snip>
> So the questions I have are really for the non-programmer types out there.
>
> Would you have difficulty re-learning POV-Ray if it's language format
> changed ?
Sure I would if it is not a logic evolution or development, based on the
current POV language. Through POV I have learned to recognize and understand
more other languages. Since I am not a programmer, POV was the first thing I
coded. Although the learning process is a little harder, it is straight
forward and rewarding. I wouldn't change it.
It has become very familiar to me and, besides, prompted a huge amount of
changes in the way I looked at digital arts.
Marjorie Graterol
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
PoD <pod### [at] globalfreeway com au> wrote:
: for( I=1; I <= 5; I=I+1){...}
I think that a more povray-type syntax would be:
#for(I=1; I<=5; I++)
...
#end
Of course this can be done with a #while-loop, but this kind of shortcut
just makes life easier.
I would also like to see this:
#do
...
#until(whatever)
I have at least once needed this kind of feature. With the regular #while
loop I had to write the body of the loop twice.
And this I have suggested before:
#declare A += B;
#declare A -= B;
#declare A *= B;
#declare A /= B;
etc...
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nieminen Juha wrote:
>
> I think that a more povray-type syntax would be:
>
> #for(I=1; I<=5; I++)
> ...
> #end
>
> Of course this can be done with a #while-loop, but this kind of shortcut
> just makes life easier.
> I would also like to see this:
>
> #do
> ...
> #until(whatever)
>
> I have at least once needed this kind of feature. With the regular #while
> loop I had to write the body of the loop twice.
>
> And this I have suggested before:
>
> #declare A += B;
> #declare A -= B;
> #declare A *= B;
> #declare A /= B;
> etc...
>
I believe that if these are *additions* to the language nobody would
object.
I'd like to see them.
Marc
--
Marc Schimmler
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
The only change I have considered wanting is a trend towards objects oriented
programming, but all I really want is the ability to pull a value from an
object, such as the location of the camera so I could declare camera.location
instead of making the current method
#declare CamLoc = <0,0,-4>;
camera { location CamLoc ... }
#declare Target = CamLoc;
but I think this would make it overly complicated.
Josh
Ken wrote:
> Greetings,
>
> As we all know the language used by POV-Ray is not only easy to use
> but offers a lot of flexibility. There are often many ways to describe
> an object or attribute of an object because of the "looseness" of
> it's language.
>
> Now many in the past have argued that it is too primitive for thier
> needs and suggest that it become more of an official programming
> language. They also suggest it should become more object oriented
> or stricter rules should be applied to the language from what it is
> now. Some say the syntax is too loose for all practical purposes.
> Some even suggest it should move to a binary format that needs to
> be compiled before being parsed (heaven forbid).
>
> I say the one thing that attracted me to POV-Ray was the fact that
> it's text based input was both easy to learn, was intuitive from the
> beginning, and I never had to learn a programmers language to use
> the program. I like the way that you can describe something in several
> ways to achieve the same results. In my opinion this loose and very
> flexible language makes it a very powerful program to use.
>
> What I do worry about though is the influence that the people who seek
> a more programmer like language may have for the mass of people that have
> no programming background but still enjoy using the program. It might
> be good for them in some circumstances but would it be good for everyone
> is not so cut and dried as it were.
>
> So the questions I have are really for the non-programmer types out there.
>
> 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 ?
>
> P.S. I am not suggesting that the POV-Team is even considering changing
> the language at this time. I am mearly trying to find out what the
> mainstream users of the program think about this and if they really
> like the way the syntax is currently structured.
>
> --
> Ken Tyler - 1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
> http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
--
Josh English
eng### [at] spiritone com
"May your hopes, dreams, and plans not be destroyed by a few zeros."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nieminen Juha wrote:
>#declare A += B;
>#declare A -= B;
What does it mean?
In general I like the language the way it is now, maybe make it more
consistent at some places (shadowless & no_shadow). The only thing that
worries me sometimes is the amount of keywords. How many will be there in
10 years?
My worst POV-nightmare is a scene file that looks like Warp's sig.
Ingo
--
Photography: http://members.home.nl/ingoogni/
Pov-Ray : http://members.home.nl/seed7/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
ingo wrote:
> My worst POV-nightmare is a scene file that looks like Warp's sig.
Make the monster go away mommy...
--
Ken Tyler - 1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
When I first opened Pov I had no idea how to start, then I realised it was a
scripted approached to graphics and shut it down.
Later for reasons I won't go into now I tried again. The first thing I did
was look at the docs. in pov 3.0 there were excellent examples that lead you
through the creation of a scene(now sadly gone). after the customary
reflective sphere on a plane I started to create my own pics. Being able to
program with basic helped. I found the descriptiveness and flexibility of
the language very helpful.
Yes Pov language is getting very large and I'm on my second very large ring
file of reference material. But I don't mind that.
There are now and will so many things in pov to learn, digest and use in
scenes, that I am reaching the point where I am missing effects because I
don't understand the new features or am not familiar enough with them. I'd
rather they were there though because one day....
I don't mind new additions or different ways of doing things - we all think
differently.
Looping is one area that can definitely be improved I agree with all the
comments there.
Keep it flexible, let it evolve with many pathways to the same end, so that
povray is, as now, for all, not just for some.
Mick
--
*************************************************************
http://www.minda.swinternet.co.uk/index.htm
*************************************************************
"Marjorie Graterol" <eme### [at] emediez com> wrote in message
news:38c7c043@news.povray.org...
>
> "Ken" <tyl### [at] pacbell net> wrote in message
> news:38C7685C.5A4F3A68@pacbell.net...
> >
> <snip>
>
> > So the questions I have are really for the non-programmer types out
there.
> >
> > Would you have difficulty re-learning POV-Ray if it's language format
> > changed ?
>
> Sure I would if it is not a logic evolution or development, based on the
> current POV language. Through POV I have learned to recognize and
understand
> more other languages. Since I am not a programmer, POV was the first thing
I
> coded. Although the learning process is a little harder, it is straight
> forward and rewarding. I wouldn't change it.
> It has become very familiar to me and, besides, prompted a huge amount of
> changes in the way I looked at digital arts.
>
> Marjorie Graterol
>
>
>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> | for I = 1 to 5 {...}
>
> This one isn't feasible since the increment isn't changeable, as written
anyhow.
In Visual Basic this is done like so:
For i = 1 To 5 Step 3
...
Next i
¤¤¤¤
¤ Sebastian Strand
¤ E-mail: the### [at] bigfoot com
¤ URL: http://www.zeb.f2s.com/
¤¤¤¤
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
UCB (University College of Borås) Sweden
Personal homepage:
http://www.studenter.hb.se/~arch
E-mail:
sa9### [at] ida utb hb se
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Axel Baune wrote:
>
>[Snip]
>Another problem will be the
> 'dirty' programming for people without programming-knowledge. The
> example given by PoD is one of them:
dirty programming?
>
> 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.
>
> No I think not that this would make life easier for all. Problem one:
> what will be the value of the variables outside the for-loop?
The same as it would be using a while loop?
>Problem
> two: What if you want to increment the variable in non deterministic
> steps, e.g. different steps width in each loop or you didn't want to
> increment in each loop. Than you will need the old while-construct, and
> why blowing up Pov-Script with higly specialised commands if you already
> have flexibler and more general commends for them? As a more skilled
> programmer you can always write macros for specialised problems.
Then use a while loop and nothing is lost, except that you've made your
script hard to read. There's probably an easier way to do it using
for()
>Problem
> three: What if somebody changes the variable explicitly inside the
> loop-body. I think these problems complicates the life of PoV-people
> without programming-knowledge, especially if some of these persons want
> to understand code from other people with more skilled
> programming-knowledge (especially if those people used 'dirty' and
> mostly undocumented programming constructs).
See answer to 2
PoD.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nieminen Juha wrote:
>
> PoD <pod### [at] globalfreeway com au> wrote:
> : for( I=1; I <= 5; I=I+1){...}
>
> I think that a more povray-type syntax would be:
>
> #for(I=1; I<=5; I++)
> ...
> #end
>
> Of course this can be done with a #while-loop, but this kind of shortcut
> just makes life easier.
> I would also like to see this:
>
> #do
> ...
> #until(whatever)
>
> I have at least once needed this kind of feature. With the regular #while
> loop I had to write the body of the loop twice.
>
> And this I have suggested before:
>
> #declare A += B;
> #declare A -= B;
> #declare A *= B;
> #declare A /= B;
> etc...
>
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
I DON'T like the Basic syntax but it's still lots simpler than POV.
I also deliberately didn't use I++ because that has nothing to do with
loop syntax and might confuse people who've never seen C, Java etc.
PoD.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"PoD" <pod### [at] merlin net au> wrote in message
news:38C7EEA3.D0EE7FF1@merlin.net.au...
> Axel Baune wrote:
> >Problem
> > two: What if you want to increment the variable in non deterministic
> > steps, e.g. different steps width in each loop or you didn't want to
> > increment in each loop. Than you will need the old while-construct,
and
> > why blowing up Pov-Script with higly specialised commands if you
already
> > have flexibler and more general commends for them? As a more skilled
> > programmer you can always write macros for specialised problems.
>
> Then use a while loop and nothing is lost, except that you've made
your
> script hard to read. There's probably an easier way to do it using
> for()
For example:
for (I = 1; I <= something; ) {
// loop body here
I += non_deterministic_increment;
}
Johannes
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"ingo" <ing### [at] home nl> wrote in message
news:8EF2B8E07seed7@204.213.191.228...
> Nieminen Juha wrote:
>
> >#declare A += B;
> >#declare A -= B;
>
> What does it mean?
the same as
#declare A = A + B;
#declare A = A - B;
Johannes.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <38C7685C.5A4F3A68@pacbell.net>, lin### [at] povray org
wrote:
>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 ?
If it's better and easier to use, I keep using it; if it's not, I don't.
Personally, I like the template-scripting style of POV, much for the
same reason I really like PHP for making web pages.
If I were to make one change to the language, it might be to make a form
of macro that looks more like built-in functions. So instead of making a
function like:
#macro FaceofGod(Religion,Sect,Vowels)
#end
and calling it like:
object { FaceofGod("Christianity","Mormon","auau")}
you could call it like:
FaceofGod {
religion "Christianity"
sect "Mormon"
vowels "auau"
pigment {
color Green
}
}
But this might be solved by object-oriented objects as well.
Jerry
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Johannes Hubert wrote:
>
> "ingo" <ing### [at] home nl> wrote in message
> news:8EF2B8E07seed7@204.213.191.228...
> > Nieminen Juha wrote:
> >
> > >#declare A += B;
> > >#declare A -= B;
> >
> > What does it mean?
>
> the same as
>
> #declare A = A + B;
> #declare A = A - B;
So the way I see it by adding this you would save yourself the effort
of typing one character. The question the potential patch writer must
ask himself then is if it be worth the effort to patch the program to
accept this new style of arguement just to save the user from having
to type one more character into their scene file. Reduced to this it
would seem a petty feature.
--
Ken Tyler - 1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
> UCB (University College of Borås) Sweden
>
> Personal homepage:
> http://www.studenter.hb.se/~arch
> E-mail:
> sa9### [at] ida utb hb se
--
Josh English
eng### [at] spiritone com
"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] hotmail com
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] hotmail com
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] hotmail com
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] hotmail com
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> 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>))))); [...] you should be
able to
> access the attributes of the objects in the scene, for example: #declare
> camera.location = MySphere1.location - <0,0,5>;
These are exactly the kind of modifications/additions I would like to see
too. Not being able to access the location / other properties of an object
without saving it to a variable is a major inconvenience. Each object could
have a name property, so when declaring you would do something like
sphere {
<0, 0, 0>, 1
name "Sphere 1"
}
and the sphere could then be accessed like
Sphere1.texture = texture { texWood }
Sphere1.translate(<0, 0, 10>)
A thing that would be very useful would be to be able to add your own
methods and properties to an object, like:
Sphere1.AddMethod("Spin", "vecRot")
Sphere1.Spin = function {
#local vecPos = Me.position
Me.translate(-vecPos)
Me.rotate(vecRot)
Me.translate(vecPos)
}
Sphere1.Spin(<0, 90, 0>)
This would not interfere with 'normal' pov scripting, but would really make
pov very versatile for advanced users. I do program as a hobby though, so I
don't know what non-programmers might think.
Just my two Finnish "penni"...
¤¤¤¤
¤ Sebastian Strand
¤ E-mail: the### [at] bigfoot com
¤ URL: http://www.zeb.f2s.com/
¤¤¤¤
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <38C82261.6B18E224@hotmail.com>, Tor Olav Kristensen
<tor### [at] hotmail com> wrote:
> 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.
Umm, maybe you haven't noticed, but POV is available for many different
platforms. Many people don't use the built in editor, and some versions
don't have one. Relying on copy and paste or other editor features is a
poor solution, and only fixes half of the problem(the time it takes to
type things in).
Which looks more readable? This:
#declare MyArray[25*X+5*Y+Z][Colour.red] =
MyArray[25*X+5*Y+Z][Colour.red] + 1;
or this:
#declare MyArray[25*X+5*Y+Z][Colour.red] += 1;
? If you are going back to code that was written by someone else or
which you haven't used in a while, or even which you wrote yesterday,
this type of thing can save a lot of time debugging.
BTW, another potentially useful operator is ^ for "to the power of". I
have written a patch which allows this, it seems to work
perfectly(although it hasn't been heavily tested). Maybe it will be
included in MegaPOV sometime...
--
Chris Huff
e-mail: chr### [at] yahoo com
Web page: http://chrishuff.dhs.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
For me the greatest addition would be a switch/case statement, like this:
#switch (some_variable)
#case int, float, vector, ...
#end
#end
--
Dave.
mic### [at] sympatico ca
Nieminen Juha <war### [at] sarakerttunen cs tut fi> wrote in message
news:38c7c815@news.povray.org...
> PoD <pod### [at] globalfreeway com au> wrote:
> : for( I=1; I <= 5; I=I+1){...}
>
> I think that a more povray-type syntax would be:
>
> #for(I=1; I<=5; I++)
> ...
> #end
>
> Of course this can be done with a #while-loop, but this kind of shortcut
> just makes life easier.
> I would also like to see this:
>
> #do
> ...
> #until(whatever)
>
> I have at least once needed this kind of feature. With the regular
#while
> loop I had to write the body of the loop twice.
>
> And this I have suggested before:
>
> #declare A += B;
> #declare A -= B;
> #declare A *= B;
> #declare A /= B;
> etc...
>
> --
> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Josh English" wrote:
> 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.
Me too! :-)
Greetings,
Rune
---
Updated January 24: http://rsj.mobilixnet.dk
Containing 3D images, stereograms, tutorials,
The POV Desktop Theme, 350+ raytracing jokes,
miscellaneous other things, and a lot of fun!
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <38c82aca@news.povray.org>, "David Curtis"
<spa### [at] junkmail com> wrote:
> For me the greatest addition would be a switch/case statement, like this:
>
> #switch (some_variable)
> #case int, float, vector, ...
> #end
> #end
You mean like this? :-)
Straight from the manual:
"4.2.6.3 The #switch, #case, #range and #break Directives
A more powerful conditional is the #switch directive. The syntax is as
follows...
SWITCH_DIRECTIVE:
#switch ( Switch_Value ) SWITCH_CLAUSE... [#else TOKENS...] #end
SWITCH_CLAUSE:
#case( Case_Value ) TOKENS... [#break ] |
#range( Low_Value , High_Value ) TOKENS... [#break ]"
--
Chris Huff
e-mail: chr### [at] yahoo com
Web page: http://chrishuff.dhs.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chris Huff <chr### [at] yahoo com> wrote in message
news:chrishuff_99-90BDDE.18205009032000@news.povray.org...
>
> You mean like this? :-)
> Straight from the manual:
>
> "4.2.6.3 The #switch, #case, #range and #break Directives
>
> A more powerful conditional is the #switch directive. The syntax is as
> follows...
>
Doh! You know, I've sat down numerous times with the intention of reading
througth the manual. But as is always the case I find something I "just
gotta try".
Thanks.
--
Dave.
mic### [at] sympatico ca
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Yep, I almost mentioned that but I'm clinging to the anti-programming side so
wanted to try not making it seem as plausible. I'm bad, I know... sorry ;-)
Bob
"Sebastian Strand" <the### [at] bigfoot com> wrote in message
news:38c7dcbf$1@news.povray.org...
|
| > | for I = 1 to 5 {...}
| >
| > This one isn't feasible since the increment isn't changeable, as written
| anyhow.
|
| In Visual Basic this is done like so:
|
| For i = 1 To 5 Step 3
| ...
| Next i
|
| ¤¤¤¤
| ¤ Sebastian Strand
| ¤ E-mail: the### [at] bigfoot com
| ¤ URL: http://www.zeb.f2s.com/
| ¤¤¤¤
|
|
|
|
|
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Ken" <tyl### [at] pacbell net> wrote :
>
> Would you have difficulty re-learning POV-Ray if it's language format
> changed ?
That, of course, depends on what it is changed to...
>
> Would you resent it or maybe even quit using the program completely ?
>
I wouldn't resent it, but if it was just a little hard to re-learn, I
have a couple of commercial programs laying around that I just need a good
excuse to learn.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Chris Huff" <chr### [at] yahoo com> wrote in message
news:chrishuff_99-6AAACE.17450909032000@news.povray.org...
|
| Umm, maybe you haven't noticed, but POV is available for many different
| platforms. Many people don't use the built in editor, and some versions
| don't have one.
Please excuse my momentary lapse into exuberance while I say: heck with that,
how about auto-completion of keywords in the CodeMax editor! Wouldn't that be a
nifty item to add?
That said, I'm settling back down now.
Bob
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I agree with most of the people; keep the current stuff the way it is, but add
some more programming features.
#for (I=1,I<5,I=I+1) #end
instead of
#declare I=1; #while(I<5) #declare I=I+1; #end
some people showed examples like #for {}, but I think it would be better to
keep the #end statement as it is how it's been done so far, but also, because
the syntax and syntax coloring is very helpful in sorting out parser code from
object code.
--
___ _______________________________________________
| \ |_ <dav### [at] faricy net> <ICQ 55354965>
|_/avid |ontaine http://www.faricy.net/~davidf/
"The only difference between me and a madman is that I'm not mad." -Dali
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <38c83b93@news.povray.org>, "Bob Hughes"
<per### [at] aol com?subject=PoV-News:> wrote:
> Please excuse my momentary lapse into exuberance while I say: heck
> with that, how about auto-completion of keywords in the CodeMax
> editor! Wouldn't that be a nifty item to add?
That would be a nice option for the Mac version too, which I believe
uses the WASTE text engine. This capability might be built in to the
WASTE engine already...
Still, my first point was a platform specific editor feature is no
substitute for a language feature.
--
Chris Huff
e-mail: chr### [at] yahoo com
Web page: http://chrishuff.dhs.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Tor Olav Kristensen wrote:
> How about making the editor do the re-typing for the lazy ones?
1) What if you want to change it later? You have to do it twice.
2) People can use whichever syntax they prefer.
3) If more and more fancy features are added to the editor it will consume more
resources.
a) I'm not saying I don't like column-select and all that; very useful!
b) I don't like it when the computer modifies my work.
4) :-p
--
___ _______________________________________________
| \ |_ <dav### [at] faricy net> <ICQ 55354965>
|_/avid |ontaine http://www.faricy.net/~davidf/
"The only difference between me and a madman is that I'm not mad." -Dali
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Thu, 09 Mar 2000 23:14:57 +0100, Tor Olav Kristensen wrote:
>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.)
There are other reasons to prefer += in a case like that. If I have
#declare [big complicated expression] += 3;
and
#declare [big complicated expression] = [big complicated expression]+3;
and I'm trying to debug the code, I don't have to verify that the
big complicated expression in the first statement matches anything.
Also, it helps parse time if POV only has to parse the big complicated
expression once.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <chrishuff_99-20910D.19132109032000@news.povray.org> , Chris Huff
<chr### [at] yahoo com> wrote:
> That would be a nice option for the Mac version too, which I believe
> uses the WASTE text engine. This capability might be built in to the
> WASTE engine already...
No, unfortunately not. The WASTE text engine is actually targeted as a
replacement for small scale word processing (World Script Aware _Styled_
Text Engine), and was originally not even designed as plain editor.
In the official version I had to add numerous hooks support all the nice
editor-like features like auto-indenting and syntax coloring. MacMegaPOV
also uses WASTE, and currently has functions around WASTE to get indenting.
Either way, WASTE was not designed as an editor. It does a good job, but
adding such features as auto-completion is either done by a lot of working
around it or by some inside modifications and hooks. It is possible with
reasonable work, but not a free feature :-(
Thorsten
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Ken <tyl### [at] pacbell net> wrote:
: So the way I see it by adding this you would save yourself the effort
: of typing one character.
#declare LoopXIndex = LoopXIndex + 1;
#declare LoopXIndex += 1;
: The question the potential patch writer must
: ask himself then is if it be worth the effort to patch the program to
: accept this new style of arguement just to save the user from having
: to type one more character into their scene file.
I don't think that it would be hard to implement.
In the same way one could ask why we need a torus primitive when we can
do it with a quartic?
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Tor Olav Kristensen <tor### [at] hotmail com> wrote:
: But what if ...
The idea was not to _replace_ the while-loop, but make an _addition_ to
the povray language. You don't have to use it if you don't want to.
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I think that there should some struct-type and reference-type data types.
This would allow, for example, making linked lists.
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Hello,
PoD wrote:
>
> Axel Baune wrote:
> >
> >[Snip]
> >Another problem will be the
> > 'dirty' programming for people without programming-knowledge. The
> > example given by PoD is one of them:
>
> dirty programming?
Sorry, I didn't wanted to say that the given example incorporates dirty
programming. What I've meant to say was, that from the given example
could dirty programming easily derived (see my desciption of problems
and the following)
> > No I think not that this would make life easier for all. Problem one:
> > what will be the value of the variables outside the for-loop?
>
> The same as it would be using a while loop?
No, I don't think so. In most programming languages the state of the
variables used in a for-loop are undefined outside the loop, but most
programmers ignores this and use the mostly undocomented feature, that
after the for-loop the variable has the value of the variable in the
last loop incremented by the specified step. Whereas after a while loop
the variable has the value obtained by the last user operation on the
variable. The problem derives, because in a for loop the variable
belongs sytactically to the for command. From the viewpoint of a
computer scientist (I'm one) the variable in a for-loop should _never_
be changeable by a user and should have only one variable, but most
compiler of programming languages ignores this, beause it is to
complicated to prove this. Threrfore while-constructs show a more well
defined behaviour and should always be used.
> >Problem
> > two: What if you want to increment the variable in non deterministic
> > steps, e.g. different steps width in each loop or you didn't want to
> > increment in each loop. Than you will need the old while-construct, and
> > why blowing up Pov-Script with higly specialised commands if you already
> > have flexibler and more general commends for them? As a more skilled
> > programmer you can always write macros for specialised problems.
> Then use a while loop and nothing is lost, except that you've made your
> script hard to read. There's probably an easier way to do it using
> for()
No, you couldn't do everything with a for-loop what you could do with a
while-loop. The while-loop is far more flexible, beacuse the for-loop is
a special case of the while-loop for cases where _one_ variable is
looped through a range of values with a constant step width.
> >Problem
> > three: What if somebody changes the variable explicitly inside the
> > loop-body. I think these problems complicates the life of PoV-people
> > without programming-knowledge, especially if some of these persons want
> > to understand code from other people with more skilled
> > programming-knowledge (especially if those people used 'dirty' and
> > mostly undocumented programming constructs).
>
> See answer to 2
See answer to 1
Yours Axel Baune
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Hello,
Johannes Hubert wrote:
>
> "PoD" <pod### [at] merlin net au> wrote in message
> news:38C7EEA3.D0EE7FF1@merlin.net.au...
> > Axel Baune wrote:
>
> > >Problem
> > > two: What if you want to increment the variable in non deterministic
> > > steps, e.g. different steps width in each loop or you didn't want to
> > > increment in each loop. Than you will need the old while-construct,
> and
> > > why blowing up Pov-Script with higly specialised commands if you
> already
> > > have flexibler and more general commends for them? As a more skilled
> > > programmer you can always write macros for specialised problems.
> >
> > Then use a while loop and nothing is lost, except that you've made
> your
> > script hard to read. There's probably an easier way to do it using
> > for()
>
> For example:
>
> for (I = 1; I <= something; ) {
> // loop body here
> I += non_deterministic_increment;
> }
>
> Johannes
This a an example of dirty programming!
From the viewpoint of a computer scientist (I'm one) this is a not a
syntactically correct defiend for-loop. The variable of a for-loop
belongs to the for-command and should be never _changable_ by the user.
Sorry for flaming, but this are the programming styles, which make
software packages difficult to maintain, debug, readable and
understandable by other programmers.
Yours Axel Baune
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Ken wrote:
>
> Johannes Hubert wrote:
> >
Hello,
> > "ingo" <ing### [at] home nl> wrote in message
> > news:8EF2B8E07seed7@204.213.191.228...
> > > Nieminen Juha wrote:
> > >
> > > >#declare A += B;
> > > >#declare A -= B;
> > >
> > > What does it mean?
> >
> > the same as
> >
> > #declare A = A + B;
> > #declare A = A - B;
>
> So the way I see it by adding this you would save yourself the effort
> of typing one character. The question the potential patch writer must
> ask himself then is if it be worth the effort to patch the program to
> accept this new style of arguement just to save the user from having
> to type one more character into their scene file. Reduced to this it
> would seem a petty feature.
>
> --
> Ken Tyler - 1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
> http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
I agree.
The variant
> > #declare A = A + B;
> > #declare A = A - B;
is far more readable than the other. Besides this it would comlicate the
parser of PoV if the other variant should be maintained. This will lead
to a new type of possible parser bugs.
Yours Axel Baune
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |