POV-Ray : Newsgroups : povray.binaries.images : Re: Turning a spline into a smooth "sphere-sweep" mesh... : Re: Turning a spline into a smooth "sphere-sweep" mesh... Server Time
12 Aug 2024 03:22:43 EDT (-0400)
  Re: Turning a spline into a smooth "sphere-sweep" mesh...  
From: Mike Williams
Date: 15 Nov 2003 05:00:23
Message: <CZUzZAAYDet$Ewtg@econym.demon.co.uk>
Wasn't it Mike Williams who wrote:
>
>I've nearly got some code working. It works for your particular splines,
>but for some simple splines the points suddenly cross over to the other
>side of the tube. Each calculated point is an actual point on the
>surface, but the ring of points is twisted through 180 degrees.
>I guess that the problem might be something to do with the line
>        #declare drx1=arr0*vnormalize(vcross(vrotate(dr1,40),dr1));
>which I borrowed from your code without understanding it properly. If
>you have a spline that turns so that its direction (dr1) changes from
>angling slightly away from the origin to angling slightly towards it I
>think the vcross() suddenly points in the opposite direction.

If I reduce the vrotate vector from 40 to 1 then the flipping only seems
to happen on splines that have points where the direction is close to
<1,1,1>, but for the code to be generally useful it needs to be fixed so
that it never flips.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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