POV-Ray : Newsgroups : povray.general : Blobs help : Re: Blobs help Server Time
30 Jul 2024 16:16:58 EDT (-0400)
  Re: Blobs help  
From: SharkD
Date: 10 Nov 2008 21:25:00
Message: <web.4918ec8c2cced725aa1dde120@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!

I found to equations that fit the bill. However, I don't know which one to
choose. Both are said to model the behavior of electric fields. One is from
Wikipedia, the other is from a GameDev.net article.


Here is the first:

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


Here is the second:

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


Which of the two is correct in terms of modeling nature?

-Mike


Post a reply to this message

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