POV-Ray : Newsgroups : povray.general : Pov 4.00 question Server Time
7 Aug 2024 05:13:15 EDT (-0400)
  Pov 4.00 question (Message 41 to 50 of 73)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Ben Chambers
Subject: Possible POV Object Scheme (was Re: Pov 4.00 question)
Date: 1 Feb 2002 02:32:30
Message: <3c5a448e@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message
news:3c59a0c1@news.povray.org...
>   For example, we could have a base class called 'Vehicle' which is a
> generic concept. Then we could specialize a more concrete class 'Car' from
> it. A 'Car' is a 'Vehicle' by all means. 'Car' knows and supports
everything
> 'Vehicle' does. Everything that uses an object of the 'Vehicle' can use an
> object of type 'Car'.

To relate this (hypothetically) to POV, we could have:
Object
    Solid
        Infinite
            Plane
        Finite
            Sphere
            Box
            Cone
    Patch
        Poly
        Mesh
        Bicubic

(This is just a start, of course)

Hmm... Perhaps the "Solids" could be divided into prisms (defined by flat
surfaces, not sure what the technical term is) and curves.

...Chambers


Post a reply to this message

From: Ben Chambers
Subject: Re: Possible POV Object Scheme (was Re: Pov 4.00 question)
Date: 1 Feb 2002 02:38:30
Message: <3c5a45f6@news.povray.org>
"Ben Chambers" <bdc### [at] yahoocom> wrote in message
news:3c5a448e@news.povray.org...
<snip>

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 :)

...Chambers


Post a reply to this message

From: Warp
Subject: Re: Possible POV Object Scheme (was Re: Pov 4.00 question)
Date: 1 Feb 2002 07:37:49
Message: <3c5a8c1d@news.povray.org>
Ben Chambers <bdc### [at] yahoocom> wrote:
: To relate this (hypothetically) to POV, we could have:
: Object
:     Solid
:         Infinite
:             Plane
:         Finite
:             Sphere
:             Box
:             Cone
:     Patch
:         Poly
:         Mesh
:         Bicubic

  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.

-- 
#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: 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

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

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