POV-Ray : Newsgroups : povray.general : Pov 4.00 question Server Time
7 Aug 2024 05:22:41 EDT (-0400)
  Pov 4.00 question (Message 34 to 43 of 73)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Warp
Subject: Re: Pov 4.00 question
Date: 31 Jan 2002 10:54:55
Message: <3c5968cf@news.povray.org>
Felix Wiemann <Fel### [at] gmxnet> wrote:
: Although pseudo-OOP would be a good idea (to acces elements like
: MyObject.Part1.finish.phong).

  What is "pseuso-OOP" and what does it have to do with getting individual
components of a module/structure?

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Pov 4.00 question
Date: 31 Jan 2002 11:02:02
Message: <3c596a7a@news.povray.org>
In article <3c594865@news.povray.org> , "Felix Wiemann" 
<Fel### [at] gmxnet> wrote:

> Also, the POV-Ray parser is not very fast. OOP would make parsing even
> slower.

Sorry to say, but you don't know what your are talking about.  The parser
isn't slow, memory allocation for objects is slow.  It has been a topic in
these groups more than once.

Please note that 4.0 has been a topic of pointless discussion more than once
as what you say or don't say will not be considered for 4.0 in the first
place.  This has been made clear in various official statements. For example:

From: "Chris Cason"
Newsgroups: povray.announce.frequently-asked-questions
Subject: POV-Team Status Report - September 1, 2000
Date: Sun, 3 Sep 2000 22:29:58 +1100
Message-ID: <39b2364b@news.povray.org>
Xref: news.povray.org povray.announce.frequently-asked-questions:40


    Thorsten


Post a reply to this message

From: Felix Wiemann
Subject: Re: Pov 4.00 question
Date: 31 Jan 2002 12:39:35
Message: <3c598157@news.povray.org>
> That's why you use object constructors :)

But these constructors had to be pre-defined by POV-Ray, I meant.


Post a reply to this message

From: Felix Wiemann
Subject: Re: Pov 4.00 question
Date: 31 Jan 2002 12:43:07
Message: <3c59822b$1@news.povray.org>
>   What is "pseuso-OOP" and what does it have to do with getting
> individual components of a module/structure?

You're right, "pseudo-OOP" is not the right word, better is "using of
structs".


Post a reply to this message

From: Alan Holding
Subject: Re: Pov 4.00 question
Date: 31 Jan 2002 14:11:41
Message: <3c5996ed@news.povray.org>
"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3c57d5a1@news.povray.org...
> Just out of curiousity....

Pardon me for speaking out of turn, because most of the people contributing
to this thread seem pretty on the ball with their languages, but doesn't POV
has a basic sort of inheritance anyway?

#local MySphere1=sphere {0 1 pigment {rgb 1}}

#local MySphere2=object {MySphere1 pigment {rgb 0}}

MySphere1 and MySphere2 come out different.  If you want cascading changes
similar to classes why not have something like:

#local MySphere2=object {MySphere1 inherit {all | include {some things or a
#declared collection of things} | exclude {other things or a #declared
collection of things} }

I know this kind of inheritance doesn't work for things like mesh2 objects
and their textures, but I think something like the above would make for more
friendly, and tighter, script than the other hypothetical examples posted in
this thread.

Or am I talking tosh?


Post a reply to this message

From: Ron Parker
Subject: Re: Pov 4.00 question
Date: 31 Jan 2002 14:14:17
Message: <slrna5j5s9.gt.ron.parker@fwi.com>
On Thu, 31 Jan 2002 19:12:28 -0000, Alan Holding wrote:
> Pardon me for speaking out of turn, because most of the people contributing
> to this thread seem pretty on the ball with their languages, but doesn't POV
> has a basic sort of inheritance anyway?

Yes, sort of, but not in the way you use the term when speaking of OO.  
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.

-- 
#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbf 1}hollow interior{media{emission 3-T}}}#end 
Z(-x-x.2x)camera{location z*-10rotate x*90normal{bumps.02scale.05}}


Post a reply to this message

From: Warp
Subject: Re: Pov 4.00 question
Date: 31 Jan 2002 14:53:37
Message: <3c59a0c1@news.povray.org>
Alan Holding <tro### [at] tiscalicouk> wrote:
: #local MySphere2=object {MySphere1 inherit {all | include {some things or a
: #declared collection of things} | exclude {other things or a #declared
: collection of things} }

  This is the wrong concept of inheritance.
  Inheritance is not "make an object including some features of another
object and excluding other features, or changing some of the features".

  Inheritance is spezialization. A base class is a more generic concept
and an inherited class is specialization, ie. a more concrete version of
that concept. The inherited class is, by all means, a base class (with
some additions, implementations or specializations).
  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'.

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

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

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