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
20 Apr 2024 05:11:22 EDT (-0400)
  Re: Sphere Sweep 1.2 Quadratic spline question - STOP THE PRESS!  
From: Cousin Ricky
Date: 8 Sep 2020 14:02:50
Message: <5f57c74a$1@news.povray.org>
On 2020-09-08 1:36 PM (-4), Bald Eagle wrote:
> 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 don't know what you mean; all 3 terms are in the array.  The 2nd term 
is 2/3 of the way from P1 to P2, and the 3rd term is 2/3 of the way from 
P3 to P2.

Under the hood, the formula draws from all 4 control points, so each of 
the 3 quadratic points gets its input.


Post a reply to this message

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