Comments (2)
I can suggest a method which allows you to estimate this deviation, not exactly, but it can be enough:
- for each segment of your piecewise line, cut a corresponding segment from interpolated curve — i.e. find control points of the curve which is identical to your interpolation curve, but starts and ends at the end points of linear segment (there are methods for this in geomdl).
- now, you have a set of pairs: a linear segment and corresponding piece of the curve. Now you can apply the property of nurbs curves known as "strong convex hull property": all points of the curve lie inside the convex hull built on it's control points. So, if you calculate the distance from each control point of curve's segment to linear segment (there are obvious enough formulas), and find the maximum of such distances, you will know that your curve segment derives from linear segment not more than for this maximum.
- then you just find the maximum of such maximum distances across all segments.
Nurbs maths will guarantee that the curve never derives from your piecewise linear line more than for the value you find that way, but the deviation obviously can be less than it.
from nurbs-python.
I don't think there's already an algorithm that do it. So, I would do it by myself:
- Find a region where you know the deviation is. Like, at
u
between two scalarsui
anduj
. - Get the tangent vector from the linear piecewise, the
D
vector. - Get the tangent vector
V(u)
from the extrapoled curve. - Your point at extrapoled curve is the one such
V(u) = D
. You can search it by binary search - Once gotten the
u
, compute the minimal distance ofP(u)
(extrapoled) from the linear one. It's what you need.
from nurbs-python.
Related Issues (20)
- fitting error when use approximate_curve HOT 1
- NURBS.surfaces: derivatives evaluation HOT 1
- Incorrect control points calculation in knot insertion procedure, under certain circumstances
- [Suggesion] The Axes3D is not an appropriate way to create the 3D axis handle HOT 1
- Import obj fails with ValueError invalid literal for `int()` with base 10 '1//1' HOT 1
- numpy v1.24 compatibility HOT 2
- operations.split_curve
- Visualization (VisMPL) is showing an empty figure HOT 4
- Interpolating a hemispherical shape leads to ZeroDivisionError HOT 3
- VisPlotly not return the figure object HOT 1
- Help wanted: unknown ZeroDivisionError HOT 3
- Visualizing surface without ordering control points HOT 3
- BSpline interpolation and approximation boundary conditions
- Problem in Visualization for Sample code HOT 2
- export 3D nurbs curves
- Tangent and Normal operation no results
- NURBS.Curve.__eq__ returns True for different curves
- B-spline surface points does not correspond to model u, v parameter HOT 3
- helper.knot_removal returns incorrect result (+ fix) HOT 2
- the circle area weight
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nurbs-python.