POV-Ray : Newsgroups : povray.beta-test : RC4 quick summary of my reports : Re: RC4 quick summary of my reports Server Time
29 Jul 2024 18:16:25 EDT (-0400)
  Re: RC4 quick summary of my reports  
From: Gleb
Date: 10 May 2002 09:44:18
Message: <3cdbceb2@news.povray.org>
"Thorsten Froehlich" <tho### [at] trfde> wrote in message
news:3cda9ef6@news.povray.org...
> In article <3cda78bf$1@news.povray.org> , "Gleb" <gk1### [at] sotonacuk> wrote:
>
> A Catmull-Rom spline can extend "beyond" its control points.  It is not a
> matter of converting to some other spline type.  The problem is to
determine
> the bounds of a Catmull-Rom spline segment by just looking at the control
> points, which is simply not possible due to the nature of this spline
type.
>
> To clarify my original point:
>
> This is not going to be fixed because nobody in the team has the time to
look
> into this mess.  Making wild suggestions won't help ;-)
>
> Only plain and simple source code, based on the available sphere_sweep
code
> that can be found in MegaPOV, if contributed by someone _soon_, will fix
the
> problem in the initial 3.5 release.  The code was already been broken in
the
> original patch :-(  Its author apparently did not know a good way how to
fix
> it either, so don't expect magic from us!

Why not ;)


Thank you for pointing the source,
it would be easier to explain what I mean.

In the source mentioned every spline segment
of this scaring Catmull-Rom spline
is internally represented as four polynomial coefficients, say
a3, a2, a1 and a0. Actual curve segment is calculated
as a3*t^3+a2*t^2+a1*t+a0. And every such a segment has two
control points at its ends from original definition.
And of course, the curve can escape the set of original control points.
What I'm talking about is that there are two "additional control points"
hidden inside this polynomial, because the same beast can also be
represented as
a3*t^3+a2*t^2+a1*t+a0 = A*(1-t)^3+3*B*t*(1-t)^2+3*C*t^2*(1-t)+D*t^3
which is the other scaring thing, Bezier spline segment.
In this form(for exactly the same curve) we have four control points,
A, B, C, D, where A and D are the same as the original Catmull-Rom spline
segment control points, but we also have two additional control points,
B and C. And our segment now can't escape the convex hull
of that set of the four control points.
And if there is already working code for calculating the bounding box
for Bezier spline segments, we can feed it with these four control
points - that's all.

On the other hand the method suggested by Tor Olav may be even better
(more precise).


Regards,

Gleb


Post a reply to this message

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