POV-Ray : Newsgroups : povray.beta-test : wrong interpolation at start of spline : Re: wrong interpolation at start of spline Server Time
2 Nov 2024 17:18:41 EDT (-0400)
  Re: wrong interpolation at start of spline  
From: Mike Williams
Date: 24 Oct 2001 14:51:44
Message: <9ClktIAGzw17Ewa+@econym.demon.co.uk>
Wasn't it ingo who wrote:
> From the scene below the expected result is a square, yet I get a 
>thing like:
> ____
>|    |
>|  \ |
>|   \|
>
> When the first point of the spline is omitted, the result is a square. 
>I.M.O the first point should be of no influence when using a 
>linear_spline.
> When using a quadratic or cubic spline something simmiliar happens, 
>with the first point the shape is not closed. Without the first point 
>the shape is closed, but not smooth at the point where it closes.

The bug with splines that have 0 as a control value isn't fixed yet.

The workaround is to change your "0" control point into a small non-zero
value, like

#declare Spl=spline{
   -0.25,<0,1,0>,
    0.001,<0,0,0>, // instead of 0,<0,0,0>
    0.25,<1,0,0>,
    0.50,<1,1,0>,
    0.75,<0,1,0>,
    1,   <0,0,0>,
    1.25,<1,0,0>,
}

Which produces the square correctly.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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