peterkovesi / PerceptualColourMaps.jl

Perceptually Uniform Colour Maps for Julia
Other
117 stars 12 forks source link

Is there a bug in the spline's basis functions calculation? #35

Open EDDragonWolf opened 1 year ago

EDDragonWolf commented 1 year ago

Hello. Thank you for your project and article. I have been inspired by your project and trying to analyze it in more detail, but I have found one strange part which makes me curious.

The building of the basis functions array for simple and periodical B-spline is the same, except for one small peace in 1st level construction. Basic B-spline uses this comparison:

if ti[i] < ti[i+1]

At the same time, Basic Periodic B-spline uses another comparison:

if t[i] < ti[i+1]

Is it correct? Or is it a typo?

Thank you!

peterkovesi commented 1 year ago

Thanks, that does look rather suspicious. I am away from my computer for a few days but will check the code when I get back later in the week.

On Fri, 21 Oct. 2022, 11:00 pm Vitalius Parubochyi, < @.***> wrote:

Hello. Thank you for your project and article. I have been inspired by your project and trying to analyze it in more detail, but I have found one strange part which makes me curious.

The building of the basis functions array for simple and periodical B-spline is the same, except for one small peace in 1st level construction. Basic B-spline uses this comparison https://github.com/peterkovesi/PerceptualColourMaps.jl/blob/master/src/utilities.jl#L74 :

if ti[i] < ti[i+1]

At the same time, Basic Periodic B-spline uses another comparison https://github.com/peterkovesi/PerceptualColourMaps.jl/blob/master/src/utilities.jl#L190 :

if t[i] < ti[i+1]

Is it correct? Or is it a typo?

Thank you!

— Reply to this email directly, view it on GitHub https://github.com/peterkovesi/PerceptualColourMaps.jl/issues/35, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPAEAJXJXSMEHIVR2UQIRLWEKVYXANCNFSM6AAAAAARLIDGLE . You are receiving this because you are subscribed to this thread.Message ID: @.***>