POV-Ray : Newsgroups : povray.general : Weird rand() quirk? : Re: Weird rand() quirk? Server Time
13 Aug 2024 03:20:10 EDT (-0400)
  Re: Weird rand() quirk?  
From: Dan Connelly
Date: 17 Nov 1998 03:27:50
Message: <36513388.8F9DAE21@flash.net>
Chris Colefax wrote:

> cone {<-0.020957, 0, 0>, 0.299520, <-0.021942, 0, 1>, 0.298920}
>
> which can be reduced to:
> 
>    cone {<0, 0, 0>, 100, <4, 0, 1000>, 99}


I wonder if this is a problem related to the W95 code's high value
of epsilon, similar to the sphere problem.  If so it should not show
up in the UNIX and Mac versions, bothe of which have lower values.

The W95 version has EPSILON of 1e-5, quite a high value.  Then
the code has a line of the form, in cones.c :

  {
    /* Solve intersections with a cone */

    a = D[X] * D[X] + D[Y] * D[Y] - D[Z] * D[Z];

    b = D[X] * P[X] + D[Y] * P[Y] - D[Z] * P[Z];

    c = P[X] * P[X] + P[Y] * P[Y] - P[Z] * P[Z];

    if (fabs(a) < EPSILON)
    {
      if (fabs(b) > EPSILON)
      {
        /* One intersection */


It isn't hard to see how this coule encounter problems with
differences in radius of 10^-3.

I strongly suspect this is another problem with the large epsilon value,
similar to the ellipsoid route problem already reported in 
news://news.povray.org/povray.bugreports .

Dan
-- 
http://www.flash.net/~djconnel/


Post a reply to this message

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