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

learn more… | top users | synonyms

8
votes
2answers
181 views
+150

How to boost the performance of my own BSplineFunction

In my CAGD package, I implemented a CAGDBSplineFunction[] like built-in BSplineFunction[]. ...
0
votes
0answers
140 views

Converting a BSplinecurve to function [duplicate]

I am having two set of data. This is d000 and d001. The set d001 is a subset of d000. I am fitting the d000 data by using the BSpline of the d001 data according to the following commands: ...
1
vote
1answer
62 views

Finding a maximum of a Bézier function

Suppose I have a Bézier function $f:\mathbb{R}^2\to\mathbb{R}$ with random coefficients: ...
1
vote
1answer
88 views

Make a glyph using the BezierCurve function

There are a lot of applications that you make a glyph from a scanned image. Mathematica does have fine tools to interpolate curves like the BezierCurve[] function. ...
27
votes
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 ...
8
votes
1answer
185 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: ...
2
votes
2answers
91 views
4
votes
1answer
71 views

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 ...
0
votes
1answer
80 views

Visualize a pretzel using a closed cubic B-spline and Tube [closed]

I want to visualize a 3D nonplanar pretzel using a closed cubic B-spline displayed with Tube. I'm just absolutely lost on the whole thing. The closest pretzel ...
3
votes
1answer
68 views

Exporting sharp corners in Bézier curves to pdf

I'm a bit baffled by this. I have a number of arrows in a series of diagrams, and I'm defining the arrowheads using Bézier curves such as ...
3
votes
1answer
36 views

Finding Functional Values from the Original Domain Using BSplineFunction

Providing a set of 2D points to BSplineFunction returns a function that requires that the input parameter to the function be between [0,1] no matter what the original domain of the points. In the 2D ...
1
vote
1answer
86 views

How to plot a linear vector tangent to a bezier surface?

I have a bezier surface and its parameters are u and v. The partial differentiation with u as variable gives me a vector in the direction of u. I need to plot this vector. I plugged in a particular ...
0
votes
1answer
60 views

Convert parametric to cartesian

I'm drawing a Bézier surface. ...
8
votes
1answer
194 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 ...
15
votes
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 ...
15
votes
5answers
572 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 ...
5
votes
1answer
116 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 ...
2
votes
1answer
89 views

How to use BezierCurve or BSplineCurve to define a quarter of a circle?

I know the command Circle can do that too, however, I want to be more flexible later on and want to know how to define this with the above mentioned functions. ...
0
votes
1answer
473 views

Exporting BSplineFunction to Excel

I am trying to export the data from a B Spline Function to a table in excel. I have tried exporting as many different file types (.xls, .txt, .dat), but all of ...
9
votes
1answer
225 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 ...
10
votes
3answers
789 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, $$B_{i,n}(u)=\...
9
votes
3answers
305 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 \begin{pmatrix}B_{m,0}(u)&\...
0
votes
0answers
80 views

Problem with BSplineCurve 3D

I have a problem using the function BSplineCurve [ ] . I have to represent a line passing through about 3000 points in 3D. I managed to plot the points separately, but when I use the 3D BSplineCurve []...
5
votes
3answers
203 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: ...
1
vote
1answer
176 views

Move a point along a curve

I am trying to implement the de Casteljau algorithm to trace a point along a Bézier curve. I already have the Bézier curve in place given by the control points ...
5
votes
2answers
224 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. ...
1
vote
0answers
47 views

Extracting control points from BezierFunction

given a Bézier surface, is there a simple way to express $g_{12}$ (from the First fundamental form) again in Bézier form? More precisely, I have control points and a Bézier function $f$: ...
6
votes
0answers
62 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, ...
5
votes
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 ...
3
votes
1answer
297 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....
3
votes
2answers
288 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,...
3
votes
1answer
99 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 ...
1
vote
2answers
83 views

Creating B-splines using a For Loop

I'm very new to Mathematica (as will make itself clear with this question) and I'm trying to create a program that makes b-splines to fit n points. I'm not quite sure how to reference the i-th point ...
15
votes
2answers
500 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. ...
5
votes
1answer
153 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 ...
19
votes
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: ...
1
vote
2answers
1k views

Cubic Splines Functions

I have this set of three data points and want the natural cubic spline functions for them: dat = {{-.0247500, .5}, {.3349375, -.25}, {1.101000, 0}}; I tried: <...
1
vote
1answer
59 views

Different results with BSplineSurface and BSplineFunction [closed]

There seems to be some differences when plotting a surface with BSplineSurface and with BSplineFunction. ...
2
votes
2answers
179 views

BSpline or other curve through arbitrary ordered sequence of two-dimensional points

How does one create a BSplineCurve or other smooth curve passing through each point in an ordered list, where the curve may be non-simple, i.e., can double-back ...
23
votes
3answers
971 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 ...
4
votes
1answer
125 views

How to get coordinate from spline interpolation

Hi, I would like to find 10 coordinates between each points of this spline interpolation. I have done some research, but cannot find an appropriate answer. Any help will be appreciated. ...
3
votes
1answer
190 views

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

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

How do I change a 3d bspline curve to a polygon based graphic? [duplicate]

I have a graphics image generated with bsplines: Graphics3D[Tube[BSplineCurve[pts], 2]] I want to export this to a .stl file. To do so I know I need to modify ...
12
votes
5answers
589 views
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 ...
0
votes
0answers
49 views

Working with Piecewise functions - Hexsplines

I'm trying to use the convolution definition of hexsplines, that is, a hexspline is the convolution of the indicator function of a hexagon (of sidelength 1 and centre $(0,0)$ ) with itself. I'm ...
6
votes
2answers
223 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 ...
11
votes
1answer
276 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 ...
2
votes
1answer
235 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" ...
1
vote
2answers
420 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? ...