Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new monotone interpolation plot handler #1358

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

FrnchFrgg
Copy link

@FrnchFrgg FrnchFrgg commented Sep 6, 2024

This handler converts each plot stream command into a curveto command, except for the first, which is converted to the previously specified action. The curveto control points are computed and adjusted so that the resulting curve respects the monotonicity of the points. If a point is a local extremum of the point set, it will also be a local extremum of the generated curve.

See https://en.wikipedia.org/wiki/Monotone_cubic_interpolation for an explanation of the algorithm. The last part uses \pgfpathcurveto instead of using Hermitte base functions.

The plot handler is also made available to datavisualization through the smooth monotone line visualizer option`

This handler converts each plot stream command into a curveto
command, except for the first, which is converted to the previously
specified action. The curveto control points are computed and adjusted
so that the resulting curve respects the monotonicity of the points.
If a point is a local extremum of the point set, it will also be
a local extremum of the generated curve.

See https://en.wikipedia.org/wiki/Monotone_cubic_interpolation for an
explanation of the algorithm. The last part uses \pgfpathcurveto
instead of using Hermitte base functions.

The plot handler is also made available to datavisualization through
the `smooth monotone line` visualizer option.

Signed-off-by: Julien '_FrnchFrgg_' RIVAUD <[email protected]>
@FrnchFrgg FrnchFrgg changed the title Add a new monotonic interpolation plot handler Add a new monotone interpolation plot handler Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant