POV-Ray : Newsgroups : povray.general : Blobs help : Re: Blobs help Server Time
30 Jul 2024 16:23:59 EDT (-0400)
  Re: Blobs help  
From: SharkD
Date: 12 Nov 2008 21:30:00
Message: <web.491b902d2cced725ab9780f0@news.povray.org>
"SharkD" <nomail@nomail> wrote:
> The example blob function at the end of the isosurface tutorial behaves
> differently at different scales, as can be seen in the example below. This is
> not a problem with the built-in blob object. I was wondering if anyone could
> provide a better formula for when using isosurfaces? Thanks!

Success!

I managed through trial and error to eliminate the variables that caused the
function to be affected by scale.

#declare Blob_threshold = clock;
#declare Blob_start = 1;
#declare fn_A = function { (pow(x+1*Scene_scale,2) + pow(y,2) + pow(z,2) -
pow(1.5*Scene_scale,2)) / pow(Scene_scale,2) };
#declare fn_B = function { (pow(x-1*Scene_scale,2) + pow(y,2) + pow(z,2) -
pow(1.5*Scene_scale,2)) / pow(Scene_scale,2) };
#declare fn_C = function { (Blob_threshold + Blob_start) }
#declare fn_D = function { pow(Blob_threshold, fn_A(x,y,z)) +
pow(Blob_threshold, fn_B(x,y,z)) - fn_C(x,y,z) };
#declare fn_E = function { max(0,min(1,fn_D(x,y,z))) };

The next step is to duplicate the results of the internal "blob" object.


Post a reply to this message

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