![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> 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"...
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
|
|
|
|
|
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"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/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |