![](/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) |
I think I know how to make the program efficient (by using proper algorithms and data
structures), modular, reusable and so on.
I just chafe at the inelegance of some languages like Java.
Warp wrote:
> Those things cannot be learnt by knowing a programming language.
They aren't learned in computer science; it's just plain logic and common sense.
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) |
Greg M. Johnson <gre### [at] my-dejanews com> wrote:
: They aren't learned in computer science; it's just plain logic and common sense.
I wouldn't say that. Computer science gives you the basic theory. Of course
experience is needed, but experience without knowledge is of little use.
--
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) |
In article <39d47d5b$1@news.povray.org>, "Tom Melly"
<tom### [at] tomandlu co uk> wrote:
> Interesting idea - has anyone ever written an alternative scene
> language for POV (e.g. OOP) that, when run, outputs a translation to
> normal pov scene lang.?
I have been playing around with this idea..."CSDL", or C-like Scene
Description Language. It would be an object-oriented language with a
vaguely C-like syntax(variable declaration style, {} blocks, flow
control statements, etc).
I would have a translator program that reads the CSDL files and outputs
.pov files(the first version would execute the CSDL and output objects,
but later versions might be able to translate some things like loops to
POV code). Other features could be things like OpenGL previews.
Unfortunately, I haven't found any good quick-start tutorials for Bison
or Flex and nothing on using the versions of these tools available on
the Mac(which seem to be very few, undocumented, and not up-to-date.).
This shouldn't be a problem with OS X though...yet another advantage of
a UNIX-based system. :-)
--
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) |
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?
Besides, C++ based languages have a tendency to have a _very_ steep
learning curve...
This was just a thought, felt like sharing it... :P
Zilvah
------------------------------------------------------------------------
"Chris Huff" <chr### [at] mac com> wrote in message
news:chrishuff-B19E31.11023906102000@news.povray.org...
> In article <39d47d5b$1@news.povray.org>, "Tom Melly"
> <tom### [at] tomandlu co uk> wrote:
>
> > Interesting idea - has anyone ever written an alternative scene
> > language for POV (e.g. OOP) that, when run, outputs a translation to
> > normal pov scene lang.?
>
> I have been playing around with this idea..."CSDL", or C-like Scene
> Description Language. It would be an object-oriented language with a
> vaguely C-like syntax(variable declaration style, {} blocks, flow
> control statements, etc).
> I would have a translator program that reads the CSDL files and outputs
> .pov files(the first version would execute the CSDL and output objects,
> but later versions might be able to translate some things like loops to
> POV code). Other features could be things like OpenGL previews.
>
> Unfortunately, I haven't found any good quick-start tutorials for Bison
> or Flex and nothing on using the versions of these tools available on
> the Mac(which seem to be very few, undocumented, and not up-to-date.).
> This shouldn't be a problem with OS X though...yet another advantage of
> a UNIX-based system. :-)
>
> --
> 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 <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) |