Questions on the spline-related functions of Mathematica (BezierCurve[], BSplineCurve[], etc.).

learn more… | top users | synonyms

23
votes
4answers
916 views

Arbitrary precision spline interpolation

The current implementation of Interpolation does not allow arbitrary precision spline interpolation. Yu-Sung Chang says here that "it is not hard to implement it ...
8
votes
2answers
571 views
19
votes
5answers
2k views

Implementation of smoothing splines function

I have some problems in writing a module for spline smoothing. Actually, I have been trying for about two weeks. My listing is here: ...
11
votes
3answers
245 views

How to deal with the condition $u_i=u_{i+1}$ in B-Spline basis function?

The defintion of B-Spline basis function as shown below: Let $\vec{U}=\{u_0,u_1,\ldots,u_m\}$ a nondecreasing sequence of real numbers,i.e, $u_i\leq u_{i+1}\quad i=0,1,2\ldots m-1$ $$N_{i,0}(u)= ...
15
votes
3answers
1k views

ListSurfacePlot3D generates ugly artifacts

I have a list of $\{x,y,z\}$ pairs representing points in $R^3$. For every unique value of $z$ there are many $\{x,y\}$ pairs defining a polygon/contour in that particular $z$-plane. My dataset looks ...
5
votes
2answers
513 views

Intersection of two splines

I have a collection of sets of points, each set defining the segment of a (nice) curve on the unit sphere $S^2 \subset \mathbb{R}^3$. The points are computed numerically. I now want to compute the ...
26
votes
2answers
3k views

Joining and interpolating data points

I wonder what is the best practice for interpolating curves? Usually I'm using BSplineCurve and adjusting SplineWeights so it ...
11
votes
1answer
259 views

How can I make FilledCurve smoother?

In How can I generate and randomly assign color to annular sectors? J.M. showed an interesting way to create a sector graphic using FilledCurve. Unfortunately it ...
11
votes
3answers
898 views

Finding “Maxima” and “Minima” on a B-Spline

I need to find the "Maxima" and "Minima" on a B-Spline or more correct the points where the 2nd components of the derivate equal zero. For example: ...
6
votes
2answers
409 views

Convert BSplineFunction into two Interpolating Functions

Is there a way to decompose a BSplineFunction output into two functions x[t], y[t] ...
4
votes
2answers
482 views

How to get a uniformly distributed list of points from a B-spline function [duplicate]

I created a spline function from a list of points and made a plot as follows: ...
3
votes
2answers
1k views

Generating x,y coordinates for an edge detection

I'd like to be able to process a number of graphics that have edge contours and output a list of $x$, $y$ coordinates to be used for generating a spline in another program, or in Mathematica, to make ...
15
votes
2answers
480 views

How to generate a closed B-spline curve?

I wrote a function called deBoor using the Cox-de Boor algorithm to generate a B-spline curve. ...
12
votes
5answers
571 views

Joining ordered set of points with splines in spiral

I have a collection of points ...
9
votes
1answer
203 views

How to discretize a BezierCurve?

Bug introduced in version 10.0 and persisting through 10.4 DiscretizeGraphics is new in 10.0. I need to create a discretized region from a ...
9
votes
3answers
295 views

Implementation of a matrix formula

For the Bézier surface, which owns the following matrix definition: $$\begin{align*} S(u,v)&=\sum_{i=0}^m \sum_{j=0}^n P_{i,j} B_{m,i}(u) B_{n,j}(v)\\ &=\small ...
5
votes
1answer
145 views

Multidimensional arbitrary precision spline interpolation on the grid

This question is a generalization of the previous one for multiple dimensions. In the answer to that question an implementation for the clamped spline interpolation for 1D case and arbitrary degree of ...
4
votes
3answers
562 views

How to find a length of a curve constructed using Spline?

By fitting the data using spline, I have created a curve. sp = SplineFit[data1, Cubic] I am trying to divide this curve into small segments of equal length. To ...
3
votes
1answer
292 views

How can I make a pretzel shape using Bézier curves?

I am trying to make a pretzel shape,but I cannot seem to get the loops even. Eventually, I need to make the pretzel shape loop in 3D so I need to nail the 2D concept first. Here's what I have so ...
2
votes
1answer
182 views

Confusion with SplineFit (Angle calculation)

This question is continuation to this other one I am creating polymers (where each monomer is of equal length) using this method: ...
15
votes
5answers
564 views

BSplineFunction derivatives wrong if using weights?

Bug introduced in 7.0 and persisting through 10.4 In my work, I make heavy use of non-uniform rational B-spline (NURBS) functions, defined using the function ...
3
votes
2answers
281 views

Understanding polyharmonic splines

Rahul Narain and J.M. gives implementation of the thin plate polyharmonic splines in this post. Rahul Narain's method is clear. J.M.'s is convenient to reuse. But J.M. used too many ...
10
votes
3answers
769 views

Getting a custom Bézier curve function to work

In general, the $nth$-degree Bézier curve is defined as: $$\vec{C}(u)=\sum_{i=0}^{n} B_{i,n}(u) \vec{P_i} \qquad 0\leq u\leq1$$ where $B_{i,n}(u)$ is the classical Bernstein polynomial, ...
11
votes
1answer
258 views

How to specify PDE Boundary condition on Bspline?

Context I would like to solve a PDE on a boundary which is parametrized as a BSpline. I am trying to solve the force-free Grad-Shafranov equation on a ...
6
votes
2answers
427 views

2D smoothing spline interpolation

Does Mathematica have 2D smoothing spline interpolation built in? I requires an interpolation method with smooth first derivatives and cubic bivariate splines fulfill this nicely. In python I would ...
13
votes
2answers
168 views

Is there a way to get BSplineFunction beyond MachinePrecision?

I have been using BSplineFunction (Mathematica 8) to generate a smooth representation of some data, which I might then do some further processing on. As I ...
6
votes
1answer
552 views

BSplineCurve Interpolation

Can I get interpolated values from this B-spline, (shown in red)? ...
3
votes
1answer
97 views

How to make the result of Piecewise be a closed interval?

Description This question comes from two questions. Namely Q1 and Q2 The defintion of B-Spline basis function as shown below: Let $\vec{U}=\{u_0,u_1,\ldots,u_m\}$ a nondecreasing sequence of real ...
3
votes
2answers
917 views

Parametric differentiable interpolation of a 2D data set

I have a set of data ...
8
votes
1answer
109 views

Where is the other half of my fourth degree Bézier curve?

Bug introduced in 10.0.0 and fixed in 10.2 When I enter the following command, half of the fourth-degree spline is missing from the graph (i.e. it doesn't touch the last point). Is this a bug in ...
2
votes
2answers
203 views
2
votes
1answer
70 views

Why are these methods giving me different results? (Trying to test SplineFit)

I am creating a polymer(where each monomer is of equal length) using this method: ...
1
vote
2answers
408 views

How to know form of plotted Bézier function

Simple scenario is to see the Bézier function, but how to know which polynomial approximate it? ...