Questions tagged [bspline]

A B-spline (basis spline) is the generalization of the Bézier curve which has minimal support with respect to a given degree, smoothness, and domain partition.

A B-spline (basis spline) is the generalization of the Bézier curve which has minimal support with respect to a given degree, smoothness, and domain partition.

190 questions
2
votes
0 answers

Spline Set of a font glyph in FontForge

When saving a font with SFD format, the SplineSet looks like 388 268 m 1,0,1 354 357 354 357 285 569 c 1,2,3 276 546 276 546 239 441 c 128,-1,4 202 336 202 336 174 268 c 1,5,6 252 266 252 266 305 266 c 128,-1,7 358 266 358 266 388 268 c…
Googlebot
  • 15,159
  • 44
  • 133
  • 229
2
votes
2 answers

Is there a way to generate B spline functions in Python without the coefficients known?

I'm trying to generate a basis spline function by defining the order of b-splines, number of basis functions, knots and range of evaluation. Please refer me to a suitable function in Python that can help me. My current implementation is using the…
Ankit Bansal
  • 317
  • 4
  • 14
2
votes
0 answers

Fitting B-spline 'around' points

I have a large number of points representing image contours, they are generated with scikit-image and look as such Source-image Contours I would like to fit a B-spline around these points such that the resulting line best approximates the contours…
burnquest
  • 21
  • 1
2
votes
1 answer

Trouble formatting x and y data in gekko's bspline function

I am trying to perform 2D interpolation in GEKKO, and have the x,y, and z data. However, when I input them into the bspline function, I get the error "x_data and y_data must be strictly increasing". How do you calculate the knots and coefficients to…
Titus Quah
  • 125
  • 6
2
votes
0 answers

Make an interpolating B-spline curve closed with C2 continuity while retaining the interpolation of the points

This post is a continuation of the comment section of this question. I have implemented the algorithm ALGORITHM A9.1 GlobalCurveInterp from The NURBS Book (2nd edition) which calculates an interpolating B-spline given a set of points Q. I would…
nonremovable
  • 798
  • 1
  • 6
  • 19
2
votes
2 answers

B-Splines in C++

I'm trying to write a program to generate a curve in C++ to plot a B-Spline curve. This is what my code looks like. void drawBSplineCurve(vector poly) { int n, d; cout << "Enter degree of curve: "; cin >> d; n = poly.size(); …
naman1901
  • 305
  • 4
  • 16
2
votes
1 answer

Find control points from B-Spline curve through set of data points in matlab

I'm using data set with 200 data points that is used to draw B-Spline curve and I want to extract the 100 original control points from this curve to use it in one algorithm to solve one problem. The result of control points it's too small compared…
Samah Ahmed
  • 419
  • 8
  • 24
2
votes
1 answer

julia - Interpolations.jl throws "ERROR: InexactError()" for vector, not for point

I'm interpolating over a 2d matrix J: J_itp = interpolate(J, (BSpline(Linear()), NoInterp()), OnGrid()) As you see, I'm only interpolating along the first dimension. The 2nd dimension is required to be on the grid. I have a vector of points I'd…
benten
  • 1,995
  • 2
  • 23
  • 38
2
votes
0 answers

avoid loop matlab in 2D bspline surface interpolation

I want to speed up my code. I always use vectorization. But in this code I have no idea how to avoid the for-loop. I would really appreciate a hint how to proceed. thank u so much for your time. close all clear clc % generating sample data x =…
PHS
  • 21
  • 2
2
votes
0 answers

b-splines for drawing, not predicting, based on control path

I've tried to approach my general problem through two separate questions here on SO: Specify clamped knot vector in bs-call and Fit a B spline to a control path. The responses to these have led me to a reformulation of the bigger problem, which I'm…
ThomasP85
  • 1,624
  • 2
  • 15
  • 26
2
votes
2 answers

Bspline implementation not working as expected

I made this implementation of the BSPLINE curve. I Followed the usual definition presented in http://en.wikipedia.org/wiki/B-spline t is the knot vector. #include double N(int i, int k, double u, double t[]) { if(k == 1) { …
Rafael Castro
  • 579
  • 5
  • 14
2
votes
1 answer

How can I convert BezierCurve to B-Spline?

I'm trying to create an animation of a complex path using HTML5 canvas. I've divided my path into some bezier curve and draw each one of them using the cubic bezier curves formula and javascript function lineTo(). The problem is the points that the…
viegets
  • 119
  • 1
  • 7
2
votes
1 answer

B-spline curve with n control points and order k in C++

I have some 1D points and now I want to fit it into a curve. By chance, a suggestion is to use B-spline curve. I want to create B-spline curve from some n control points (some 1D points) and order (degree) k by using code C++. Could Can anyone…
2
votes
0 answers

libgdx - Shaperender BspLine with orthographic camera not working

I'm trying to draw a curve line using BSpline and ShapeRenderer. With perspective camera I found myself able to do that. If I try to use OrthographicCamera, instead, nothing gets rendered on the screen. My goal is to draw a BSPline with…
2
votes
0 answers

Python wrapper for pppack?

I have searched the web extensively to find a wrapper of the pppack, especially the routines bsplvb.f and bsplvd.f, which return the basis of the b-splines and their derivatives. The only remotely related thing I could find is this SE_post. So the…
seb
  • 2,251
  • 9
  • 30
  • 44