# Tagged Questions

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

2answers
4k 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 ...
3answers
991 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 ...
4answers
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: ...
5answers
577 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 ...
2answers
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 ...
2answers
507 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. ...
2answers
186 views

### Color Blend in BezierCurve

How can I color a BezierCurve from Red into Green just as ...
1answer
915 views

### Curve fit based on minimal data

Inspired by the fantastic answers here and here, I would like to ask a questions along similar lines. I have 6 curve types that follow these rules: Type A: If point 1 is positive and point 2 is ...
1answer
171 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 ...
5answers
596 views

### Joining ordered set of points with splines in spiral

I have a collection of points ...
1answer
267 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 ...
1answer
2k views

### Fitting a spline to data with FindFit?

I am trying to find a function that fits my almost linear data. A high order polynomial model has too much residual. So I was hoping to use Mathematica to fit splines to the curve. This is what I ...
3answers
950 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: ...
3answers
259 views

2answers
240 views

### How to boost the performance of my own BSplineFunction

In my CAGD package, I implemented a CAGDBSplineFunction[] like built-in BSplineFunction[]. ...
3answers
380 views

### Implementation of tensor product formula

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

### SplineDegree->1 does not work with BezierFunction?

This works (SplineDegree -> 2) ...
2answers
163 views

### How to optimize my own BezierFunction?

A few months ago, I asked a question about the implementation of Bezier surface. Please see here for a full detail. I also know that BezierFunction[] is built-in ...
1answer
231 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 ...
1answer
240 views

### How to define a custom 2/3D graphic primitive like built-in?

There are lots of basic graphic-pimitive in Mathematica, such as 2D- pimitive: Line[], Circle[], Disk[] and 3D-pimitive: ...
2answers
592 views

### How to make BSplineFunction pass each data point and naturally smooth?

Old package, works good ...
1answer
195 views

### Produce a spline from a set of {{x, y}, z} points and get its parameters/expression

I have produced a set of points in a variable of the type {{x1, y1}, z1},{{x2, y2}, z2}, ,... }, where {x, y} should be the ...
1answer
110 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 ...
2answers
491 views

### How to create an adjustable Bézier curve?

I tried to create an adjustable Bézier curve with the following simple code. However the curve didn't show up. What is the problem? Please help. ...
1answer
172 views

### Fixing Spline curves so as to not overlap with themselves - (Diagrams)

Statement of the problem: Conceptually, what I'm trying to achieve is pretty simple. I have some code that generates a set of diagrams from a list of sets of points using BSplineCurve. Certain ...
0answers
106 views

### Color Snapping When Using VertexColors with a Tube with BSplineCurve as an Argument

I think I've identified a bug in how VertexColors are treated when rendering a Tube object where the underlying data is a ...
2answers
427 views

### Convert BSplineFunction into two Interpolating Functions

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

### What's the difference between Interpolation[pts, Method -> Spline] and BSplineCurve?

Last month, I answered a question about spline interpolation,please see here Now I do the following operations ...
1answer
572 views

### BSplineCurve Interpolation

Can I get interpolated values from this B-spline, (shown in red)? ...
2answers
200 views

### How do I get my spline based arrows to have rounded ends?

I would like to change the how the ends of the spline arrows in my figure are rendered to be "rounded", but ...
2answers
461 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 ...
0answers
64 views

### Artefact at joints within BSplineCurve of low Opacity

I want to eliminate the dots of higher opacity that occur at the joints within a BSplineCurve of low opacity. Small rectangles of greater opacity, shown below, ...
2answers
226 views

### Filling between two B-spline curves

I am trying to fill the space between two curves (curve1 and curve2) I generated since long but unable to do so. Can some one help on this please. The following is the code snippet. ...
3answers
212 views

### How to integrate a Bézier function?

I have: points = {{0, 100}, {250, 0}, {0, 300}, {500, 500}} And I want to know the area below the curve, so I came to: ...
2answers
545 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 ...
1answer
122 views

### 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 ...
1answer
258 views

### Find GeometricTransform from 3D object external surfaces to a positional point cloud data

I am looking for another way to approach this problem. Any suggestion on how to optimize the computing speed is welcome. I have a BSplineFunction which accurately ...
1answer
84 views

### How to use BSplineFunction for calculating derivative

I have a set of data like the following data = {{x1,y1},{x2,y2},{x3,y3},......} Now I use ...
1answer
154 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 ...
3answers
1k views

### Inverting a Spline-Function (Bezier or BSpline)

I would like to use a Spline-Function to describe a transformation from one range of reals to another, that is I would like to have a function which maps a value $y$ on $x$ and for simplicity let us ...
3answers
646 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 ...
2answers
515 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: ...
1answer
71 views

2answers
292 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 matrix(ls,ws,lx,bb,...
1answer
299 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 far....