POV-Ray : Newsgroups : povray.programming : A thought for 4.0 Server Time
28 Jul 2024 16:20:47 EDT (-0400)
  A thought for 4.0 (Message 1 to 10 of 29)  
Goto Latest 10 Messages Next 10 Messages >>>
From: David McCabe
Subject: A thought for 4.0
Date: 19 Sep 2002 01:18:05
Message: <3d895e0d@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello!

I don't know how far you are in the design process for 4.0, but assuming not 
very far at all, I just had an idea that you might like.

Rather then having some weird, limited, language with a lot of code to 
maintain, why not use some full-blown standard scripting language for scene 
description? We could have some API that the user would talk to in order to 
tell POV-Ray what stuff to put in the scene, just as we have language 
directives now.

This has several advantages:
1. The user gets a real scripting language that can do any kind of 
        calculations or functions or whatever, and can even integrate
        rendering with other tasks, automating something or other.
2. The user doesn't have to learn a new language, just a new API.
3. You get a high-quality interpeter for free. This would greatly reduce
        the size of POV-Ray, etc.

By choosing a language that has object-oriented features, you allow users
to do all kinds of fun stuff. At present, we have '.inc' files with
macros in them to do things. Put if they had classes in them, that
knew how to do things, such as animating themselves, or interacting
with others, the door is opened to many interesting and usefull
possibilities. Imagine describing large scenes in terms of high-level
objects that interacted and animated themeselves based on internal 
procedures. The possibilities here are great.

But I digress. Of course, that which I have just briefly described could be 
accomplished using a specialized language. The advantage of a normal 
language is that everyone gets stuff for free.

Anyway, my nominations for the language are (in this order):

1. Ruby
2. Python
3. Java

Look at his hypothetical Ruby snippet:


add Camera.new Vector.new(3,5,-10), Vector.new(0,0,0)
add PointLightSource.new Vector.new(30,30,-30), White.vector
add Plane.new x, -2, Texture.new( CheckerPigment(Black.vector,Red.vector) )
add Sphere.new Vector.new(0,0,0), 2, Texture.new(Yellow.pigment)
add SkySphere.new( GradientPigment( y, Colormap.new([0,SkyBlue.vector], \
        [1,Blue.vector])))
render


...Hmm, that looks a bit clunky; we'll try getting rid of the Vectors...


add Camera.new 3,5,-10, 0,0,0
add PointLightSource.new 30,30,-30, White
add Plane.new x, -2, Texture.new( CheckerPigment(Black,Red) )
add Sphere.new 0,0,0, 2, Texture.new( ColorPigment(Yellow) )
add SkySphere.new( GradientPigment( y, [0=>SkyBlue,1=>Blue] ) )
render

...rather than:


camera
{
        location <3,5,-10>
        look_at <0,0,0>
}

light_source
{
        <30,30,-30>,
        color White
}

plane
{
        x,-2
        texture
        {
                pigment{ checker Black Red }
        }
}

sphere
{
        <0,0,0>,2
        texture
        {
                pigment{ color Yellow }
        }
}

skysphere
{
        pigment
        {
                gradient y
                color_map
                {
                        [0 color SkyBlue]
                        [1 color Blue]
                }
        }
}

...Anyway, you get the idea of what it would look like. But it's really 
about being able to do any sort of task or calculation when making the 
scene.


Well, maybe you've all just been enlightened with a blinding stroke of 
genius, or maybe someone else has already suggested this, or maybe it's the 
stupidest thing ever. Anyhoo, I thought I'd mention it to you who know more 
than I do. Thanks for listening.

- -- 
David McCabe
http://12.225.144.95/pgpkey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9iV801bgGCL1rO04RAtLIAKDJqYTkESKHd36pK3xmkHDvsZy5gwCfc4XC
jSWQUlpGu/fRVqHJkFZJpKA=
=ZZQk
-----END PGP SIGNATURE-----


Post a reply to this message

From: Theo Gottwald *
Subject: some weird, limited, languages ...
Date: 19 Sep 2002 03:09:34
Message: <3d89782e$1@news.povray.org>
Where actually did you see "some weird, limited, language" ?
Do you write about POV 3.5 or did you  intermix something with
your JAVA / C++ Code-Book (hehehe) ? :-)

--Theo

----------------------------------------------------------------------------
---------------------------------
Distributed Network-Rendering or Local SMP-Rendering on all CPU's you have.
With SMPOV und POV-Ray 3.5. Download free at:
http://www.it-berater.org/smpov.htm


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: A thought for 4.0
Date: 19 Sep 2002 03:55:35
Message: <3d8982f7@news.povray.org>
In article <3d895e0d@news.povray.org> , David McCabe 
<dav### [at] myrealboxcom>  wrote:

> Rather then having some weird, limited, language with a lot of code to
> maintain, why not use some full-blown standard scripting language for scene
> description? We could have some API that the user would talk to in order to
> tell POV-Ray what stuff to put in the scene, just as we have language
> directives now.

Not again this discussion, please.  Look at the discussion of the past one
to two years and you will see this idea comes up about every three month or
so.  So look for all the arguments for and against it in those threads.


    Thorsten


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: A thought for 4.0
Date: 19 Sep 2002 04:15:09
Message: <3d89878d@news.povray.org>
Here are a few (not all, there have been other such discussions in other 
groups as well!), in no particular order:

From: "Vadim Sytnikov" <syt### [at] rucom>
Newsgroups: povray.programming
Subject: hash marks
Date: Tue, 12 Mar 2002 20:11:12 +0300
Message-ID: <3c8e36b2@news.povray.org>
Xref: news.povray.org povray.programming:5894


From: "Roberto Ferrer de Amorim" <ram### [at] comdescontocombr>
Newsgroups: povray.programming
Subject: Python and POVRay
Date: Mon, 12 Mar 2001 12:30:43 -0300
Message-ID: <3aacebd9$1@news.povray.org>
Xref: news.povray.org povray.programming:5163


From: ken### [at] uniplanit (Angelo 'kENpEX' Pesce)
Newsgroups: povray.programming
Subject: Povray 4? wish list
Date: Mon, 03 Dec 2001 17:20:19 GMT
Message-ID: <3c0baf07.22135953@news.povray.org>
Xref: news.povray.org povray.programming:5465


From: "Arie L. Stavchansky" <ari### [at] bellatlanticnet>
Newsgroups: povray.programming
Subject: Question about future version and coding
Date: Thu, 4 Oct 2001 10:16:16 -0400
Message-ID: <3bbc6f18@news.povray.org>
Xref: news.povray.org povray.programming:5372


Message-ID: <39747AD8.E2567B43@itam.cas.cz>
Date: Tue, 18 Jul 2000 17:42:16 +0200
From: Vaclav Cermak <dis### [at] itamcascz>
Newsgroups: povray.programming
Subject: Object oriented POV scene language?
Xref: news.povray.org povray.programming:4483


Message-ID: <399C8823.DD03EB6F@vrml.k12.la.us>
Date: Thu, 17 Aug 2000 17:49:39 -0700
From: Abe Heckenbach <abe### [at] vrmlk12laus>
Newsgroups: povray.programming,povray.general
Subject: object oriented features
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Xref: news.povray.org povray.programming:4620 povray.general:23862


Post a reply to this message

From: Christopher James Huff
Subject: Re: A thought for 4.0
Date: 19 Sep 2002 09:10:35
Message: <chrishuff-E4B27E.09081219092002@netplex.aussie.org>
In article <3d895e0d@news.povray.org>,
 David McCabe <dav### [at] myrealboxcom> wrote:

> 1. The user gets a real scripting language that can do any kind of 
>         calculations or functions or whatever, and can even integrate
>         rendering with other tasks, automating something or other.

A "real scripting language"? How is POV not "real"?
Also, there are security issues...if it can do anything, it can do 
ANYTHING.


> 2. The user doesn't have to learn a new language, just a new API.

You assume the user already knows the language. Most users of POV don't 
have any programming experience other than POV.


> 3. You get a high-quality interpeter for free. This would greatly reduce
>         the size of POV-Ray, etc.

How would it make POV smaller? Instead of POV interpreter + POV core, 
you end up with POV core + generic interpreter + lots of glue code.


> But I digress. Of course, that which I have just briefly described could be 
> accomplished using a specialized language. The advantage of a normal 
> language is that everyone gets stuff for free.

The disadvantage: you get what you get. You can then mutate it into a 
custom language, making it more suited for your purposes but harder to 
update and losing compatibility with the "official" language, or you can 
stumble along with the unmodified version.


> Anyway, my nominations for the language are (in this order):
> 
> 1. Ruby

Not really designed to be embedded in another application, possible to 
do but awkward. I think Matz is working on making this easier.


> 2. Python

***gags***


> 3. Java

Most likely for a programmer to know, probably the fastest, but I'd hate 
to use it for scene description.


As someone else mentioned, it has been discussed many, many times 
before, but I'll say this anyway: the advantage of POV-script is that it 
is built for scene description. For example: in those languages you 
either have to create a class for vectors (which makes using them clumsy 
and takes lots of typing for the simplest things) or give up vectors 
completely, using the terrible solution of specifying 3 floats all the 
time (making it hard to tell a vector from a bunch of floats and making 
vector math nearly impossible, making bugs in math code almost certain 
for things that are extremely simple in POV).

Also, you get a pre-built language that is more powerful than the 
existing POV language, which is also harder to use for the simplest 
scene description tasks which don't require any programming and harder 
for non-programmers to learn. I started CSDL/Sapphire as a scene 
description language, and though I now think it is too complex for this 
use, I think it would be far better than any of the languages you 
mentioned simply because it supports vectors.

I think any new scene description language will have to be something 
like POV: partly a simple markup language or human-editable data format, 
with a scripting language and built-in support for vectors. Object 
oriented as well...POV is almost there, it could become a 
prototype-based OOL with just a few modifications.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Warp
Subject: Re: A thought for 4.0
Date: 19 Sep 2002 10:13:56
Message: <3d89dba4@news.povray.org>
I agree with everything Chris Huff said.

  Also, I don't like your tone of voice at all. For example:

> 1. The user gets a real scripting language

  So the POV-Ray does not have a real scripting language. What is it then?

  Then your example is quite unfair:

> add Camera.new 3,5,-10, 0,0,0
> add PointLightSource.new 30,30,-30, White
> add Plane.new x, -2, Texture.new( CheckerPigment(Black,Red) )
> add Sphere.new 0,0,0, 2, Texture.new( ColorPigment(Yellow) )
> add SkySphere.new( GradientPigment( y, [0=>SkyBlue,1=>Blue] ) )
> render

> ...rather than:


> camera
> {
>         location <3,5,-10>
>         look_at <0,0,0>
> }
[snip]

  First you write one-liners in the proposed language and then you write
the "equivalent" with pov sdl using a lot of whitespace, indenting and
putting every item in their own lines. It's like you wanted to trick the
readers to think that your proposition is a lot more compact and thus better,
when if fact it isn't.

  And what's all that obsession about using 'new' everywhere? As far as I
can see, every single 'new' you used in your proposition is obsolete and
unnecessary.
  You have probably coded too much in Java.

  Just a tip: When you want to make a suggestion, revise your attitude.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: David McCabe
Subject: Re: A thought for 4.0
Date: 19 Sep 2002 11:55:59
Message: <3d89f38f@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Excuse me. I did not in any way intend to sound rude, arrogent, or whatever. 
In fact, I think you've misinterpeted me altogether. Notice the last 
paragraph, in which I say, "maybe it's the stupidest thing ever. Anyhoo, I 
thought I'd mention it to you who know more than I do.".

By 'real', what I meant was, well, standard, or fully able to do anything, 
almost general-purpose at least, as in "PostScript is unreal (you could 
write a program in it, but it would be hard)".

The examples are not unfair; that is simply how I always style code in Ruby, 
and how I always style code in POV-SDL. In Ruby you have to do stuff to 
split things over multipal lines. But I've never seen a lot of POV-SDL code 
with everything on one line. No, everybody seems always to space and intend 
and stuff.

Anyway, please understand that my attitude is and was in no way negitive 
whatsoever.

Warp wrote:

>   I agree with everything Chris Huff said.
> 
>   Also, I don't like your tone of voice at all. For example:
> 
>> 1. The user gets a real scripting language
> 
>   So the POV-Ray does not have a real scripting language. What is it then?
> 
>   Then your example is quite unfair:
> 
>> add Camera.new 3,5,-10, 0,0,0
>> add PointLightSource.new 30,30,-30, White
>> add Plane.new x, -2, Texture.new( CheckerPigment(Black,Red) )
>> add Sphere.new 0,0,0, 2, Texture.new( ColorPigment(Yellow) )
>> add SkySphere.new( GradientPigment( y, [0=>SkyBlue,1=>Blue] ) )
>> render
> 
>> ...rather than:
> 
> 
>> camera
>> {
>>         location <3,5,-10>
>>         look_at <0,0,0>
>> }
> [snip]
> 
>   First you write one-liners in the proposed language and then you write
> the "equivalent" with pov sdl using a lot of whitespace, indenting and
> putting every item in their own lines. It's like you wanted to trick the
> readers to think that your proposition is a lot more compact and thus
> better, when if fact it isn't.
> 
>   And what's all that obsession about using 'new' everywhere? As far as I
> can see, every single 'new' you used in your proposition is obsolete and
> unnecessary.
>   You have probably coded too much in Java.
> 
>   Just a tip: When you want to make a suggestion, revise your attitude.
> 

- -- 
David McCabe
http://12.225.144.95/pgpkey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9ifTP1bgGCL1rO04RAhjmAKC5cW8/eNKIPRR212wp6Coll2AglwCfSnh5
ZSr2fdy9TKKjlSUIoDblgg8=
=VPQ/
-----END PGP SIGNATURE-----


Post a reply to this message

From: David McCabe
Subject: Re: A thought for 4.0
Date: 19 Sep 2002 12:08:24
Message: <3d89f678@news.povray.org>
Christopher James Huff wrote:

> In article <3d895e0d@news.povray.org>,
>  David McCabe <dav### [at] myrealboxcom> wrote:
> 
>> 1. The user gets a real scripting language that can do any kind of
>>         calculations or functions or whatever, and can even integrate
>>         rendering with other tasks, automating something or other.
> 
> A "real scripting language"? How is POV not "real"?
> Also, there are security issues...if it can do anything, it can do
> ANYTHING.
POV is not real...because it can't do everythingor it makes it really hard. 
POV is like PostScript, which you wouldn't exactly call a scripting 
language, even though it can do that kind of thing to some degree.

Security is an issue whever you are writing a program. How is writing a 
script for POV less secure then writing a script that runs alone?

> 
> 
>> 2. The user doesn't have to learn a new language, just a new API.
> 
> You assume the user already knows the language. Most users of POV don't
> have any programming experience other than POV.
OK.

> 
> 
>> 3. You get a high-quality interpeter for free. This would greatly reduce
>>         the size of POV-Ray, etc.
> 
> How would it make POV smaller? Instead of POV interpreter + POV core,
> you end up with POV core + generic interpreter + lots of glue code.
No, the interpreter would be an *external dependency* (get used to it :-).



>> But I digress. Of course, that which I have just briefly described could
>> be accomplished using a specialized language. The advantage of a normal
>> language is that everyone gets stuff for free.
> 
> The disadvantage: you get what you get. You can then mutate it into a
> custom language, making it more suited for your purposes but harder to
> update and losing compatibility with the "official" language, or you can
> stumble along with the unmodified version.
Sure. That is a disadvantage, and a really big one too, such that it really 
kills the idea.


>> Anyway, my nominations for the language are (in this order):
>> 
>> 1. Ruby
> 
> Not really designed to be embedded in another application, possible to
> do but awkward. I think Matz is working on making this easier.
it's a good language, however. 


>> 2. Python
> 
> ***gags***
Here, here! I would prefer Java 1000 times, but the syntax would be *so* 
clunky for an SDL application.


>> 3. Java
> 
> Most likely for a programmer to know, probably the fastest, but I'd hate
> to use it for scene description.
So would I, or it would be nomination #1.

> 
> 
> As someone else mentioned, it has been discussed many, many times
> before,
Pordon me. I'm new.

> but I'll say this anyway: the advantage of POV-script is that it
> is built for scene description. For example: in those languages you
> either have to create a class for vectors (which makes using them clumsy
> and takes lots of typing for the simplest things) or give up vectors
> completely, using the terrible solution of specifying 3 floats all the
> time (making it hard to tell a vector from a bunch of floats and making
> vector math nearly impossible, making bugs in math code almost certain
> for things that are extremely simple in POV).
Yeah.

> 
> Also, you get a pre-built language that is more powerful than the
> existing POV language, which is also harder to use for the simplest
> scene description tasks which don't require any programming and harder
> for non-programmers to learn. I started CSDL/Sapphire as a scene
> description language, and though I now think it is too complex for this
> use, I think it would be far better than any of the languages you
> mentioned simply because it supports vectors.
OK.


> I think any new scene description language will have to be something
> like POV: partly a simple markup language or human-editable data format,
> with a scripting language and built-in support for vectors. Object
> oriented as well...POV is almost there, it could become a
> prototype-based OOL with just a few modifications.
Okay, that's fine. But please make sure we get good OO features.

-- 
David McCabe
http://12.225.144.95/pgpkey


Post a reply to this message

From: Artis
Subject: Re: A thought for 4.0
Date: 19 Sep 2002 12:48:36
Message: <3d89ffe4@news.povray.org>
>> 2. Python
> 
> ***gags***

I agree that POV is better off with the SDL. But what do you have against 
Python in general?


Post a reply to this message

From: Christopher James Huff
Subject: Re: A thought for 4.0
Date: 19 Sep 2002 15:21:54
Message: <chrishuff-9F11E5.15201819092002@netplex.aussie.org>
In article <3d89ffe4@news.povray.org>, Artis <art### [at] aaaapollolv> 
wrote:

> I agree that POV is better off with the SDL. But what do you have against 
> Python in general?

It's Python.
I mainly hate the significance of white space as syntax, lack of visible 
block endings, and (in my opinion) horrible attempt at OO. That and the 
rest of the language.
Python has been suggested before, read my comments in those threads. If 
POV used Python, I wouldn't use POV.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.