POV-Ray : Newsgroups : povray.object-collection : Sphere Sweep 1.2 Quadratic spline question : Re: Sphere Sweep 1.2 Quadratic spline question - STOP THE PRESS! Server Time
26 Jul 2024 20:28:55 EDT (-0400)
  Re: Sphere Sweep 1.2 Quadratic spline question - STOP THE PRESS!  
From: Bald Eagle
Date: 8 Sep 2020 13:40:01
Message: <web.5f57c110ccb2d7aa1f9dae300@news.povray.org>
Cousin Ricky <ric### [at] yahoocom> wrote:

> That is wrong!  Something didn't look right about the curve, so I went
> back and double-checked the Bézier theory.  The correct solution is this:
>
>    SphereSweep_Approx
>    ( SSWP_BEZIER_SPLINE,
>      array { P1, P2 * 2/3 + P1 / 3, P2 * 2/3 + P3 / 3, P3 },
>      array { Line, Line, Line, Line}, 100, 0
>    )
>
> I will post an example illustration in p.b.i.

Without picking through the underlying code of the spheresweep, I'll just say
that the curve indeed looks correct, but (now, to me,)
array { P1, P2 * 2/3 + P1 / 3, P2 * 2/3 + P3 / 3, P3 }
does not.

Since a Bezier spline uses some fraction of all of the control points across the
entire spline (except for the absolute endpoints), shouldn't there be a P3 and a
P1 term in there - or does that somehow get (partially) accounted for under the
hood?

I was too tired to work out the correct derivatives of the Bernstein polynomial
terms the other day, and I have things to do before I will have a chance to look
into this any further.

Just asking to clarify and triple check.  ;)


Post a reply to this message

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