![](/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) |
In article <3a1168e8@news.povray.org>, "Zilvah" <zil### [at] online no>
wrote:
> You guys look at this the wrong way... What about the people not
> wanting to spend hours learning a new language, instead of just
> adding to whatever they know about POV-Ray language already?
The current language has a lot of "extra baggage", and some parts aren't
well designed, there are some odd little inconsistencies...redoing the
language to something close to but better than the current language
would be a good idea.
It should be similar enough to the existing POV-Script that there
wouldn't be a lot of new stuff to learn, and could actually be easier to
learn than the current POV-Script.
> Besides, C++ based languages have a tendency to have a _very_ steep
> learning curve...
I wasn't talking about a C++ based language, C++ would be way too
complex, with a lot of stuff useless to POV users.
I'm talking about a new one with some C-like characteristics(like using
{} for all blocks, "variableName = value;", the same loops and
conditional statements), and some object-oriented features, like member
variables/methods and simple inheritance.
Actually, I am now thinking of developing "CSDL" into a language for
describing any scenes, not just for POV. It could be used as a modeller
scripting language or to test out algorithms, do simulations, etc...it
is just a personal experiment, but I think the POV language could take a
similar direction.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.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] mac com> wrote:
: and some object-oriented features, like member
: variables/methods and simple inheritance.
If object-orientedness is ever implemented in the povray scripting language,
my opinion is that it should be done well from the beginning.
In my opinion a language that has some OO features but is only "half-OO"
is a bad idea.
It should have all the basic OO features:
- Full modularity support (which means at least public and private parts).
- Member functions and variables (if we are purists, member variables in
the public interface should be made illegal).
- Full inheritance support, which means:
- A protected part in the class (besides public and private).
- Dynamic binding (that is, virtual member functions).
- Abstract (ie. pure virtual) member functions and abstract classes
(aka. interface classes).
- A way to create instances of classes (ie. objects) and thus references
(that is, pointers).
- Class functions and class variables (usually called 'static' in many
languages).
NOTE: The fact that the language supports all those things does NOT mean
that you have to learn all those things to just make simple scenes.
NOTE 2: Read the previous note again.
NOTE 3: Please read it again.
NOTE 4: Did you read it?
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;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) |
Warp wrote:
>Chris Huff <chr### [at] mac com> wrote:
>: and some object-oriented features, like member
>: variables/methods and simple inheritance.
>
> If object-orientedness is ever implemented in the povray scripting
> language, my opinion is that it should be done well from the beginning.
> In my opinion a language that has some OO features but is only
> "half-OO" is a bad idea.
>
In the several discussions there where on this OO-pov topic, there is one
thing I don't understand, or maybe it's my ignorance; Why design a new
language? Why not pick a suitable, already existing OO-language with
everything on it and write the appropriate modules, classes etc.?
Python & POV:
http://www.inetarena.com/~pdx4d/ocn/cp4e.html#python
3D Python:
http://virtualphoton.pc.cc.cmu.edu/projects/visual/
(Chris, a mac (alpha)version is now available)
Ingo
--
Photography: http://members.home.nl/ingoogni/
Pov-Ray : http://members.home.nl/seed7/
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 <8FE### [at] povray org>, ing### [at] home nl (ingo) wrote:
> In the several discussions there where on this OO-pov topic, there is one
> thing I don't understand, or maybe it's my ignorance; Why design a new
> language? Why not pick a suitable, already existing OO-language with
> everything on it and write the appropriate modules, classes etc.?
So you can have a language designed for the purpose of describing scenes
and without the "baggage" from languages designed for other purposes
(text processing, application development, web applets, etc...).
Things like vectors, colors, textures, and shapes as part of the
language instead of classes in a library for the language, etc.
A language designed for scene description can be simplified and easier
to learn, as well as better for hand-coding scenes. Also, you can make
it completely platform independant without having to pound someone
else's source into submission. :-)
A library for another language that outputs .pov files or tells POV to
render a scene would still be very useful, it just has some shortcomings
for writing scenes...
> Python & POV:
> http://www.inetarena.com/~pdx4d/ocn/cp4e.html#python
> 3D Python:
> http://virtualphoton.pc.cc.cmu.edu/projects/visual/
> (Chris, a mac (alpha)version is now available)
I will look at these... I haven't really liked what I have seen of
Python, at least not for POV. For instance: the animation of a ball
bouncing on a box uses this code(some indentation added):
from visual import *
floor = box (pos=(0,0,0), length=4, height=0.5, width=4,
color=color.blue)
ball = sphere (pos=(0,4,0), radius=1, color=color.red)
ball.velocity = vector(0,-1,0)
dt = 0.01
while 1:
rate (100)
ball.pos = ball.pos + ball.velocity*dt
if ball.y < ball.radius:
ball.velocity.y = -ball.velocity.y
else:
ball.velocity.y = ball.velocity.y - 9.8*dt
I can't imagine many POV users being happy programming scenes like this,
though some specific things would be useful in a scene description
language. Oh, and I didn't cut off the end...but the lack of some kind
of end to the while loop makes me nervous.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.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) |
The reason for using Python as an example is that it is the only language
I can use a bit (and like) and it seems to run on all platforms POV runs
on. I don't intend to promote it as the ultimate solution for 3D-OO.
Others may be more suitable, Ocaml? Perl? Squeak?
Chris Huff wrote:
>So you can have a language designed for the purpose of describing
>scenes and without the "baggage" from languages designed for other
>purposes (text processing, application development, web applets,
>etc...).
You can strip out all/most of what you don't need from the Python
distribution.
The available of all kinds modules when using an existing language can
quite an advantage though. A bit cumbersome, but you could build a scene
that traces the latest news of this server.
>Things like vectors, colors, textures, and shapes as part of
>the language instead of classes in a library for the language, etc.
Doesn't a library or module become part of the language? Big parts of
Python are written in Python.
Mmm, what is "the language", everything in the distribution, or only the
part that needs no modules to be imported?
>A language designed for scene description can be simplified and easier
>to learn, as well as better for hand-coding scenes. Also, you can make
>it completely platform independant without having to pound someone
>else's source into submission. :-)
>
Sorry Chris, but I don't understand the last part of this (lack of idiom
on my side).
>A library for another language that outputs .pov files or tells POV to
>render a scene would still be very useful, it just has some
>shortcomings for writing scenes...
No need to write scene files, it could interact directly with the render
engine.
An other example, the lightflow rendering interface, with or without
Python wrapping.
>>..
>I will look at these... I haven't really liked what I have seen of
>Python, at least not for POV. For instance: the animation of a ball
>bouncing on a box uses this code(some indentation added):
>
>from visual import *
>
>floor = box (pos=(0,0,0), length=4, height=0.5, width=4,
>color=color.blue)
>ball = sphere (pos=(0,4,0), radius=1, color=color.red)
>ball.velocity = vector(0,-1,0)
>dt = 0.01
>
>while 1:
> rate (100)
> ball.pos = ball.pos + ball.velocity*dt
> if ball.y < ball.radius:
> ball.velocity.y = -ball.velocity.y
> else:
> ball.velocity.y = ball.velocity.y - 9.8*dt
For the first part, that's a design decision, it could also have been:
floor=box((-2,-0.25,-2),(2,0.25,2),(0,0,1))
ball=sphere((0,4,0),1,(1,0,0))
>I can't imagine many POV users being happy programming scenes like
>this, though some specific things would be useful in a scene
>description language.
Just like most POV users won't be happy with any OO-POV. It's different.
>Oh, and I didn't cut off the end...but the lack
>of some kind of end to the while loop makes me nervous.
That is what I like about Python, no ;#{} , why should I think of those? I
have a computer for that. And if you're used to indent, you won't have a
problem with white space being meaningfull.
Ingo
--
Photography: http://members.home.nl/ingoogni/
Pov-Ray : http://members.home.nl/seed7/
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) |
heh, starting at the basics, why not add to the language, and maybe adding
support for another?
I miss halo's.... :P
anywayz, as long as no one even mentions Visual Basic, I'm fine :-)
Lord Z.
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 <3a141c44$1@news.povray.org>, "Zilvah" <zil### [at] online no>
wrote:
> heh, starting at the basics, why not add to the language, and maybe adding
> support for another?
I'm not sure what you are proposing...adding another scene language
while retaining the current one instead of building on and modifying
what we have now?
> I miss halo's.... :P
Halos were mostly a renderer feature.
> anywayz, as long as no one even mentions Visual Basic, I'm fine :-)
Eww...
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.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) |
In article <8FE### [at] povray org>, ing### [at] home nl (ingo) wrote:
> The reason for using Python as an example is that it is the only language
> I can use a bit (and like) and it seems to run on all platforms POV runs
> on. I don't intend to promote it as the ultimate solution for 3D-OO.
> Others may be more suitable, Ocaml? Perl? Squeak?
Why try to force one of those languages to do something it isn't
designed for? Design a new one!
And I am not saying a library for one of those languages is a bad idea,
just that it would be a really poor replacement for a scene description
language.
> Doesn't a library or module become part of the language? Big parts of
> Python are written in Python.
No. Libraries are separate from languages. The stuff in VPython doesn't
even *look* like part of the language, it is obviously calling stuff
from Python to create things.(BTW, the Mac version was based on an old
version of Python, so I can't get it to work)
> Mmm, what is "the language", everything in the distribution, or only the
> part that needs no modules to be imported?
The "language" is the collection of basic keywords, control statements,
and syntax. In POV, #declare, #while, #macro, sphere, color, vectors,
etc. are all part of the language. "White", "Green" "T_Glass3", etc. are
*not* part of the language, they are parts of a standard library. In
C++, while, if, switch, short, float, declation syntax, etc. are all
language features. However, vector templates, cin, cout, assert, etc.
are all library features.
> > Also, you can make it completely platform independant without
> > having to pound someone else's source into submission. :-)
> Sorry Chris, but I don't understand the last part of this (lack of idiom
> on my side).
I meant that if it doesn't work for some system, you don't have to hack
into someone else's source code to get it to work. It makes POV less
dependant on external factors.
> No need to write scene files, it could interact directly with the render
> engine.
In other words, replace the scene language with Python(or some other
language that you are forcing into this niche).
Also, try doing that in a cross-platform way...
> For the first part, that's a design decision, it could also have been:
> floor=box((-2,-0.25,-2),(2,0.25,2),(0,0,1))
> ball=sphere((0,4,0),1,(1,0,0))
Not much better at all. In fact, it's worse...
> Just like most POV users won't be happy with any OO-POV. It's different.
Wrong. It could be done to be very much like the way things work now,
just with additional features.
> >Oh, and I didn't cut off the end...but the lack
> >of some kind of end to the while loop makes me nervous.
> That is what I like about Python, no ;#{} , why should I think of
> those? I have a computer for that.
You like the fact that you have to think about where things end instead
of just looking for the "}", ";" or some "end" statement?
> And if you're used to indent, you won't have a problem with white
> space being meaningfull.
There would be a lot of people unhappy that their personal styles won't
work. *I* would be unhappy. Having "nothing" mean something sounds like
a really bad idea...
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.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) |
On 7 Sep 2000 16:15:18 -0400, Ron Parker wrote:
>On Thu, 7 Sep 2000 22:17:53 +0200, Alessandro Coppo wrote:
>>
>>Well, with this kind of containers it would be possible to fake object
>>oriented programming. For example
>
>[...]
>
>>Having associative heterogeneous arrays + macros is all that is needed for
>>OOP in POVRay.
>
>Careful there, you'll get Warp all revved up again. What you're talking
>about is structured programming, not OOP.
>
>--
>Ron Parker http://www2.fwi.com/~parkerr/traces.html
>My opinions. Mine. Not anyone else's.
>
--
Cheers
Steve email mailto:ste### [at] zeropps uklinux net
%HAV-A-NICEDAY Error not enough coffee 0 pps.
web http://www.zeropps.uklinux.net/
or http://start.at/zero-pps
1:14am up 125 days, 2:03, 2 users, load average: 1.68, 1.27, 1.15
Cheers
Steve email mailto:ste### [at] zeropps uklinux net
%HAV-A-NICEDAY Error not enough coffee 0 pps.
web http://www.zeropps.uklinux.net/
or http://start.at/zero-pps
1:14am up 125 days, 2:03, 2 users, load average: 1.68, 1.27, 1.15
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) |
Steve wrote:
> On 7 Sep 2000 16:15:18 -0400, Ron Parker wrote:
>
>> On Thu, 7 Sep 2000 22:17:53 +0200, Alessandro Coppo wrote:
>>
>>> Well, with this kind of containers it would be possible to fake object
>>> oriented programming. For example
>>
>> [...]
>>
>>
>>> Having associative heterogeneous arrays + macros is all that is needed for
>>> OOP in POVRay.
>>
>> Careful there, you'll get Warp all revved up again. What you're talking
>> about is structured programming, not OOP.
>>
>> --
>> Ron Parker http://www2.fwi.com/~parkerr/traces.html
>> My opinions. Mine. Not anyone else's.
>>
I have decided to keep quiet, write code... and... well, I will have
something to show you by Christmas 2001, something which will make all
this discussion useless.
Bye!!!
Alessandro Coppo
a.c### [at] iol it
P.S.: Hints: it is not a POVClone, it is not written in C++.
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) |