POV-Ray : Newsgroups : povray.beta-test : Twisted sp(l)ine : Re: Twisted sp(l)ine Server Time
30 Jul 2024 22:17:18 EDT (-0400)
  Re: Twisted sp(l)ine  
From: Mark Wagner
Date: 27 Sep 2001 00:21:25
Message: <3bb2a945@news.povray.org>
David Wallace wrote in message <3BB25EFE.719F8B0E@earthlink.net>...
>I hope this is just a user screw-up, but I think it bears mentioning.
>The spline calculations could well have some arcane bug.  Consider the
>test code below:


[code snipped]

>The code (as written) draws the outline of a shape similar to a Pac-Man
>ghost, which is what I want.  The second spline, spHull2, is supposed to
>draw something akin to an oval, but it draws weird curlicues near the
>middle (where the parameter is pi).  I've been racking my brain trying
>to find the error in my spline which causes this with no success.  So...
>can you untwist the knot in my spline via the code, or is the spline
>calculation in POV-Ray flawed?


The spline code in POV-Ray is working exactly as it should.  It just doesn't
work quite the way you expect it to.  POV-Ray's splines are actually the
combination of three splines: a "x as a function of time" spline, a "y as a
function of time" spline, and a "z as a function of time" spline, where
"time" is the first number in each spline entry.

What's happening in your case is that you are asking the "y as a function of
time" spline to turn a sharper corner than it is able to.  As a result, the
spline does the best it can, and produces those curlicues.  I'd suggest
fixing it by playing around with the exact positioning of the control
points, possibly adding or removing some.  Another solution would be to
split the spline into two splines.

--
Mark


Post a reply to this message

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