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

learn more… | top users | synonyms

24
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 ...
21
votes
4answers
575 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 ...
14
votes
2answers
177 views

Color Blend in BezierCurve

How can I color a BezierCurve from Red into Green just as ...
13
votes
4answers
1k 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: ...
13
votes
1answer
762 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 ...
13
votes
2answers
153 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 ...
12
votes
5answers
482 views

Joining ordered set of points with splines in spiral

I have a collection of points ...
11
votes
1answer
200 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 ...
11
votes
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 ...
10
votes
3answers
754 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: ...
10
votes
1answer
227 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 ...
9
votes
3answers
190 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)= ...
9
votes
1answer
259 views

SplineDegree->1 does not work with BezierFunction?

This works (SplineDegree -> 2) ...
8
votes
4answers
356 views

BSplineFunction derivatives wrong if using weights?

In my work, I make heavy use of non-uniform rational B-spline (NURBS) functions, defined using the function BSplineFunction with the option defining ...
8
votes
2answers
480 views
7
votes
2answers
331 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. ...
7
votes
1answer
160 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 ...
7
votes
0answers
83 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 ...
6
votes
2answers
350 views

Convert BSplineFunction into two Interpolating Functions

Is there a way to decompose a BSplineFunction output into two functions x[t], y[t] ...
6
votes
1answer
474 views

BSplineCurve Interpolation

Can I get interpolated values from this B-spline, (shown in red)? ...
6
votes
2answers
161 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 ...
6
votes
2answers
266 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 ...
5
votes
2answers
427 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 ...
5
votes
2answers
112 views
+50

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 ...
4
votes
3answers
896 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 ...
4
votes
3answers
274 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 ...
4
votes
2answers
327 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: ...
4
votes
1answer
156 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 ...
4
votes
0answers
59 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
0answers
411 views

Cubic polynomial interpolation with velocities listed rather than some points

I am trying to use the function BSplineFunction[] to create a natural cubic spline. Normally what is done is that you specify "SplineDegree -> 3" and include a list of points and it will carry out ...
3
votes
2answers
886 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 ...
3
votes
1answer
174 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 ...
3
votes
2answers
795 views

Parametric differentiable interpolation of a 2D data set

I have a set of data ...
3
votes
1answer
126 views

How to color a BSplineSurface

I am trying to color a BSplineSurface in a complex way but not having any luck using ColorFunction. I can use ...
3
votes
0answers
410 views

How to make 3D object smooth?

This thread considers mathematical methods here to make the 3D object smooth but this question consider how to achieve the goal of smoothing a 3D object in Mathematica. I want to get smoother ...
2
votes
3answers
194 views

How can I find the points of B Spline functions for a specific range?

Based on this question: I have a list of bspline functions (nearly 1000) provided by applying BSplineFunction to a list of points. I want to get the points each of ...
2
votes
2answers
278 views

Evaluating Polynomials at Grid Points

I am continuing my quest on B-splines. The code below builds a 5x5 matrix out of B-splines, using the BSplineBasis[] routine. I now want to evaluate the polynomials that are stored in each matrix ...
2
votes
1answer
91 views

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

Here's a simple Manipulate with a closed BSplineCurve, and a Locator. ...
2
votes
1answer
160 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: ...
2
votes
1answer
117 views

Interpolation of a NURBS curve

Known that NQ=P where N is the Bspline basis function, Q is the control point that we wish to locate, P is the data points given ( the curve must pass through it) is there any way to modify the "N" ...
2
votes
1answer
140 views

Problems with BSplineFunction vs. BSplineSurface

Why are those surfaces different? ...
2
votes
1answer
119 views

How to generate specific function using BSpline command/

I want to generate an approximation function that fits a curve to points. My goal is to obtain an actual formula. Is this possible with the BSpline function? Using the following code: ...
2
votes
1answer
64 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: ...
2
votes
1answer
122 views

Failed to create a special random-disturbed initial condition for partial differential equation

I try to use BSplineFunction to creat a initial condition for NDSolve which has periodic boundary condition, that is realized by ...
2
votes
0answers
121 views

Exporting BSplineSurface to STL

I have encountered some difficulties getting BSplineSurface to export to STL. The following code works and generates a triangulated polygon mesh from the NURBS ...
1
vote
2answers
752 views

Derivative of a spline approximation

To approximate an experimental data function $f(t)$ with $t \in (t_{min},t_{max})$ I used a cubic spline $s(p)=(t(p),f(p))$ with the parameter $p \in (0,1)$ and $p = t/(t_{max}-t_{min})$ by using the ...
1
vote
2answers
301 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? ...
1
vote
1answer
71 views

Bspline weights

I change weigts of my points, but nothing has changed. What should i do to solve this problem? ...
1
vote
1answer
64 views

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? ...