Skip to content

tangent and curvature #11

@pietroblandizzi

Description

@pietroblandizzi

Hello i am trying to use the library to fit splines on some data. It looks like the derivatives are not working properly.
Maybe i am using the library in the wrong way.
From what i can see the time is not exactly related to the x of each point.
I compute the first derivative at time t : auto d1 = ucbs.getTangent(u).tangent;
I compute the second derivative at time t : auto d2 = ucbs.getCurvature(u).curvature;

then i extract x and y and plot them.
The data are really simple:
(x,y);
(1, 30);
(2, 29);
(3, 27);
(4, 24);
(5, 20);
(6, 16);
(7, 9);

here the curve fitted with an uniform bspline and the two derivatives from the library:
uniform_cr_spline
fist_derivative_unif_bspl
second_derivative_unif_bspl

can you help me? Am i using the lib in the wrong way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions