POV-Ray : Newsgroups : povray.general : Pov 4.00 question Server Time
7 Aug 2024 03:22:14 EDT (-0400)
  Pov 4.00 question (Message 44 to 53 of 73)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Christopher James Huff
Subject: Re: Pov 4.00 question
Date: 1 Feb 2002 15:54:54
Message: <chrishuff-CB0AAC.15560801022002@netplex.aussie.org>
In article <slr### [at] fwicom>,
 Ron Parker <ron### [at] povrayorg> wrote:

> POV can't have inheritance because it doesn't really have classes, and 
> you can't talk about inheritance without using the notion of a class.

Not true, prototype-based languages don't have classes. Objects inherit 
from other objects.
And in some languages that are closer to being class-based, the classes 
themselves are still objects. Not all languages are like C++ or Java.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

From: Christopher James Huff
Subject: Re: Possible POV Object Scheme (was Re: Pov 4.00 question)
Date: 1 Feb 2002 16:05:14
Message: <chrishuff-B924FE.16062801022002@netplex.aussie.org>
In article <3c5a45f6@news.povray.org>,
 "Ben Chambers" <bdc### [at] yahoocom> wrote:

> Of course, the more I think about it, the sillier I feel for not using
> multiple inheritance - a simple tree like that wouldn't give you everything
> you need :)

Multiple inheritance is not needed...many languages don't have it, but 
use other mechanisms.
Anyway, you're missing a branch:
object
    solid
    patch
    aggregate (CSG objects...not necessarily solid. Meshes are still 
patch objects.)

Things like global_settings, the camera, light sources, etc. would need 
modification to fit in this heirarchy, of course...that's if you want 
that. "object" could have the meaning of a language object instead of a 
shape.

object
    global_settings
    transformable_object
        texture, ...
        camera
        light_source
        shape
            solid, patch, aggregate...

Many of these would never be seen by the user, they would only exist to 
help categorize things.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

From: Christopher James Huff
Subject: Re: Pov 4.00 question
Date: 1 Feb 2002 16:06:51
Message: <chrishuff-877DAF.16080501022002@netplex.aussie.org>
In article <3C594F53.68A90D4B@namtar.qub.ac.uk>,
 Grey Knight <s16### [at] namtarqubacuk> wrote:

> Looks like CSDL might be the future. Not that it'll stop us hand-coding
> everything, but it's nice to have the option

Well, CSDL isn't made for scene description, it could be a bit awkward 
for that. It is a testbed for some ideas I have about the POV scene 
description language though.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

From: Christopher James Huff
Subject: Re: Pov 4.00 question
Date: 1 Feb 2002 16:35:17
Message: <chrishuff-31E2E7.16363101022002@netplex.aussie.org>
In article <3C592023.7D965CDC@namtar.qub.ac.uk>,
 Grey Knight <s16### [at] namtarqubacuk> wrote:

> Nice! What do I have to do to have a go at this stuff?

It's currently in very early alpha...very much in progress. It isn't far 
along enough to handle the code I posted, though it is close. I post 
announcements of releases and progress to this group.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

From: Jordan
Subject: Re: Possible POV Object Scheme (was Re: Pov 4.00 question)
Date: 1 Feb 2002 22:38:03
Message: <Xns91A8C7BB76A2Bhookflashhotmailcom@204.213.191.226>
>   The inheritance hierarchy in the C++ code of povray 4 will probably
>   look 
> something like that.
>   Of course it doesn't mean that the SDL will look like that.
> 

I *really* hope the sdl gets completely redone for pov 4.  Imo, an object-
oriented approach would be much cleaner & prettier.  I would love to see a 
more powerful sdl (cleaner (no more '{'s and '#'s, for example), user-
defined data types, fast, etc.) in pov 4.  It would also be neat if it were 
possible to implement a platform dependant jit compiler that could sort of 
"plug in" to an existing installation (like  Sun's "hotspot" thing).  Has 
anyone considered using an existing scripting language, such as Lua or 
Python, as the pov sdl?  This is *exactly* the sort of thing these langs 
were designed for.

Jordan

P.S.  Maybe someone should write a pov compiler that targets the CLR & 
.NET.  Just kidding...;-P


Post a reply to this message

From: Warp
Subject: Re: Possible POV Object Scheme (was Re: Pov 4.00 question)
Date: 2 Feb 2002 04:43:47
Message: <3c5bb4d3@news.povray.org>
Jordan <hookflash@_hotmail_.com> wrote:
: I *really* hope the sdl gets completely redone for pov 4.

  I don't. How many people out there do you think that will like that
none of their scenes will work with the new version and that they will have
to learn a completely new language?

:  Imo, an object-
: oriented approach would be much cleaner & prettier.

  OOP is not the solution for everything.
  I don't think the povray SDL would benefit too much from a full OO language.
  Some modularity could be good (user-defined abstract types with member
variables and methods, dynamic allocation, references...), but that's it.

:  I would love to see a 
: more powerful sdl (cleaner (no more '{'s and '#'s, for example)

  I don't understand why it would be "more powerful" and "cleaner" with
no '{'s and '#'s.
  Specially the lack of '{'s would make it uglier and harder to write and
read.
  (No, I *DON'T* want to start writing 'begin' and 'end' like in Pascal.)

-- 
#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: Thorsten Froehlich
Subject: Re: Possible POV Object Scheme (was Re: Pov 4.00 question)
Date: 2 Feb 2002 05:14:56
Message: <3c5bbc20@news.povray.org>
In article <3c5bb4d3@news.povray.org> , Warp <war### [at] tagpovrayorg>  wrote:

>   (No, I *DON'T* want to start writing 'begin' and 'end' like in Pascal.)

Worked great in DKBTrace...

    Thorsten


Post a reply to this message

From: Peter J  Holzer
Subject: Re: Pov 4.00 question
Date: 2 Feb 2002 10:01:13
Message: <slrna5npcm.1ag.hjp-usenet@teal.h.hjp.at>
On 2002-01-30 21:55, Warp <war### [at] tagpovrayorg> wrote:
> Jan Walzer <jan### [at] lzernet> wrote:
> : you mean, if it would something like the following, it wouldn't be OO ?
> 
>   Precisely. What you described is a typical modular language.
>   Modular languages (eg. Modula 2) can have classes, member variables,
> member functions, public and private parts, etc, but if they don't support
> inheritance and dynamic binding, they are not OO.

Modula 2 doesn't have classes (unless you have a very different concept
of "class" than me - to me a class is a set of similar things - if there
can by definition be only one thing per class, its not a class).
Modules are nothing more than name spaces. It does have dynamic binding, though.

	hp


-- 
   _  | Peter J. Holzer    |
|_|_) | Sysadmin WSR       | In case of emergency break laws of physics.
| |   | hjp### [at] hjpat         |
__/   | http://www.hjp.at/ | 	-- Stephen Baxter


Post a reply to this message

From: Christopher James Huff
Subject: Re: Possible POV Object Scheme (was Re: Pov 4.00 question)
Date: 2 Feb 2002 11:42:08
Message: <chrishuff-1C20F9.11432302022002@netplex.aussie.org>
In article <Xns### [at] 204213191226>,
 Jordan <hookflash@_hotmail_.com> wrote:

> I *really* hope the sdl gets completely redone for pov 4.  Imo, an object-
> oriented approach would be much cleaner & prettier.  I would love to see a 
> more powerful sdl (cleaner (no more '{'s and '#'s, for example),

No more '{'s? That would make it much harder to read, not to mention 
more typing. What would you do, replace them with "begin" and "end" 
keywords, like pascal?
I'd eliminate the existing #end keyword, replacing it with {} blocks. 
The "#" character would only be used for "preprocessor" directives.


> user- defined data types,

Just the ability to attach variables and macros to objects should be 
enough here...you could do things like a lens flare "object". If there 
were object references, you could even make a linked list...


> Has anyone considered using an existing scripting language, such as 
> Lua or Python, as the pov sdl?  

These languages aren't really made for scene description...you would 
have to modify them pretty heavily before you got something that looked 
like a scene description language instead of an API.
I've seen Lua before...it looks very interesting. It seems to base 
everything on associative arrays.


> This is *exactly* the sort of thing these langs were designed for.

Not really...

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

From: Kevin Wampler
Subject: Re: Possible POV Object Scheme (was Re: Pov 4.00 question)
Date: 2 Feb 2002 22:54:16
Message: <3C5CB5DB.7970FB10@u.arizona.edu>
Jordan wrote:
>  Has
> anyone considered using an existing scripting language, such as Lua or
> Python, as the pov sdl?

In the current scene I'm working on I have been using Icon extensively
to generate Pov code.  It's a bit awkward with vectors since there is no
operator overloading (so I have things like add(v1, v2)), but other
features of the language, especially backtracking combined with
goal-directed evaluation have made it quite worth my while.  While I do
think that there are many aspects of languages which could make Pov
scripting nicer and easier (I know there's some parts of Icon I would
love to have in there), for the most part I have found that writing
programs in other languages to output Pov code is not too much harder
(with the exception of some missing functions, like trace) than I
imagine writing in a modified Pov sdl would be.  After all,
macro("name", a, b, c, ... ) as I have been writing in Icon isn't much
harder than the #macro name(a, b, c , ... ) I would write in Pov.

	~Kevin Wampler~


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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