Questions tagged [splines]

Questions on the spline-related functions of Mathematica (BezierCurve[], BSplineCurve[], etc.), or related to the theory and use of splines in Mathematica.

195 questions
6
votes
1 answer

How to evaluate BSplineFunction

I have the following code to plot value of a bspline curve but it doesn't evaluate when I specify weights and knots and I'm not sure what's going wrong, the weights and knots vectors have the correct length (and if I change them I get an error) but…
mkm
  • 223
  • 1
  • 6
4
votes
1 answer

Unexpected behavior of BSplineFunction and BezierFunction

$Version ParametricPlot[BezierFunction[RandomInteger[100,{3,2}]][t],{t,0,1}] 10.4.1 for Microsoft Windows (64-bit) (April 17, 2016) Crazy result.But the documentation have not any specification for this.And the BezierFunction and BSplineFunction…
yode
  • 26,686
  • 4
  • 62
  • 167
3
votes
1 answer

BSpline weights

I changed the weights of my points, but nothing has changed. What should I do to solve this problem? k = {{{16.24, 44.3486, 642}, {16.24, 44.3652, 625}, {16.24, 44.3818, 717}, {16.24, 44.3984, 940}, {16.24, 44.415, 955}, {16.24, 44.4316,…
Pete
  • 53
  • 2
3
votes
1 answer

how to PiecewiseExpand BSplineBasis to get Basis matrices of uniform B-splines presented in the paper?

As we all know, the definition of B-spline contains the B-spline basis function, which has the recursive form $B_{j,k}$ is the j-th degree $k-1$ polynomial. It has nonzeros only in interval $[t_j,t_{j+k})$ which contains $k$ spans…
eason
  • 197
  • 5
2
votes
1 answer

Different results with BSplineSurface and BSplineFunction

There seems to be some differences when plotting a surface with BSplineSurface and with BSplineFunction. Points={...} A=BSplineSurface[Points] B=BSplineFunction[Points] PlotA=Graphics3D[A] PlotB=ParametricPlot3D[B[u,v],{u,0,1},{v,0,1}] Notice the…
Art
  • 141
  • 6
2
votes
1 answer

How to find if x-y point falls within a closed BSplineCurve

Here's a simple Manipulate with a closed BSplineCurve, and a Locator. Manipulate[Graphics[ {BSplineCurve[{{0.5, 0.05}, {1.05, 0.7}, {0.4, 1.5}, {-1.15,0.85}, {-0.75, 0.02}, {-0.93, -1}, {0.2, -1.3}, {1.05, -0.83}}, SplineClosed -> True]}],{pt,…
rhomboidRhipper
  • 856
  • 4
  • 7
2
votes
1 answer

BSplineSurface problem

Why does the result of this function is straight line.If problem is in the order of my points, what order is correct? l = {{{16.24, 44.3486, 642}, {16.24, 44.3652, 625}, {16.24, 44.3818, 717}, {16.24, 44.3984, 940}, {16.24, 44.415, 955},…
Pete
  • 53
  • 2
2
votes
3 answers

Coordinates of spline plot using ArcLength mesh function

The following code produces a 3D spline with equidistant interpolation points: Needs["Splines`"]; f = SplineFit[{{0, 0, 3}, {2, 0, 3}, {2, 2, 1}, {0, 1, 0}}, Cubic]; plot = ParametricPlot3D[f[t], {t, 0, 3}, MeshFunctions -> {"ArcLength"}, Mesh ->…
Jaka Belec
  • 23
  • 4
2
votes
1 answer

Inverse function does not get evaluated

I have a B-spline function, which is a function that is defined as a weighted sum of BSplineBasis function: p = 2; knotvector := {0, 0, 0, 0.25, 0.5, 0.75, 1, 1, 1}; n := Length[knotvector] - p - 1; controlvector := {0, .2, .4, .6, .8, 1}; m[\[Xi]_]…
Ruben
  • 175
  • 4
1
vote
3 answers

Variables substitution in a B-Spline function

I have the following identity mapping expressed by tensor-product B-spline basis functions: pts = {{-1, -1}, {0, -1}, {1, -1}, {-1, 0}, {0, 0}, {1, 0}, {-1,1}, {0, 1}, {1, 1}}; k = {-1, -1, 0, 1, 1}; nBasis = Sqrt[Length[pts]]; basisU =…
S. S.
  • 13
  • 3
0
votes
0 answers

3D interpolation

I have four column data with first 3 column denoting x,y,z and fourth column energy. x variable is actually angle. Now I want to interpolate over all three indepdent variable (x,y.z) with corresponding energy value. I have done mathematica script…
george
  • 71
  • 4