POV-Ray : Newsgroups : povray.bugreports : blob bug Server Time
31 Oct 2024 16:16:40 EDT (-0400)
  blob bug (Message 1 to 1 of 1)  
From: Thorsten Froehlich
Subject: blob bug
Date: 9 Sep 2000 22:22:22
Message: <39baf05e@news.povray.org>
The bug has been found by:

>From: Tor Olav Kristensen <tto### [at] onlineno>
>Newsgroups: povray.binaries.images
>Subject: Two broken Blobs (Bug ?) (8KB)
>Date: Mon, 4. Sep 2000 15:30 Uhr
>
> Several combinations of threshold, strength
> scaling and rotations seem to do this to my
> blobs  :((
>
> Can anyone explain what is going in here.
> See code below.
>


A bug fix has been suggested by:

>From: "J. Grimbert" <jgr### [at] atos-groupcom>
>Newsgroups: povray.general
>Subject: Re: explanation of a blob bug
>Date: Fre, 8. Sep 2000 2:28 Uhr
>
> --- blob.c.old  Thu Sep  7 18:41:28 2000
> +++ blob.c      Thu Sep  7 18:44:55 2000
> @@ -2468,7 +2468,8 @@
>  static void get_element_bounding_sphere(BLOB_ELEMENT *Element, VECTOR Center,
> DBL *Radius2)
>  {
>    DBL r, r2 = 0.0;
> -  VECTOR C, H;
> +  VECTOR C;
> +  BBOX local_BBox;
>
>    switch (Element->Type)
>    {
> @@ -2514,12 +2515,10 @@
>
>      MTransPoint(C, C, Element->Trans);
>
> -    Make_Vector(H, r, r, r);
> -
> -    MTransDirection(H, H, Element->Trans);
> -
> -    r = max(max(fabs(H[X]), fabs(H[Y])), fabs(H[Z]));
> -
> +    Make_BBox(local_BBox ,0,0,0,r,r,r);
> +    Recompute_BBox(&local_BBox, Element->Trans);
> +    r= max(max(fabs(local_BBox.Lengths[X]),fabs(local_BBox.Lengths[Y])),
> +               fabs(local_BBox.Lengths[Z]));
>      r2 = Sqr(r) + EPSILON;
>    }

I have been able verify this bug and the provided bug fix.  The bug is the
same as in job000061, and the bug fix also corrects the behaviour I
observed.


      Thorsten


Post a reply to this message

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