POV-Ray : Newsgroups : povray.programming : POV 4 ideology proposal : Re: POV 4 ideology proposal Server Time
30 Jul 2024 10:12:13 EDT (-0400)
  Re: POV 4 ideology proposal  
From: Cliff Bowman
Date: 12 May 1999 15:26:13
Message: <3739a478.51689406@news.povray.org>
On 13 Apr 1999 18:57:55 +0200, rol### [at] casimirrezelenstfr (Roland
Mas) wrote:

>Mikael Carneholm <sa9### [at] idautbhbse> writes:
>
>> This is already pretty close to OO scripting!  (SomeSphere is the
>> "class" and it is instanced with object{})
>
>Sure.  Why change that?

?? Surely the scripting in POV 3.1 is pretty similar to that in 3.0,
or even the first version of POV scripting. why did they change it? To
improve on it's functionality.

>> Now, what we can't do with the current version is this:
>> 
>> #declare SomeSphere.position=SomeSphere.position+<0,1,0>;
>
>#declare SomeSphere = object { SomeSphere translate y }
>Does exactly it.

Not quite, I suspect. Isuspect the OOP example would change the
position property of the pre-defined object "SomeSphere" (which could
of course consist of googillions of sphere and/or other objects rather
than just 1 sphere) rather than creating a new object. Where memory is
tight or the object complex (or both) it might well be preferable to
adjust the properties of the object rather than declaring a whole new
object, or keeping texture, location, object etc. etc. seperate and
only combining them at "object placement time" (far more complex and
liable to user error IMO).

>> #declare SomeSphere.radius=1.5;
>
>I'm not sure it really cannot be done.

As long as the SomeSphere object is just a single sphere, seems easy
enough to do in POV script as is.

>> #declare SomeSphere.pigment=pigment{color rgb<0,0,1>};
>
>#declare SomeSphere = object { SomeSphere pigment{color rgb<0,0,1>} }
>Does exactly it.

Again, I could be wrong but I suspect the OOP line is modifying the
properties of an existing object where you are specifying how to
create an object with such-and-so properties (providing, IIRC, that it
isn't already textured/coloured).

>Anyway, what's the use of all that?  Want to have another sphere,
>redeclare it.  Or better, if it's another sphere, use another object.

Not necessarily ideal. Take making an asteroid out hundreds of
randomly jittered sperical blob components as an example. Simly
adjusting the texture might make a cloud of asteroids easier to do
than re-declaring each asteroid - especially if (for any reason) each
asteroid is meant to be identical in actual shape (oh it can be done -
but tedious for the modeller and computer alike).

Pov already has some dot notation. I'm not particularly familiar with
the POV scene description language, or very adept with it, but I'm
sure I've seen .x, .y, and .z used to retreive co-ordinate
information. What's the political argument against extending this
(already present) style of object data access?


Cheers,

Cliff Bowman
Why not pay my 3D Dr Who site a visit at
http://www.geocities.com/Area51/Dimension/7855/
PS change ".duffnet" to ".net" if replying via e-mail


Post a reply to this message

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