This pull request fixes the visual kinks sometimes shown when rendering curves.
What was the problem?
Splines are defined to be continuous (even differentiable) at the transitions between sections. So, one can define (mathematically) the parameter t piecewise in open intervals (0 <= t <= 1, 1 <= t <= 2, ...). However, in the implementation, we need to make sure that the transition points won't be added twice. We did not do this so far, leading to the computing of two identical base shapes overlapping.
What was the solution?
In principle very simple, compute the splines s.t. the transition points belong to either of two consecutive sub-splines.
What has been done concretely?
complete refactoring of the BSpline computation. We are using matrix multiplication now instead of writing out equations, leading to more readable code.
adding an extra flag to the sub-spline computation, indicating whether to include the first point or not
adapting the Curve class according to changes in the UniformBspline class
adapting the RibbonDiagram to new changes
cleaning up the RibbonDiagram, especially the computation of the sub-shapes, leading to better readability
This pull request fixes the visual kinks sometimes shown when rendering curves.
What was the problem? Splines are defined to be continuous (even differentiable) at the transitions between sections. So, one can define (mathematically) the parameter t piecewise in open intervals (0 <= t <= 1, 1 <= t <= 2, ...). However, in the implementation, we need to make sure that the transition points won't be added twice. We did not do this so far, leading to the computing of two identical base shapes overlapping.
What was the solution? In principle very simple, compute the splines s.t. the transition points belong to either of two consecutive sub-splines.
What has been done concretely?
Curve
class according to changes in theUniformBspline
classRibbonDiagram
to new changesRibbonDiagram
, especially the computation of the sub-shapes, leading to better readabilityRibbonDiagramTests
to the changes