POV-Ray : Newsgroups : povray.binaries.images : Smoothing bicubic_patchs. A pain. : Re: Smoothing bicubic_patchs. A pain. Server Time
12 May 2024 03:35:25 EDT (-0400)
  Re: Smoothing bicubic_patchs. A pain.  
From: Cousin Ricky
Date: 19 Aug 2018 16:45:00
Message: <web.5b79d6869b869b6160e0cc3d0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> I just added some code to draw the Bezier splines across the patch, using Cousin
> Ricky's spheresweep.inc v1.2 from the Object Collection.
>
> The splines don't quite line up - but I suppose, more concerning is that the
> splines don't intersect with the corner points.
>
> Probably just some wee little bug in there somewhere.
> I'm using the web interface, so I can't rename the message title.
>
> MAYBE I might try to code up a quick Bezier spline macro, if the formula I found
> here:
> http://wiki.povray.org/content/HowTo:Use_Splines_and_Bezier_Curves
> (with the bad math code)
> is correct.
>
> P(t) = A*pow((1-t),3) + 3*B*t*pow((1-t),2) + 3*C*pow(t,2)*(1-t) + D*pow(t,3)
>
> which seems to jive with
> http://idav.ucdavis.edu/education/CAGDNotes/Matrix-Cubic-Bezier-Curve/img1.gif

I explain why I did it the way I did in p.o-c:

On 2015-09-11 08:21 PM (-4), Cousin Ricky wrote:
>
> My calculation uses brute force rather than the single reduced formula
> with all the pow() calls.  This was because my ability to concentrate is
> so bad nowadays that I just gave up on trying to figure it out.  I
> figured that the internal math of the reduced formula would be more
> complicated anyway.  Had I known how simple the final formula was, and
> recalled Clipka's observation that the complexity of the SDL always
> trumps the math, I would have taken that route.  However, the parse time
> is so short, there would be little difference either way.

Rewriting the code to match the reduced formula might give people peace of mind
that my SDL is correct, but as long as the current version works, there's no
urgency to mess with it.


Post a reply to this message

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