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 Time21 Apr 2024 04:03:38 EDT (-0400)
 Re: Sphere Sweep 1.2 Quadratic spline question - STOP THE PRESS!
 From: Bald Eagle Date: 8 Sep 2020 13:40:01 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.5f57c110ccb2d7aa1f9dae300%40news.povray.org",
"headline": "Re: Sphere Sweep 1.2 Quadratic spline question - STOP THE PRESS!",
"dateCreated": "2020-09-08T17:40:01+00:00",
"datePublished": "2020-09-08T17:40:01+00:00",
"author": {
"@type": "Person",
"name": "Bald Eagle"
}
}
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.  ;)
```