Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rulyotano/wpf-bezier-interpolation
Interpolate 2D points, usign Bezier curves in WPF
https://github.com/rulyotano/wpf-bezier-interpolation
2d bezier-curves interpolation wpf
Last synced: 1 day ago
JSON representation
Interpolate 2D points, usign Bezier curves in WPF
- Host: GitHub
- URL: https://github.com/rulyotano/wpf-bezier-interpolation
- Owner: rulyotano
- License: mit
- Created: 2014-05-22T18:34:12.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-12-03T10:21:15.000Z (about 1 year ago)
- Last Synced: 2024-04-09T21:36:11.039Z (9 months ago)
- Topics: 2d, bezier-curves, interpolation, wpf
- Language: C#
- Homepage: https://github.com/rulyotano/Rulyotano.CrossCutting/tree/main/src/Rulyotano.Math.Interpolation.Bezier
- Size: 1.05 MB
- Stars: 26
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WPF-Bezier-Interpolation
This is a sample project for the CodeProject article Interpolate 2D points, usign Bezier curves in WPF. I suggest reading the article.
[Live JS Demo](https://rulyotano.com/demos/bezier)
☝️ you can play a bit with the live JS demo. It is the same algorithm implemented for JS.
![Alt text](interpolation-bezier-curves.gif?raw=true "The sample running")
## What is it about?
The main goal of this project is provide a control that, given a sorted collection of points draw a curve for interpolate those points (the curve will pass for each point).
Besides that, another goal is that this control could be used along the MVVM pattern, then when each point's position changes, or when any point is added or removed, the control is refreshed.
In this example app, the points can be dragged by the user, and also can be draw a closed or open curve.
## UPDATE 1.0:
Also was added the adding points in the best curve placement behavior. Now when clicking in some canvas locations, a point is added to the curve and inserted at the right point.## UPDATE 2.0:
The math related to the interpolation has been refactored to a new .Nuget package. In this way becomes more ease to use it in other projects. This packages is [Rulyotano.Math.Interpolation.Bezier](https://www.nuget.org/packages/Rulyotano.Math.Interpolation.Bezier) and the code can be found at [Github Project](https://github.com/rulyotano/Rulyotano.CrossCutting/tree/main/src/Rulyotano.Math.Interpolation.Bezier).## Want to contribute?
You are welcome!