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
1
vote
3 answers

How to smooth out a stroke, given some coordinates (x, y) of the stroke in order?

I am currently working on a project where I need to create an image of a stroke smoothed out given some ordered coordinates of the stroke. Suppose I have some points import numpy as np X = np.array([1, 3, 6, 8, 5]) Y = np.array([1, 8, 4, 4,…
Rahat Zaman
  • 1,322
  • 14
  • 32
1
vote
1 answer

how to fit B spline curve on Gray image using three points

I have a gray scale image. I need to fit a curve using three points. I have attached the paper (Yellow arc), which was published in PLoS One,…
1
vote
1 answer

Bspline boundary type for parametric curve

I want to impose conditions on the derivative at the boundaries for a parametric Bspline. r=[1.08,1.08, 0.987, 0.82, 0.734, 0.692, 0.40] phi=np.linspace(0,np.pi/2,len(r)) x, y = r*np.cos(phi), r*np.sin(phi) l, r = [(1, 0)], [(1, 0)] spl =…
LaoZe
  • 33
  • 4
1
vote
2 answers

How to create a B-Spline with QwtSpline

In QwtSpline there are two different types of splines, but I don't see a difference between both types. I found a image, that explains my problem: QwtSpline always creates a spline, like that on the left side of the picture. But I want to have a…
NelDav
  • 785
  • 2
  • 11
  • 30
1
vote
2 answers

How can I change the number of basis functions when performing B-Spline fitting in scipy (python)?

I have a discrete set of points (x_n, y_n) that I would like to approximate/represent as a linear combination of B-spline basis functions. I need to be able to manually change the number of B-spline basis functions used by the method, and I am…
DanJonesOcean
  • 55
  • 1
  • 10
1
vote
1 answer

Generating Spline Curves with Wand and Python

I'm attempting to draw the raster representation of spline curves extracted from DXF files. I've extracted the data from the DXF files using the ezdxf library and I'm using the Python Wand library (ImageMagick) to draw the images. Wand has a spline…
jemiah
  • 63
  • 8
1
vote
1 answer

Why I can't smooth this curve by B-spline in python?

I check several different method, but why my curve can't be smoothed as what the others did? Here is my code and image. from scipy.interpolate import splrep, splev import matplotlib.pyplot as plt list_x = [296, 297, 425, 460, 510, 532, 597, 601,…
MagicSign
  • 11
  • 2
1
vote
1 answer

integrate quadratic b-splines in R

I am working with a function that depends on quadratic B-spline interpolation estimated up front by the the cobs function in the same R package. The estimated knots and corresponding coefficients are given in code. Further on, I require the integral…
Akkariz
  • 139
  • 8
1
vote
1 answer

In Python, how do you fit the minimum quantile b-spline regression line?

You can find the minimum quantile regression line fit like this: import statsmodels.api as sm import statsmodels.formula.api as smf from statsmodels.regression.quantile_regression import QuantReg mod = smf.quantreg('y ~ x', data) res = mod.fit(q =…
193381
  • 121
  • 4
1
vote
2 answers

leastsq trouble passing parameters Python

I am trying to fit the following function: Detrended SNR into my data. C1, C2 and h are the parameters I need to obtain from the leastsq's method. C1 and C2 are simple but the problem is that my h(t) is in reality: . What I want to obtain are the…
1
vote
1 answer

Joining B-Spline segments in OpenGL / C++

I'm trying to draw a B-Spline given 11 control points. I'm using freeglut and C++. I was able to display my control points easily. I then wrote the basis functions as follows: float B0(float u){ return float(pow(u - 1, 3) / 6.0); } float…
user3502486
1
vote
2 answers

B-Spline for any number of control points

I am currently working on a soft body system using numeric spring physics and I have finally got that working. My issue is that everything is currently in straight lines. I am aiming to replicate something similar to the game "The floor is Jelly"…
1
vote
0 answers

How can I make a B spline with specific values of 1st derivative at breakpoints (not only ends) using MATLAB?

I used csape function in curve fitting toolbox, it enables the user of choosing derivative values at the both ends. Is there a way to control the value of the derivative a specific breakpoint? I want to set one of the values of the derivatives to be…
Robotawi
  • 11
  • 2
1
vote
0 answers

Spline curve fitting and smoothing it

I am trying to fit curve using Spline. As I studied it, knots and control points are important factor for making curve. However functions which support to make spline curve, there is no argument on control points. (includes arguments on…
Sujin Kwon
  • 11
  • 1
1
vote
0 answers

Mathematica PiecewiseExpand and plots

When I'm using Mathematica command: "Plot[BSplineBasis[3, x], {x, 0, 1}]" then I get a nice function plot. However, when I use: "Plot[PiecewiseExpand[BSplineBasis[3, x]], {x, 0, 1}]" then the plot has 2 breaks in it, one larger around x=0.26 and…