POV-Ray : Newsgroups : povray.general : Smooth spline curve : Re: Smooth spline curve Server Time
30 Jul 2024 10:24:06 EDT (-0400)
  Re: Smooth spline curve  
From: clipka
Date: 6 Mar 2009 08:05:00
Message: <web.49b11efae24f50f38f505d3e0@news.povray.org>
"twister" <twi### [at] o2pl> wrote:
> works almost perfectly, but my idea is to have a curve following exactly my
> points. I know splines work this way, but when I want a curve that is straight
> initialy and turns to the right after some length I get a little left bend and
> next expected right bend. Is it possible to create needed smooth (it means no
> linear and quadratic splines can be used) curve?

Such effects are basically inevitable if you try to control a spline solely by a
set of points it is to "touch": You obviously give the spline full freedom over
the tangents at those points, and it *will* use this freedom, possibly in a way
you didn't intend. (Unless, of course, you already planned for this effect when
chosing the points.)

By taking a small left turn first, the spline reduces its overall "strain". So
what you can do to minimize this effect is move the last control point on the
straight line inward a bit, to get a softer transition into the curve.

There is nothing you can do in the macro code itself. This is a systematic
problem you will get with any spline type you can possibly imagine: Even if you
chose a spline type that gave you more control over the direction in a specific
point (e.g. Bezier splines), your macro still lacks the user input to decide
how to make any use of it.


Post a reply to this message

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