POV-Ray : Newsgroups : povray.beta-test : Strange spline problem : Re: Strange spline problem Server Time
4 Nov 2024 13:01:26 EST (-0500)
  Re: Strange spline problem  
From: Gilles Tran
Date: 22 Dec 2001 15:32:27
Message: <3c24eddb$1@news.povray.org>

Xns### [at] povrayorg...
> When I render the scene below, without changing anything, just hit the
> run button, the first three times all is ok, the fourth time the shape
> has changed and from then on it keeps changing.
>  I reported this during the pre-beta period and no one could reproduce
> it then. Now I ran into the problem again.

For the record, I just lost an hour trying to figure out a similar
problem...
I suspect that a variable is not reset properly between renders.

In the complete scene where the spline below is placed, subsequent renders
sometimes return an error saying that the base and apex points of the
cylinder are identical (and stop the parsing). It's not repeatable : the
problem appear at random with identical renders of the image.
I've been able to trap the problem by testing the base and apex point (so
that at least the parsing doesn't stop).
When the problem occurs, all the values for the spline value are <2,2,2>.
The scene where the problem appears is very large and because the bug is
random I've not been able to simplify it in a way that make it appear each
time (it doesn't appear with the code below).


3.5 beta 9, winnt 4 sp6


#declare rFil=0.007;
#declare xFil=2.5;
#declare spFil =
  spline {
    cubic_spline
    -0.15,<0,-0.35,0>,
    0,<0,-0.3,0>,
    0.1,<xFil*0.2,-0.2,0>,
    0.2,<xFil*0.3,-0.1,0>,
    0.3,<xFil*0.45,-0.0,0>,
    0.4,<xFil*0.55,0,0>,
    0.5,<xFil*0.6,-0.03,0>,
    0.6,<xFil*0.7,0,0>,
    0.7,<xFil*0.8,-0.08,0>,
    0.8,<xFil*0.9,0,0>,
    0.9,<xFil,0,0>,
    1.1,<xFil*1.1,-0.1,0>,
  }

union{
    #declare i=0;
    #while (i<1)
        cylinder {spFil(i), spFil(i+0.01),rFil}
        #declare i=i+0.01;
    #end
    pigment{rgb 1}
}

camera{
    location  <1.25, 0.2, -1.5>
    direction z*1.2
    right     image_width*x/image_height
    look_at   <1.25,0.2,  0>
}

background{rgb y+z}
light_source{<15,2,-4> color rgb 1}


--

**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message

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