POV-Ray : Newsgroups : povray.general : Q: Can you #declare blob components? : Re: Q: Can you #declare blob components? Server Time
16 Nov 2024 01:19:52 EST (-0500)
  Re: Q: Can you #declare blob components?  
From: =Bob
Date: 29 Oct 1998 15:28:39
Message: <3638cff7.0@news.povray.org>
A definate "Yes" to the idea of nested blobs.
Didn't think it possible.
Also, I didn't realize before that a single component could be used, not that 
its useful.

Message <363### [at] NOSPAMTHANKSacmorg>, Darius Davis  typed...
>
>Michael Andrews wrote:
>
>>     Well I think the subject says it all; is it possible to #declare a
>> blob component?
>
>I've got some code to do this - I'm just giving it some final testing
>and bug-fixing and then I'm going to send it to Chris Young for
>inclusion in the next version.  I've already discussed this with him and
>he's keen to add this feature as well.
>
>My code allows you to do something like this:
>
>#declare Blob1 =
>blob {
>        sphere {...}
>        cylinder {...}
>        ... // more components, textures, transforms...
>}
>
>#declare Blob2 =
>blob {
>        sphere {...}
>        cylinder {...}
>        blob {Blob1} // incorporate blob1 here!!!
>        ... // etc...  more components or more 'included' blobs
>}
>
>It allows all textures and transformations in the same way as CSGs are
>handled, and it handles multi-textured blobs in a simple, logical
>fashion.  Textures can be specified either in Blob1, Blob2, both or
>neither.  So this is legal...
>
>#declare Blob1 =
>blob {
>        sphere {...}
>        cylinder {...}
>        ...
>}
>
>#declare Blob2 =
>blob {
>        blob {Blob1 texture {...}} // incorporate blob1 here!!!
>        blob {Blob1 texture {...} scale <-1, 1, 1>} // mirror blob1 here!!!
>}
>
>And it allows these sorts of constructs, just like CSG unions, to group
>components and transform them collectively...
>
>blob {
>        sphere {...}
>        cylinder {...}
>        blob {
>                sphere {...}
>                cylinder {...}
>                translate ...  scale ...
>        }
>        translate ... scale ...
>}
>
>Blobs can be 'nested' to whatever depth time and memory permit.
>
>Although it doesn't actually allow you to #declare a single component
>itself, you can always #declare a blob that contains just one component,
>and then use that #declared component anywhere just like in the example
>above.
>
>And I thought I was the only person in the world who wanted to use such
>a feature!
>
>I'd like some feedback on whether the above syntax examples are
>sufficient, and what sorts of deficiencies it might have... I guess it's
>best to get this sorted out fully before it's merged into POV itself!
>
>Cheers, and merry POVing to all,
>
>
>Darius Davis

-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/POVring.html
=Bob


Post a reply to this message

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