POV-Ray : Newsgroups : povray.general : CSG troubles : Re: CSG troubles Server Time
30 Jul 2024 10:16:18 EDT (-0400)
  Re: CSG troubles  
From: stevenvh
Date: 10 Mar 2009 07:00:01
Message: <web.49b64795da4bf64fc0721a1d0@news.povray.org>
"clipka" <nomail@nomail> wrote:
> "stevenvh" <nomail@nomail> wrote:
> > But I'm still wondering if CSG can't be extended in a future version of POV-Ray.
> > A 'cutaway' (or 'remove' or 'delete') could make CSG more fit for an
> > OO-approach. Something like this:
>
> I don't think it makes any sense to add such an extension to the SDL, because...
>
> (a) It leaves open a lot of questions; what happens, for example, if you merge
> two objects, and one of them want to cut away something where the other wants
> to add? A use case for the former could be decorations on a wall, that need to
> be cut away too in order to add a window; a use case of the latter could be
> some plant that you want to grow through an open window;
>
> (b) It probably cannot be done by a simple extension of the existing parser, and
> therefore would require significant changes also to the render engine; so
> assuming that probably not too many users think as much "OO-ish" as you do when
> writing POV code, I'd say it's probably not worth the hassle. You as one of the
> very few "OO-extremists" (pardon the expression - no offense intended) can
> rather easily work around this limitation by thinking a bit less "OO-ish", and
> the development team can concentrate on features that are of benefit to a
> larger portion of the users.
>   I do appreciate the benefits of OO, but I think adding kludges to the existing
> SDL to faciliate placing an OO-ish macro framework atop of it is the wrong way.
> Instead, if the development team would commit to actively supporting OO-ish
> scene description, then the way to go would really be a brand new SDL.

Let me start by answering your point b. I'm not familiar with the construction
of the pvengine, but I would never underestimate its complexity, and I won't
expect that this could be added overnight. Note that I say "a future version"
and not "the next version" :-)
To me it would be very useful, and I want to find out what the community thinks.
Call it OO or anything you want, but it appears that in a complex CSG you can't
keep all operations relating to a certain object together. IMO having
everything in a single object should result in less errors and a more readable
and maintainable code.

Your point a. I had thought about it and thought about it again :-), and I can't
see any ambiguity if you respect the order of the statements.
1. Construct a wall,
2. add decorations
3. remove everything constructed up till then within a certain volume and add
the window
Just make sure you add the plant afterwards.
Again I appreciate that this may not be easy within the current engine.

(A propos your musings about "a brand new SDL", I hardly dare to say this aloud,
but I actually wouldn't mind that. I have a strict programming background (both
procedural and event-driven), and the mix or procedural and descriptive
language sometimes confuses me, as does the loose and sometimes inconsistent
syntax and grammar.)

Thanks for your thoughts.
Regards,
Steven


Post a reply to this message

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