POV-Ray : Newsgroups : povray.general : Q: Can you #declare blob components? : Re: Q: Can you #declare blob components? Server Time
13 Aug 2024 05:44:59 EDT (-0400)
  Re: Q: Can you #declare blob components?  
From: Darius Davis
Date: 30 Oct 1998 05:23:00
Message: <363A8F72.4345@BEGONE.VILE.SPAMMERS.acm.org>
Dan Connelly wrote:
> What is the interpretation of the following ?
> 
> Dan
> 

[ code snipped to end of message ]

Hi,

I forgot to state this in my original post...  when a 'sub-blob' is
included in another blob with a different threshold, the sub-blob
component strengths are modified so that the *shape* of the sub-blob is
not changed.  (I figured that would be the most useful way of
interpreting this situation)  It uses the threshold values of both the
sub-blob and the 'parent' blob to perform that computation.  So in the
example below, the components of Blob1 (defined with threshold 0.5) are
merged into the second blob with their strengths doubled (I think), so
they appear 'the same' in the render.  I hope I've explained this well
enough... it's pretty complicated and it's been a few weeks since I
looked at the code in any detail.

Regarding the 'sturm' flag...  I hadn't even thought of it.  :)

I guess we could set the 'sturm' flag for the blob if any sub-blobs it
contains have sturm set.  Does this sound reasonable?  Unfortunately, my
implementation actually merges the *components* of the sub-blob into the
new blob, so it's not possible to have 'parts' of the blob 'sturm'ed in
the way the code below implies.

The same could also go for the 'heirarchy' flag perhaps - set
'heirarchy' if any of the sub-blobs have the 'heirarchy' flag set.

If anyone has any other suggestions for any sort of implementation of
these flags, I'll try my hardest to code it.  Once again, it's best to
get the syntax and semantics all fully specified before anything
'official' happens.

Cheers,

Darius Davis


> #declare Blob1 =
> blob {
>   sphere {...}
>   cylinder {...}
>   ... // more components, textures, transforms...
>   threshold 0.5
>   sturm
> }
> 
> blob {
>   sphere {...}
>   cylinder {...}
>   blob {Blob1}
> }


Post a reply to this message

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